Fix for C++ inclusion of decoder.int.h.

pull/13171/head
Josh Haberman 6 years ago
parent 22ad7121c2
commit b07fcde013
  1. 14
      upb/pb/decoder.int.h

@ -11,14 +11,8 @@
#include "upb/sink.h" #include "upb/sink.h"
#include "upb/table.int.h" #include "upb/table.int.h"
/* C++ names are not actually used since this type isn't exposed to users. */ #ifndef __cplusplus
#ifdef __cplusplus
namespace upb {
namespace pb {
class MessageGroup;
} /* namespace pb */
} /* namespace upb */
#endif
UPB_DECLARE_DERIVED_TYPE(upb::pb::MessageGroup, upb::RefCounted, UPB_DECLARE_DERIVED_TYPE(upb::pb::MessageGroup, upb::RefCounted,
mgroup, upb_refcounted) mgroup, upb_refcounted)
@ -81,7 +75,7 @@ typedef enum {
#define OP_MAX OP_HALT #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 /* Method group; represents a set of decoder methods that had their code
* emitted together, and must therefore be freed together. Immutable once * 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; } #define CHECK_RETURN(x) { int32_t ret = x; if (ret >= 0) return ret; }
#endif /* __cplusplus */
#endif /* UPB_DECODER_INT_H_ */ #endif /* UPB_DECODER_INT_H_ */

Loading…
Cancel
Save