diff options
-rw-r--r-- | chrome/tools/ipclist/ipcfuzz.cc | 4 | ||||
-rw-r--r-- | ipc/ipc_message_macros.h | 4 | ||||
-rw-r--r-- | ipc/ipc_message_null_macros.h | 4 | ||||
-rw-r--r-- | ipc/param_traits_log_macros.h | 4 | ||||
-rw-r--r-- | ipc/param_traits_read_macros.h | 2 | ||||
-rw-r--r-- | ipc/param_traits_write_macros.h | 4 | ||||
-rw-r--r-- | ipc/struct_constructor_macros.h | 4 |
7 files changed, 14 insertions, 12 deletions
diff --git a/chrome/tools/ipclist/ipcfuzz.cc b/chrome/tools/ipclist/ipcfuzz.cc index 133dd1c..6a58949 100644 --- a/chrome/tools/ipclist/ipcfuzz.cc +++ b/chrome/tools/ipclist/ipcfuzz.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -516,7 +516,7 @@ class PickleCracker : public Pickle { #define IPC_STRUCT_BEGIN_WITH_PARENT(struct_name, parent)\ IPC_STRUCT_BEGIN(struct_name) #define IPC_STRUCT_BEGIN(struct_name) IPC_STRUCT_TRAITS_BEGIN(struct_name) -#define IPC_STRUCT_MEMBER(type, name) IPC_STRUCT_TRAITS_MEMBER(name) +#define IPC_STRUCT_MEMBER(type, name, ...) IPC_STRUCT_TRAITS_MEMBER(name) #define IPC_STRUCT_END() IPC_STRUCT_TRAITS_END() // Set up so next include will generate fuzz trait classes. diff --git a/ipc/ipc_message_macros.h b/ipc/ipc_message_macros.h index f37c05b..0ef300e 100644 --- a/ipc/ipc_message_macros.h +++ b/ipc/ipc_message_macros.h @@ -202,7 +202,9 @@ struct IPC_MESSAGE_EXPORT struct_name : parent { \ struct_name(); \ ~struct_name(); -#define IPC_STRUCT_MEMBER(type, name) type name; +// Optional variadic parameters specify the default value for this struct +// member. They are passed through to the constructor for |type|. +#define IPC_STRUCT_MEMBER(type, name, ...) type name; #define IPC_STRUCT_END() }; // Message macros collect specific numbers of arguments and funnel them into diff --git a/ipc/ipc_message_null_macros.h b/ipc/ipc_message_null_macros.h index 12d9e6e..e568a92 100644 --- a/ipc/ipc_message_null_macros.h +++ b/ipc/ipc_message_null_macros.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -19,7 +19,7 @@ #define IPC_STRUCT_BEGIN(struct_name) #define IPC_STRUCT_BEGIN_WITH_PARENT(struct_name, parent) -#define IPC_STRUCT_MEMBER(type, name) +#define IPC_STRUCT_MEMBER(type, name, ...) #define IPC_STRUCT_END() #define IPC_STRUCT_TRAITS_BEGIN(struct_name) #define IPC_STRUCT_TRAITS_MEMBER(name) diff --git a/ipc/param_traits_log_macros.h b/ipc/param_traits_log_macros.h index b2d1f2e..4932853 100644 --- a/ipc/param_traits_log_macros.h +++ b/ipc/param_traits_log_macros.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -19,7 +19,7 @@ #define IPC_STRUCT_BEGIN_WITH_PARENT(struct_name, parent) \ IPC_STRUCT_BEGIN(struct_name) #define IPC_STRUCT_BEGIN(struct_name) IPC_STRUCT_TRAITS_BEGIN(struct_name) -#define IPC_STRUCT_MEMBER(type, name) IPC_STRUCT_TRAITS_MEMBER(name) +#define IPC_STRUCT_MEMBER(type, name, ...) IPC_STRUCT_TRAITS_MEMBER(name) #define IPC_STRUCT_END() IPC_STRUCT_TRAITS_END() // Set up so next include will generate log methods. diff --git a/ipc/param_traits_read_macros.h b/ipc/param_traits_read_macros.h index 9d89a92..f504cb4 100644 --- a/ipc/param_traits_read_macros.h +++ b/ipc/param_traits_read_macros.h @@ -17,7 +17,7 @@ #define IPC_STRUCT_BEGIN_WITH_PARENT(struct_name, parent) \ IPC_STRUCT_BEGIN(struct_name) #define IPC_STRUCT_BEGIN(struct_name) IPC_STRUCT_TRAITS_BEGIN(struct_name) -#define IPC_STRUCT_MEMBER(type, name) IPC_STRUCT_TRAITS_MEMBER(name) +#define IPC_STRUCT_MEMBER(type, name, ...) IPC_STRUCT_TRAITS_MEMBER(name) #define IPC_STRUCT_END() IPC_STRUCT_TRAITS_END() // Set up so next include will generate read methods. diff --git a/ipc/param_traits_write_macros.h b/ipc/param_traits_write_macros.h index c83d6b0..eaa4a3c 100644 --- a/ipc/param_traits_write_macros.h +++ b/ipc/param_traits_write_macros.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -17,7 +17,7 @@ #define IPC_STRUCT_BEGIN_WITH_PARENT(struct_name, parent) \ IPC_STRUCT_BEGIN(struct_name) #define IPC_STRUCT_BEGIN(struct_name) IPC_STRUCT_TRAITS_BEGIN(struct_name) -#define IPC_STRUCT_MEMBER(type, name) IPC_STRUCT_TRAITS_MEMBER(name) +#define IPC_STRUCT_MEMBER(type, name, ...) IPC_STRUCT_TRAITS_MEMBER(name) #define IPC_STRUCT_END() IPC_STRUCT_TRAITS_END() // Set up so next include will generate write methods. diff --git a/ipc/struct_constructor_macros.h b/ipc/struct_constructor_macros.h index ee056a3..226878b 100644 --- a/ipc/struct_constructor_macros.h +++ b/ipc/struct_constructor_macros.h @@ -1,4 +1,4 @@ -// Copyright (c) 2010 The Chromium Authors. All rights reserved. +// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -16,7 +16,7 @@ #define IPC_STRUCT_BEGIN(struct_name) struct_name::struct_name() : NoParams() #define IPC_STRUCT_BEGIN_WITH_PARENT(struct_name, parent) \ struct_name::struct_name() : parent() -#define IPC_STRUCT_MEMBER(type, name) , name() +#define IPC_STRUCT_MEMBER(type, name, ...) , name(__VA_ARGS__) #define IPC_STRUCT_END() {} #endif // IPC_STRUCT_CONSTRUCTOR_MACROS_H_ |