mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Use zend_update_property_str() where appropriate
This prevent needless recomputation of the string length
This commit is contained in:
parent
875a43a42c
commit
0d013cd0d7
1 changed files with 4 additions and 4 deletions
|
@ -38,14 +38,14 @@ static void curlfile_ctor(INTERNAL_FUNCTION_PARAMETERS)
|
|||
Z_PARAM_STR_OR_NULL(postname)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
zend_update_property_string(curl_CURLFile_class, Z_OBJ_P(cf), "name", sizeof("name")-1, ZSTR_VAL(fname));
|
||||
zend_update_property_str(curl_CURLFile_class, Z_OBJ_P(cf), "name", sizeof("name")-1, fname);
|
||||
|
||||
if (mime) {
|
||||
zend_update_property_string(curl_CURLFile_class, Z_OBJ_P(cf), "mime", sizeof("mime")-1, ZSTR_VAL(mime));
|
||||
zend_update_property_str(curl_CURLFile_class, Z_OBJ_P(cf), "mime", sizeof("mime")-1, mime);
|
||||
}
|
||||
|
||||
if (postname) {
|
||||
zend_update_property_string(curl_CURLFile_class, Z_OBJ_P(cf), "postname", sizeof("postname")-1, ZSTR_VAL(postname));
|
||||
zend_update_property_str(curl_CURLFile_class, Z_OBJ_P(cf), "postname", sizeof("postname")-1, postname);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -82,7 +82,7 @@ static void curlfile_set_property(char *name, size_t name_len, INTERNAL_FUNCTION
|
|||
Z_PARAM_STR(arg)
|
||||
ZEND_PARSE_PARAMETERS_END();
|
||||
|
||||
zend_update_property_string(curl_CURLFile_class, Z_OBJ_P(ZEND_THIS), name, name_len, ZSTR_VAL(arg));
|
||||
zend_update_property_str(curl_CURLFile_class, Z_OBJ_P(ZEND_THIS), name, name_len, arg);
|
||||
}
|
||||
|
||||
/* {{{ Get file name */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue