diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2019-01-29 08:26:00 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-29 08:26:00 -0800 |
commit | 2b62fbce6734eb672ae6ff6fcf258bfff4267ae8 (patch) | |
tree | c39dd54ef29a0b6610ebd4794b1646c83c66357a /upb/pb | |
parent | c7870e0f77d6331babfdb89f8c83e4e0279b5e70 (diff) | |
parent | 3d931557907307ecc19b74e8f3188301b149e99a (diff) |
Merge pull request #145 from haberman/arrayapi
Generated code API changes for array and hazzers.
Diffstat (limited to 'upb/pb')
-rw-r--r-- | upb/pb/decoder.int.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/upb/pb/decoder.int.h b/upb/pb/decoder.int.h index 4032570..c9ad551 100644 --- a/upb/pb/decoder.int.h +++ b/upb/pb/decoder.int.h @@ -9,17 +9,10 @@ #include "upb/handlers.h" #include "upb/pb/decoder.h" #include "upb/sink.h" -#include "upb/structdefs.int.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) @@ -82,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 @@ -329,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_ */ |