compatible to php < 7.3
This commit is contained in:
parent
b3845fa5f6
commit
c4f8e88776
|
@ -291,7 +291,8 @@ namespace php_arma
|
|||
ZVAL_LONG(&n_rows, native->n_rows);
|
||||
ZVAL_LONG(&n_cols, native->n_cols);
|
||||
to_string(native, &data);
|
||||
auto retval = zend_new_array(HT_MIN_SIZE);
|
||||
auto retval = reinterpret_cast<zend_array*>(emalloc(sizeof(zend_array)));
|
||||
zend_hash_init(retval, HT_MIN_SIZE, nullptr, ZVAL_PTR_DTOR, 0);
|
||||
zend_hash_str_add(retval, "nRows", sizeof("nRows") - 1, &n_rows);
|
||||
zend_hash_str_add(retval, "nCols", sizeof("nRows") - 1, &n_cols);
|
||||
zend_hash_str_add(retval, "data", sizeof("data") - 1, &data);
|
||||
|
|
Reference in New Issue
Block a user