make protobuf_c_message_init() into a function (Issue #49)

git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@257 00440858-1255-0410-a3e6-75ea37f81c3a
This commit is contained in:
lahiker42 2010-09-15 15:05:53 +00:00
parent e9cfa2dd98
commit 00b5c56f69
3 changed files with 12 additions and 1 deletions

View File

@ -1,3 +1,6 @@
0.15 (NOT YET RELEASED)
- make protobuf_c_message_init() into a function (Issue #49, daveb)
0.14:
- build fix (missing dependency in test directory)
- add generation / installation of pkg-config files. (Bobby Powers)

View File

@ -2433,6 +2433,13 @@ protobuf_c_message_free_unpacked (ProtobufCMessage *message,
FREE (allocator, message);
}
void
protobuf_c_message_init (const ProtobufCMessageDescriptor *descriptor,
void *message)
{
descriptor->message_init((ProtobufCMessage*) (message));
}
/* === services === */
typedef void (*GenericHandler)(void *service,
const ProtobufCMessage *input,

View File

@ -333,7 +333,8 @@ void protobuf_c_message_free_unpacked (ProtobufCMessage *message,
/* WARNING: 'message' must be a block of memory
of size descriptor->sizeof_message. */
#define protobuf_c_message_init(descriptor, message) ((descriptor)->message_init((ProtobufCMessage*) (message)))
void protobuf_c_message_init (const ProtobufCMessageDescriptor *,
void *message);
/* --- services --- */
typedef struct _ProtobufCMethodDescriptor ProtobufCMethodDescriptor;