diff options
author | Josh Haberman <jhaberman@gmail.com> | 2014-07-02 15:41:10 -0700 |
---|---|---|
committer | Josh Haberman <jhaberman@gmail.com> | 2014-07-02 15:41:10 -0700 |
commit | 47b5e0968aa0ec47f522ba357c159b2450645806 (patch) | |
tree | d8cd2e7d518b1d6572a6002843446c9e6ee8ef89 /upb/shim/shim.h | |
parent | 2d10fa33071d52d7a35ce3b13bc459cd16a0aa33 (diff) |
Sync from internal Google development.
Diffstat (limited to 'upb/shim/shim.h')
-rw-r--r-- | upb/shim/shim.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/upb/shim/shim.h b/upb/shim/shim.h index bc47bbb..0d090db 100644 --- a/upb/shim/shim.h +++ b/upb/shim/shim.h @@ -45,21 +45,21 @@ struct Shim { } // namespace upb -extern "C" { #endif +UPB_BEGIN_EXTERN_C // { + // 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); -#ifdef __cplusplus -} // extern "C" - -namespace upb { +UPB_END_EXTERN_C // } +#ifdef __cplusplus // C++ Wrappers. +namespace upb { inline bool Shim::Set(Handlers* h, const FieldDef* f, size_t ofs, int32_t hasbit) { return upb_shim_set(h, f, ofs, hasbit); @@ -68,9 +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 - +} // namespace upb #endif #endif // UPB_SHIM_H |