From 85847c494ecce2c89b628345f8a8272e6f86f480 Mon Sep 17 00:00:00 2001 From: Robert Edmonds Date: Mon, 13 Jan 2014 18:02:35 -0500 Subject: [PATCH] protobuf-c: remove PROTOBUF_C_PLEASE_INCLUDE_CTYPE, ProtobufC_CType i'm not quite sure what this thing is used for or how useful it could possibly be. it's not used anywhere in protobuf-c or protobuf-c-rpc, and it wasn't in protobuf-c 0.14 or earlier. just delete it; if anything actually needs this kind of logic, it's easy enough to replicate it. --- protobuf-c/protobuf-c.h | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/protobuf-c/protobuf-c.h b/protobuf-c/protobuf-c.h index cafcaec..37579e9 100644 --- a/protobuf-c/protobuf-c.h +++ b/protobuf-c/protobuf-c.h @@ -494,34 +494,6 @@ do { \ } \ } while (0) -#ifdef PROTOBUF_C_PLEASE_INCLUDE_CTYPE -// This type is meant to reduce duplicated logic between -// various iterators. It tells what type to expect at -// the "offset" within the message (or, for repeated fields, -// the contents of the buffer.) -// -// Because the names are confusing, and because this mechanism tends to be -// seldom used, you have to specifically request -// this API via #define PROTOBUF_C_PLEASE_INCLUDE_CTYPE. -typedef enum { - PROTOBUF_C_CTYPE_INT32, - PROTOBUF_C_CTYPE_UINT32, - PROTOBUF_C_CTYPE_INT64, - PROTOBUF_C_CTYPE_UINT64, - PROTOBUF_C_CTYPE_FLOAT, - PROTOBUF_C_CTYPE_DOUBLE, - PROTOBUF_C_CTYPE_BOOL, - PROTOBUF_C_CTYPE_ENUM, - PROTOBUF_C_CTYPE_STRING, - PROTOBUF_C_CTYPE_BYTES, - PROTOBUF_C_CTYPE_MESSAGE, -} ProtobufC_CType; - -extern ProtobufC_CType protobuf_c_type_to_ctype(ProtobufCType type); -#define protobuf_c_type_to_ctype(type) \ - ((ProtobufC_CType)(protobuf_c_type_to_ctype_array[(type)])) -#endif - /* ====== private ====== */ #include "protobuf-c-private.h"