Auto-generate files after cl/625324587

pull/16526/head
Protobuf Team Bot 7 months ago
parent 622f291606
commit 55696adb8b
  1. 11
      php/ext/google/protobuf/php-upb.c
  2. 3
      php/ext/google/protobuf/php-upb.h
  3. 11
      ruby/ext/google/protobuf_c/ruby-upb.c
  4. 3
      ruby/ext/google/protobuf_c/ruby-upb.h

@ -14651,6 +14651,17 @@ const upb_MiniTableExtension* _upb_FileDef_ExtensionMiniTable(
return f->ext_layouts[i];
}
// Note: Import cycles are not allowed so this will terminate.
bool upb_FileDef_Resolves(const upb_FileDef* f, const char* path) {
if (!strcmp(f->name, path)) return true;
for (int i = 0; i < upb_FileDef_PublicDependencyCount(f); i++) {
const upb_FileDef* dep = upb_FileDef_PublicDependency(f, i);
if (upb_FileDef_Resolves(dep, path)) return true;
}
return false;
}
static char* strviewdup(upb_DefBuilder* ctx, upb_StringView view) {
char* ret = upb_strdup2(view.data, view.size, _upb_DefBuilder_Arena(ctx));
if (!ret) _upb_DefBuilder_OomErr(ctx);

@ -11566,6 +11566,9 @@ int upb_FileDef_TopLevelMessageCount(const upb_FileDef* f);
const upb_FileDef* upb_FileDef_WeakDependency(const upb_FileDef* f, int i);
int upb_FileDef_WeakDependencyCount(const upb_FileDef* f);
// Returns whether |symbol| is transitively included by |f|
bool upb_FileDef_Resolves(const upb_FileDef* f, const char* symbol);
#ifdef __cplusplus
} /* extern "C" */
#endif

@ -14142,6 +14142,17 @@ const upb_MiniTableExtension* _upb_FileDef_ExtensionMiniTable(
return f->ext_layouts[i];
}
// Note: Import cycles are not allowed so this will terminate.
bool upb_FileDef_Resolves(const upb_FileDef* f, const char* path) {
if (!strcmp(f->name, path)) return true;
for (int i = 0; i < upb_FileDef_PublicDependencyCount(f); i++) {
const upb_FileDef* dep = upb_FileDef_PublicDependency(f, i);
if (upb_FileDef_Resolves(dep, path)) return true;
}
return false;
}
static char* strviewdup(upb_DefBuilder* ctx, upb_StringView view) {
char* ret = upb_strdup2(view.data, view.size, _upb_DefBuilder_Arena(ctx));
if (!ret) _upb_DefBuilder_OomErr(ctx);

@ -11968,6 +11968,9 @@ int upb_FileDef_TopLevelMessageCount(const upb_FileDef* f);
const upb_FileDef* upb_FileDef_WeakDependency(const upb_FileDef* f, int i);
int upb_FileDef_WeakDependencyCount(const upb_FileDef* f);
// Returns whether |symbol| is transitively included by |f|
bool upb_FileDef_Resolves(const upb_FileDef* f, const char* symbol);
#ifdef __cplusplus
} /* extern "C" */
#endif

Loading…
Cancel
Save