Export upb methods required by Ruby service/method desc impls

The Ruby service descriptor & method descriptor implementation requires
these methods; export them so that they're callable from the Ruby FFI
implementation.
pull/15817/head
KJ Tsanaktsidis 10 months ago
parent 0ce48b30b5
commit 4367d72063
No known key found for this signature in database
GPG Key ID: 27CD40EB9B81C726
  1. 4
      upb/reflection/def_pool.h
  2. 15
      upb/reflection/method_def.h
  3. 11
      upb/reflection/service_def.h

@ -66,8 +66,8 @@ const upb_FieldDef* upb_DefPool_FindExtensionByNumber(const upb_DefPool* s,
const upb_MessageDef* m,
int32_t fieldnum);
const upb_ServiceDef* upb_DefPool_FindServiceByName(const upb_DefPool* s,
const char* name);
UPB_API const upb_ServiceDef* upb_DefPool_FindServiceByName(
const upb_DefPool* s, const char* name);
const upb_ServiceDef* upb_DefPool_FindServiceByNameWithSize(
const upb_DefPool* s, const char* name, size_t size);

@ -19,18 +19,19 @@
extern "C" {
#endif
bool upb_MethodDef_ClientStreaming(const upb_MethodDef* m);
UPB_API bool upb_MethodDef_ClientStreaming(const upb_MethodDef* m);
const char* upb_MethodDef_FullName(const upb_MethodDef* m);
bool upb_MethodDef_HasOptions(const upb_MethodDef* m);
int upb_MethodDef_Index(const upb_MethodDef* m);
const upb_MessageDef* upb_MethodDef_InputType(const upb_MethodDef* m);
const char* upb_MethodDef_Name(const upb_MethodDef* m);
const UPB_DESC(MethodOptions) * upb_MethodDef_Options(const upb_MethodDef* m);
UPB_API const upb_MessageDef* upb_MethodDef_InputType(const upb_MethodDef* m);
UPB_API const char* upb_MethodDef_Name(const upb_MethodDef* m);
UPB_API const UPB_DESC(MethodOptions) *
upb_MethodDef_Options(const upb_MethodDef* m);
const UPB_DESC(FeatureSet) *
upb_MethodDef_ResolvedFeatures(const upb_MethodDef* m);
const upb_MessageDef* upb_MethodDef_OutputType(const upb_MethodDef* m);
bool upb_MethodDef_ServerStreaming(const upb_MethodDef* m);
const upb_ServiceDef* upb_MethodDef_Service(const upb_MethodDef* m);
UPB_API const upb_MessageDef* upb_MethodDef_OutputType(const upb_MethodDef* m);
UPB_API bool upb_MethodDef_ServerStreaming(const upb_MethodDef* m);
UPB_API const upb_ServiceDef* upb_MethodDef_Service(const upb_MethodDef* m);
#ifdef __cplusplus
} /* extern "C" */

@ -19,16 +19,17 @@
extern "C" {
#endif
const upb_FileDef* upb_ServiceDef_File(const upb_ServiceDef* s);
UPB_API const upb_FileDef* upb_ServiceDef_File(const upb_ServiceDef* s);
const upb_MethodDef* upb_ServiceDef_FindMethodByName(const upb_ServiceDef* s,
const char* name);
const char* upb_ServiceDef_FullName(const upb_ServiceDef* s);
UPB_API const char* upb_ServiceDef_FullName(const upb_ServiceDef* s);
bool upb_ServiceDef_HasOptions(const upb_ServiceDef* s);
int upb_ServiceDef_Index(const upb_ServiceDef* s);
const upb_MethodDef* upb_ServiceDef_Method(const upb_ServiceDef* s, int i);
int upb_ServiceDef_MethodCount(const upb_ServiceDef* s);
UPB_API const upb_MethodDef* upb_ServiceDef_Method(const upb_ServiceDef* s,
int i);
UPB_API int upb_ServiceDef_MethodCount(const upb_ServiceDef* s);
const char* upb_ServiceDef_Name(const upb_ServiceDef* s);
const UPB_DESC(ServiceOptions) *
UPB_API const UPB_DESC(ServiceOptions) *
upb_ServiceDef_Options(const upb_ServiceDef* s);
const UPB_DESC(FeatureSet) *
upb_ServiceDef_ResolvedFeatures(const upb_ServiceDef* s);

Loading…
Cancel
Save