diff --git a/kernels/ZendEngine3/main.h b/kernels/ZendEngine3/main.h index e6d3db109a..76846912d9 100644 --- a/kernels/ZendEngine3/main.h +++ b/kernels/ZendEngine3/main.h @@ -220,7 +220,7 @@ void zephir_gettype(zval *return_value, zval *arg); static inline int zephir_maybe_separate_zval(zval* z) { if (!Z_REFCOUNTED_P(z) || (Z_REFCOUNT_P(z) > 1 && !Z_ISREF_P(z))) { - if (!Z_IMMUTABLE_P(z)) { + if (!(Z_COPYABLE_P(z) && !Z_REFCOUNTED_P(z))) { Z_DELREF_P(z); } zval_copy_ctor_func(z); diff --git a/kernels/ZendEngine3/memory.c b/kernels/ZendEngine3/memory.c index 669838f69f..0e3e9bfcc0 100644 --- a/kernels/ZendEngine3/memory.c +++ b/kernels/ZendEngine3/memory.c @@ -602,7 +602,7 @@ void zephir_dump_memory_frame(zephir_memory_entry *active_memory) switch (Z_TYPE_P(var)) { case IS_NULL: fprintf(stderr, "value=NULL\n"); break; #ifdef ZEPHIR_ENABLE_64BITS - case IS_LONG: fprintf(stderr, "value=%lld\n", Z_LVAL_P(var)); break; + case IS_LONG: fprintf(stderr, "value=%lld\n", (long long int)Z_LVAL_P(var)); break; #else case IS_LONG: fprintf(stderr, "value=%ld\n", Z_LVAL_P(var)); break; #endif @@ -613,7 +613,7 @@ void zephir_dump_memory_frame(zephir_memory_entry *active_memory) case IS_OBJECT: fprintf(stderr, "value=object(%u), %s\n", Z_OBJ_HANDLE_P(var), ZSTR_VAL(Z_OBJCE_P(var)->name)); break; case IS_STRING: fprintf(stderr, "value=%s (%zu)\n", Z_STRVAL_P(var), Z_STRLEN_P(var)); break; #ifdef ZEPHIR_ENABLE_64BITS - case IS_RESOURCE: fprintf(stderr, "value=(resource)%lld\n", Z_LVAL_P(var)); break; + case IS_RESOURCE: fprintf(stderr, "value=(resource)%lld\n", (long long int)Z_LVAL_P(var)); break; #else case IS_RESOURCE: fprintf(stderr, "value=(resource)%ld\n", Z_LVAL_P(var)); break; #endif