php7 php_str_to_str warning: assignment makes pointer from integer without a cast
| From: | Torsten Rosenberger | Date: | Wed, 08 Feb 2017 13:02:03 +0000 |
| Subject: | php7 php_str_to_str warning: assignment makes pointer from integer without a cast | ||
| Groups: | php.internals | ||
| Request: | Send a blank email to internals+get-98260@lists.php.net to get a copy of this message | ||
Hello
prehistory:
i tried to use php_str_to_str function to replace some character
insteed of use call_user_func with str_replace
in ext/standard/string.c
PHPAPI zend_string *php_str_to_str(char *haystack, size_t length, char
*needle, size_t needle_len, char *str, size_t str_len);
so i expect a zend_string as result ?
but when i build i got a warning: assignment makes pointer from integer
without a cast
buf = php_str_to_str(value,strlen(value),"y",1,"J",1);
^
buf is: zend_string *buf;
When buf is: int buf; i got no warning.
i found 2 examples which looks like i have done
ext/standard/var.c
win32/sendmail.c
Best Regards
Torsten