diff options
author | Joshua Haberman <jhaberman@gmail.com> | 2015-06-03 14:35:27 -0700 |
---|---|---|
committer | Joshua Haberman <jhaberman@gmail.com> | 2015-06-03 14:35:27 -0700 |
commit | 97eeb570225bb2f1060f4eff18ba664e129767d2 (patch) | |
tree | 6a2d282c3c7910263241e03f41be23c6a6cda710 /upb/shim/shim.h | |
parent | 6650b3c6527c17965adf7239850857a10d56ba62 (diff) | |
parent | 919fea438a5ac5366684cfa26d2bb3d17519cb60 (diff) |
Merge pull request #27 from haberman/c89
Ported upb to C89, for greater portability.
Diffstat (limited to 'upb/shim/shim.h')
-rw-r--r-- | upb/shim/shim.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/upb/shim/shim.h b/upb/shim/shim.h index 0d090db..0ccd6fb 100644 --- a/upb/shim/shim.h +++ b/upb/shim/shim.h @@ -32,33 +32,33 @@ namespace upb { struct Shim { typedef upb_shim_data Data; - // Sets a handler for the given field that writes the value to the given - // offset and, if hasbit >= 0, sets a bit at the given bit offset. Returns - // true if the handler was set successfully. + /* Sets a handler for the given field that writes the value to the given + * offset and, if hasbit >= 0, sets a bit at the given bit offset. Returns + * true if the handler was set successfully. */ static bool Set(Handlers *h, const FieldDef *f, size_t ofs, int32_t hasbit); - // If this handler is a shim, returns the corresponding upb::Shim::Data and - // stores the type in "type". Otherwise returns NULL. + /* If this handler is a shim, returns the corresponding upb::Shim::Data and + * stores the type in "type". Otherwise returns NULL. */ static const Data* GetData(const Handlers* h, Handlers::Selector s, FieldDef::Type* type); }; -} // namespace upb +} /* namespace upb */ #endif -UPB_BEGIN_EXTERN_C // { +UPB_BEGIN_EXTERN_C -// C API. +/* C API. */ bool upb_shim_set(upb_handlers *h, const upb_fielddef *f, size_t offset, int32_t hasbit); const upb_shim_data *upb_shim_getdata(const upb_handlers *h, upb_selector_t s, upb_fieldtype_t *type); -UPB_END_EXTERN_C // } +UPB_END_EXTERN_C #ifdef __cplusplus -// C++ Wrappers. +/* C++ Wrappers. */ namespace upb { inline bool Shim::Set(Handlers* h, const FieldDef* f, size_t ofs, int32_t hasbit) { @@ -68,7 +68,7 @@ inline const Shim::Data* Shim::GetData(const Handlers* h, Handlers::Selector s, FieldDef::Type* type) { return upb_shim_getdata(h, s, type); } -} // namespace upb +} /* namespace upb */ #endif -#endif // UPB_SHIM_H +#endif /* UPB_SHIM_H */ |