summaryrefslogtreecommitdiffstats
path: root/pb.h
diff options
context:
space:
mode:
authorPetteri Aimonen <jpa@git.mail.kapsi.fi>2014-12-26 18:23:36 +0200
committerPetteri Aimonen <jpa@git.mail.kapsi.fi>2014-12-26 18:23:36 +0200
commit418f7d88b3f58603fe03d0060b8aaba905ca56c8 (patch)
treeea85e1ecbeaab94a28e60141577faa27b0173011 /pb.h
parent980f899dd5ca1b4201536cdb56a723ba7777d82c (diff)
Add support for POINTER type in extensions
Diffstat (limited to 'pb.h')
-rw-r--r--pb.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/pb.h b/pb.h
index b8a957ae..442d9658 100644
--- a/pb.h
+++ b/pb.h
@@ -456,9 +456,11 @@ struct pb_extension_s {
0, \
pb_membersize(st, m), 0, ptr}
+#define PB_OPTEXT_POINTER(tag, st, m, fd, ltype, ptr) \
+ PB_OPTIONAL_POINTER(tag, st, m, fd, ltype, ptr)
+
#define PB_OPTEXT_CALLBACK(tag, st, m, fd, ltype, ptr) \
- {tag, PB_ATYPE_CALLBACK | PB_HTYPE_OPTIONAL | ltype, \
- 0, 0, pb_membersize(st, m), 0, ptr}
+ PB_OPTIONAL_CALLBACK(tag, st, m, fd, ltype, ptr)
/* The mapping from protobuf types to LTYPEs is done using these macros. */
#define PB_LTYPE_MAP_BOOL PB_LTYPE_VARINT