summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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