mirror of
https://github.com/php/php-src.git
synced 2026-03-29 03:32:20 +02:00
Constify to void build warning for C++ ext. [-Wwrite-strings]
Example (with v8js):
/builddir/build/BUILD/php-pecl-v8js-1.3.4/NTS/v8js_class.cc: In function 'void v8js_execute_script(zval*, v8js_script*, long int, long int, long int, zval**)':
/usr/include/php/Zend/zend.h:204:57: warning: ISO C++ forbids converting a string constant to 'char*' [-Wwrite-strings]
#define zend_bailout() _zend_bailout(__FILE__, __LINE__)
^
/builddir/build/BUILD/php-pecl-v8js-1.3.4/NTS/v8js_class.cc:633:3: note: in expansion of macro 'zend_bailout'
zend_bailout();
^~~~~~~~~~~~
This commit is contained in:
@@ -983,7 +983,7 @@ ZEND_COLD void zenderror(const char *error) /* {{{ */
|
||||
/* }}} */
|
||||
|
||||
BEGIN_EXTERN_C()
|
||||
ZEND_API ZEND_COLD void _zend_bailout(char *filename, uint32_t lineno) /* {{{ */
|
||||
ZEND_API ZEND_COLD void _zend_bailout(const char *filename, uint32_t lineno) /* {{{ */
|
||||
{
|
||||
|
||||
if (!EG(bailout)) {
|
||||
|
||||
@@ -225,7 +225,7 @@ void zend_register_standard_ini_entries(void);
|
||||
void zend_post_startup(void);
|
||||
void zend_set_utility_values(zend_utility_values *utility_values);
|
||||
|
||||
ZEND_API ZEND_COLD void _zend_bailout(char *filename, uint32_t lineno);
|
||||
ZEND_API ZEND_COLD void _zend_bailout(const char *filename, uint32_t lineno);
|
||||
|
||||
ZEND_API size_t zend_vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap);
|
||||
ZEND_API size_t zend_spprintf(char **message, size_t max_len, const char *format, ...) ZEND_ATTRIBUTE_FORMAT(printf, 3, 4);
|
||||
|
||||
Reference in New Issue
Block a user