From 6f7323d018215156edebc5f716689feacf61ac97 Mon Sep 17 00:00:00 2001 From: lahiker42 Date: Tue, 20 Apr 2010 01:51:37 +0000 Subject: [PATCH] Misc cleanups git-svn-id: https://protobuf-c.googlecode.com/svn/trunk@212 00440858-1255-0410-a3e6-75ea37f81c3a --- src/google/protobuf-c/protobuf-c.c | 3 +-- src/google/protobuf-c/protobuf-c.h | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/src/google/protobuf-c/protobuf-c.c b/src/google/protobuf-c/protobuf-c.c index 26c4b89..3870a74 100644 --- a/src/google/protobuf-c/protobuf-c.c +++ b/src/google/protobuf-c/protobuf-c.c @@ -15,7 +15,7 @@ * under the License. */ -/* TODO: certain implementations use 32-bit math even for +/* TODO: certain implementations use 32-bit math even on 64-bit platforms (uint64_size, uint64_pack, parse_uint64) */ /* TODO: get_packed_size and pack seem to use type-prefixed names, @@ -1838,7 +1838,6 @@ protobuf_c_message_free_unpacked (ProtobufCMessage *message, } /* === services === */ -typedef void (*DestroyHandler)(void *service); typedef void (*GenericHandler)(void *service, const ProtobufCMessage *input, ProtobufCClosure closure, diff --git a/src/google/protobuf-c/protobuf-c.h b/src/google/protobuf-c/protobuf-c.h index ff06387..65d963f 100644 --- a/src/google/protobuf-c/protobuf-c.h +++ b/src/google/protobuf-c/protobuf-c.h @@ -300,9 +300,9 @@ ProtobufCMessage * void protobuf_c_message_free_unpacked (ProtobufCMessage *message, ProtobufCAllocator *allocator); -/* WARNING: 'to_init' must be a block of memory +/* WARNING: 'message' must be a block of memory of size descriptor->sizeof_message. */ -#define protobuf_c_message_init(descriptor, message) (descriptor)->message_init(message) +#define protobuf_c_message_init(descriptor, message) ((descriptor)->message_init((ProtobufCMessage*) (message))) /* --- services --- */ typedef struct _ProtobufCMethodDescriptor ProtobufCMethodDescriptor;