summaryrefslogtreecommitdiff
path: root/upb
diff options
context:
space:
mode:
authorJosh Haberman <jhaberman@gmail.com>2019-01-28 12:31:33 -0800
committerJosh Haberman <jhaberman@gmail.com>2019-01-28 12:31:33 -0800
commitb07fcde013d1a381d7ba03ac0a3ab47ca22c95f2 (patch)
treed5ba71e43f053f801d45586a3b67450d5f98d271 /upb
parent22ad7121c2792e3c473776c22f8e7a63a0116d33 (diff)
Fix for C++ inclusion of decoder.int.h.
Diffstat (limited to 'upb')
-rw-r--r--upb/pb/decoder.int.h14
1 files changed, 5 insertions, 9 deletions
diff --git a/upb/pb/decoder.int.h b/upb/pb/decoder.int.h
index f02bdd5..c9ad551 100644
--- a/upb/pb/decoder.int.h
+++ b/upb/pb/decoder.int.h
@@ -11,14 +11,8 @@
#include "upb/sink.h"
#include "upb/table.int.h"
-/* C++ names are not actually used since this type isn't exposed to users. */
-#ifdef __cplusplus
-namespace upb {
-namespace pb {
-class MessageGroup;
-} /* namespace pb */
-} /* namespace upb */
-#endif
+#ifndef __cplusplus
+
UPB_DECLARE_DERIVED_TYPE(upb::pb::MessageGroup, upb::RefCounted,
mgroup, upb_refcounted)
@@ -81,7 +75,7 @@ typedef enum {
#define OP_MAX OP_HALT
-UPB_INLINE opcode getop(uint32_t instr) { return instr & 0xff; }
+UPB_INLINE opcode getop(uint32_t instr) { return (opcode)(instr & 0xff); }
/* Method group; represents a set of decoder methods that had their code
* emitted together, and must therefore be freed together. Immutable once
@@ -328,4 +322,6 @@ UPB_INLINE void upb_pbdecoder_unpackdispatch(uint64_t dispatch, uint64_t *ofs,
#define CHECK_RETURN(x) { int32_t ret = x; if (ret >= 0) return ret; }
+#endif /* __cplusplus */
+
#endif /* UPB_DECODER_INT_H_ */
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback