diff options
Diffstat (limited to 'php/ext/google/protobuf/storage.c')
-rw-r--r-- | php/ext/google/protobuf/storage.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/php/ext/google/protobuf/storage.c b/php/ext/google/protobuf/storage.c index 56497f62..e94aa319 100644 --- a/php/ext/google/protobuf/storage.c +++ b/php/ext/google/protobuf/storage.c @@ -32,6 +32,8 @@ #include <protobuf.h> #include <Zend/zend.h> +#include "utf8.h" + // ----------------------------------------------------------------------------- // Native slot storage. // ----------------------------------------------------------------------------- @@ -210,7 +212,7 @@ CASE(ENUM, LONG, uint32_t) return; } default: - return EG(uninitialized_zval_ptr); + return; } } @@ -245,7 +247,7 @@ void native_slot_get_default(upb_fieldtype_t type, zval** cache TSRMLS_DC) { return; } default: - return EG(uninitialized_zval_ptr); + return; } } @@ -305,6 +307,7 @@ const zend_class_entry* field_type_class(const upb_fielddef* field TSRMLS_DC) { EnumDescriptor* desc = zend_object_store_get_object(desc_php TSRMLS_CC); return desc->klass; } + return NULL; } // ----------------------------------------------------------------------------- @@ -517,7 +520,7 @@ void layout_set(MessageLayout* layout, MessageHeader* header, // zval in properties table first. switch (type) { case UPB_TYPE_MESSAGE: { - upb_msgdef* msg = upb_fielddef_msgsubdef(field); + const upb_msgdef* msg = upb_fielddef_msgsubdef(field); zval* desc_php = get_def_obj(msg); Descriptor* desc = zend_object_store_get_object(desc_php TSRMLS_CC); ce = desc->klass; @@ -551,7 +554,7 @@ void layout_set(MessageLayout* layout, MessageHeader* header, upb_fieldtype_t type = upb_fielddef_type(field); zend_class_entry *ce = NULL; if (type == UPB_TYPE_MESSAGE) { - upb_msgdef* msg = upb_fielddef_msgsubdef(field); + const upb_msgdef* msg = upb_fielddef_msgsubdef(field); zval* desc_php = get_def_obj(msg); Descriptor* desc = zend_object_store_get_object(desc_php TSRMLS_CC); ce = desc->klass; |