Auto-generate files after cl/690751567

pull/18993/head
Protobuf Team Bot 5 months ago
parent 67ab5bd666
commit 0ad1d45e2e
  1. 13
      php/ext/google/protobuf/php-upb.c
  2. 6
      php/ext/google/protobuf/php-upb.h
  3. 13
      ruby/ext/google/protobuf_c/ruby-upb.c
  4. 6
      ruby/ext/google/protobuf_c/ruby-upb.h

@ -2969,7 +2969,7 @@ void upb_Arena_LogFree(const upb_Arena* arena) {
}
#endif // UPB_TRACING_ENABLED
static upb_ArenaRoot _upb_Arena_FindRoot(upb_Arena* a) {
static upb_ArenaRoot _upb_Arena_FindRoot(const upb_Arena* a) {
upb_ArenaInternal* ai = upb_Arena_Internal(a);
uintptr_t poc = upb_Atomic_Load(&ai->parent_or_count, memory_order_acquire);
while (_upb_Arena_IsTaggedPointer(poc)) {
@ -3243,7 +3243,8 @@ static void _upb_Arena_DoFuseArenaLists(upb_ArenaInternal* const parent,
upb_Atomic_Store(&parent->tail, parent_tail, memory_order_relaxed);
}
static upb_ArenaInternal* _upb_Arena_DoFuse(upb_Arena* a1, upb_Arena* a2,
static upb_ArenaInternal* _upb_Arena_DoFuse(const upb_Arena* a1,
const upb_Arena* a2,
uintptr_t* ref_delta) {
// `parent_or_count` has two distinct modes
// - parent pointer mode
@ -3315,7 +3316,7 @@ static bool _upb_Arena_FixupRefs(upb_ArenaInternal* new_root,
memory_order_relaxed);
}
bool upb_Arena_Fuse(upb_Arena* a1, upb_Arena* a2) {
bool upb_Arena_Fuse(const upb_Arena* a1, const upb_Arena* a2) {
if (a1 == a2) return true; // trivial fuse
#ifdef UPB_TRACING_ENABLED
@ -3342,7 +3343,7 @@ bool upb_Arena_Fuse(upb_Arena* a1, upb_Arena* a2) {
}
}
bool upb_Arena_IncRefFor(upb_Arena* a, const void* owner) {
bool upb_Arena_IncRefFor(const upb_Arena* a, const void* owner) {
upb_ArenaInternal* ai = upb_Arena_Internal(a);
if (_upb_ArenaInternal_HasInitialBlock(ai)) return false;
upb_ArenaRoot r;
@ -3361,7 +3362,9 @@ retry:
goto retry;
}
void upb_Arena_DecRefFor(upb_Arena* a, const void* owner) { upb_Arena_Free(a); }
void upb_Arena_DecRefFor(const upb_Arena* a, const void* owner) {
upb_Arena_Free((upb_Arena*)a);
}
void UPB_PRIVATE(_upb_Arena_SwapIn)(upb_Arena* des, const upb_Arena* src) {
upb_ArenaInternal* desi = upb_Arena_Internal(des);

@ -693,10 +693,10 @@ extern "C" {
UPB_API upb_Arena* upb_Arena_Init(void* mem, size_t n, upb_alloc* alloc);
UPB_API void upb_Arena_Free(upb_Arena* a);
UPB_API bool upb_Arena_Fuse(upb_Arena* a, upb_Arena* b);
UPB_API bool upb_Arena_Fuse(const upb_Arena* a, const upb_Arena* b);
bool upb_Arena_IncRefFor(upb_Arena* a, const void* owner);
void upb_Arena_DecRefFor(upb_Arena* a, const void* owner);
bool upb_Arena_IncRefFor(const upb_Arena* a, const void* owner);
void upb_Arena_DecRefFor(const upb_Arena* a, const void* owner);
size_t upb_Arena_SpaceAllocated(upb_Arena* a, size_t* fused_count);
uint32_t upb_Arena_DebugRefCount(upb_Arena* a);

@ -2969,7 +2969,7 @@ void upb_Arena_LogFree(const upb_Arena* arena) {
}
#endif // UPB_TRACING_ENABLED
static upb_ArenaRoot _upb_Arena_FindRoot(upb_Arena* a) {
static upb_ArenaRoot _upb_Arena_FindRoot(const upb_Arena* a) {
upb_ArenaInternal* ai = upb_Arena_Internal(a);
uintptr_t poc = upb_Atomic_Load(&ai->parent_or_count, memory_order_acquire);
while (_upb_Arena_IsTaggedPointer(poc)) {
@ -3243,7 +3243,8 @@ static void _upb_Arena_DoFuseArenaLists(upb_ArenaInternal* const parent,
upb_Atomic_Store(&parent->tail, parent_tail, memory_order_relaxed);
}
static upb_ArenaInternal* _upb_Arena_DoFuse(upb_Arena* a1, upb_Arena* a2,
static upb_ArenaInternal* _upb_Arena_DoFuse(const upb_Arena* a1,
const upb_Arena* a2,
uintptr_t* ref_delta) {
// `parent_or_count` has two distinct modes
// - parent pointer mode
@ -3315,7 +3316,7 @@ static bool _upb_Arena_FixupRefs(upb_ArenaInternal* new_root,
memory_order_relaxed);
}
bool upb_Arena_Fuse(upb_Arena* a1, upb_Arena* a2) {
bool upb_Arena_Fuse(const upb_Arena* a1, const upb_Arena* a2) {
if (a1 == a2) return true; // trivial fuse
#ifdef UPB_TRACING_ENABLED
@ -3342,7 +3343,7 @@ bool upb_Arena_Fuse(upb_Arena* a1, upb_Arena* a2) {
}
}
bool upb_Arena_IncRefFor(upb_Arena* a, const void* owner) {
bool upb_Arena_IncRefFor(const upb_Arena* a, const void* owner) {
upb_ArenaInternal* ai = upb_Arena_Internal(a);
if (_upb_ArenaInternal_HasInitialBlock(ai)) return false;
upb_ArenaRoot r;
@ -3361,7 +3362,9 @@ retry:
goto retry;
}
void upb_Arena_DecRefFor(upb_Arena* a, const void* owner) { upb_Arena_Free(a); }
void upb_Arena_DecRefFor(const upb_Arena* a, const void* owner) {
upb_Arena_Free((upb_Arena*)a);
}
void UPB_PRIVATE(_upb_Arena_SwapIn)(upb_Arena* des, const upb_Arena* src) {
upb_ArenaInternal* desi = upb_Arena_Internal(des);

@ -695,10 +695,10 @@ extern "C" {
UPB_API upb_Arena* upb_Arena_Init(void* mem, size_t n, upb_alloc* alloc);
UPB_API void upb_Arena_Free(upb_Arena* a);
UPB_API bool upb_Arena_Fuse(upb_Arena* a, upb_Arena* b);
UPB_API bool upb_Arena_Fuse(const upb_Arena* a, const upb_Arena* b);
bool upb_Arena_IncRefFor(upb_Arena* a, const void* owner);
void upb_Arena_DecRefFor(upb_Arena* a, const void* owner);
bool upb_Arena_IncRefFor(const upb_Arena* a, const void* owner);
void upb_Arena_DecRefFor(const upb_Arena* a, const void* owner);
size_t upb_Arena_SpaceAllocated(upb_Arena* a, size_t* fused_count);
uint32_t upb_Arena_DebugRefCount(upb_Arena* a);

Loading…
Cancel
Save