|
|
|
@ -244,12 +244,12 @@ bool ObjCache_Get(const void *upb_obj, zval *val) { |
|
|
|
|
void NameMap_AddMessage(const upb_MessageDef *m) { |
|
|
|
|
char *k = GetPhpClassname(upb_MessageDef_File(m), upb_MessageDef_FullName(m), false); |
|
|
|
|
zend_hash_str_add_ptr(&PROTOBUF_G(name_msg_cache), k, strlen(k), (void*)m); |
|
|
|
|
char *k2 = GetPhpClassname(upb_MessageDef_File(m), upb_MessageDef_FullName(m), true); |
|
|
|
|
if (strcmp(k, k2) != 0) { |
|
|
|
|
if (IsPreviouslyUnreservedClassName(k)) { |
|
|
|
|
char *k2 = GetPhpClassname(upb_MessageDef_File(m), upb_MessageDef_FullName(m), true); |
|
|
|
|
zend_hash_str_add_ptr(&PROTOBUF_G(name_msg_cache), k2, strlen(k2), (void*)m); |
|
|
|
|
free(k2); |
|
|
|
|
} |
|
|
|
|
free(k); |
|
|
|
|
free(k2); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void NameMap_AddEnum(const upb_EnumDef *e) { |
|
|
|
|