diff options
Diffstat (limited to 'php/ext/google/protobuf/storage.c')
-rw-r--r-- | php/ext/google/protobuf/storage.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/php/ext/google/protobuf/storage.c b/php/ext/google/protobuf/storage.c index 6318f88c..29a3db86 100644 --- a/php/ext/google/protobuf/storage.c +++ b/php/ext/google/protobuf/storage.c @@ -355,6 +355,19 @@ void native_slot_get_by_array(upb_fieldtype_t type, const void* memory, } } +void native_slot_get_by_map_key(upb_fieldtype_t type, const void* memory, + int length, CACHED_VALUE* cache TSRMLS_DC) { + switch (type) { + case UPB_TYPE_STRING: + case UPB_TYPE_BYTES: { + PHP_PROTO_ZVAL_STRINGL(CACHED_PTR_TO_ZVAL_PTR(cache), memory, length, 1); + return; + } + default: + native_slot_get(type, memory, cache TSRMLS_CC); + } +} + void native_slot_get_default(upb_fieldtype_t type, CACHED_VALUE* cache TSRMLS_DC) { switch (type) { |