diff options
author | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-07 11:42:21 +0200 |
---|---|---|
committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-09-07 11:42:21 +0200 |
commit | f5dbebd82e642b1d1af462b486fc392ecff2c67a (patch) | |
tree | 59c9eba8521db0a339f6f6479777b5ee893a2e92 /sapi/phpdbg/phpdbg_list.c | |
parent | 85b5dc4711f6ce8b979ed60e3b60cf93225be32a (diff) | |
download | php-git-f5dbebd82e642b1d1af462b486fc392ecff2c67a.tar.gz |
Accept zend_string instead of zval in zend_compile_string
Diffstat (limited to 'sapi/phpdbg/phpdbg_list.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_list.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sapi/phpdbg/phpdbg_list.c b/sapi/phpdbg/phpdbg_list.c index d9b2fa00d5..0967e22f65 100644 --- a/sapi/phpdbg/phpdbg_list.c +++ b/sapi/phpdbg/phpdbg_list.c @@ -316,7 +316,7 @@ zend_op_array *phpdbg_init_compile_file(zend_file_handle *file, int type) { return op_array; } -zend_op_array *phpdbg_compile_string(zval *source_string, const char *filename) { +zend_op_array *phpdbg_compile_string(zend_string *source_string, const char *filename) { zend_string *fake_name; zend_op_array *op_array; phpdbg_file_source *dataptr; @@ -327,9 +327,9 @@ zend_op_array *phpdbg_compile_string(zval *source_string, const char *filename) return PHPDBG_G(compile_string)(source_string, filename); } - dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint32_t) * Z_STRLEN_P(source_string)); - dataptr->buf = estrndup(Z_STRVAL_P(source_string), Z_STRLEN_P(source_string)); - dataptr->len = Z_STRLEN_P(source_string); + dataptr = emalloc(sizeof(phpdbg_file_source) + sizeof(uint32_t) * ZSTR_LEN(source_string)); + dataptr->buf = estrndup(ZSTR_VAL(source_string), ZSTR_LEN(source_string)); + dataptr->len = ZSTR_LEN(source_string); dataptr->line[0] = 0; for (line = 0, bufptr = dataptr->buf - 1, endptr = dataptr->buf + dataptr->len; ++bufptr < endptr;) { if (*bufptr == '\n') { |