mirror of
https://github.com/protobuf-c/protobuf-c.git
synced 2024-12-27 22:01:02 +08:00
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:
parent
e9cfa2dd98
commit
00b5c56f69
@ -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)
|
||||
|
@ -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,
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user