# "const fooPtr a" is the same as "foo * const a", even though it is
# usually desired to have "foo const *a". It's easier to just prevent
# the confusing mix of typedef vs. const placement.
+# Also requires that all 'fooPtr' typedefs are actually pointers.
sc_forbid_const_pointer_typedef:
@prohibit='(^|[^"])const \w*Ptr' \
halt='"const fooPtr var" does not declare what you meant' \
$(_sc_search_regexp)
+ @prohibit='typedef [^(]+ [^*]\w*Ptr\b' \
+ halt='use correct style and type for Ptr typedefs' \
+ $(_sc_search_regexp)
# Forbid sizeof foo or sizeof (foo), require sizeof(foo)
sc_size_of_brackets:
/*
* capabilities.h: hypervisor capabilities
*
- * Copyright (C) 2006-2008, 2010, 2012 Red Hat, Inc.
+ * Copyright (C) 2006-2013 Red Hat, Inc.
* Copyright (C) 2006-2008 Daniel P. Berrange
*
* This library is free software; you can redistribute it and/or
};
typedef struct _virCaps virCaps;
-typedef virCaps* virCapsPtr;
+typedef virCaps *virCapsPtr;
struct _virCaps {
virObject parent;
typedef struct _virSecurityStackData virSecurityStackData;
typedef virSecurityStackData *virSecurityStackDataPtr;
typedef struct _virSecurityStackItem virSecurityStackItem;
-typedef virSecurityStackItem* virSecurityStackItemPtr;
+typedef virSecurityStackItem *virSecurityStackItemPtr;
struct _virSecurityStackItem {
virSecurityManagerPtr securityManager;
#define VIR_FROM_THIS VIR_FROM_NONE
typedef struct _testQemuData testQemuData;
-typedef testQemuData * testQemuDataPtr;
+typedef testQemuData *testQemuDataPtr;
struct _testQemuData {
virDomainXMLOptionPtr xmlopt;
const char *base;