Bug #54328 [Opn->Bgs]: $PHP_PREFIX/include/php/ext/standard/php_smart_str.h has error
Edit report at http://bugs.php.net/bug.php?id=54328&edit=1
ID: 54328
Updated by: cataphract@php.net
Reported by: zhangsilly at gmail dot com
Summary: $PHP_PREFIX/include/php/ext/standard/php_smart_str.h
has error
-Status: Open
+Status: Bogus
Type: Bug
Package: Compile Failure
Operating System: Windows & Linux
PHP Version: 5.3.6
Block user comment: N
Private report: N
New Comment:
SMART_STR_REALLOC expands to a function a function that returns void*. C
(but not C++) allows conversion of void* to any pointer type, so the
current code is correct. You're probably compiling your project as C++.
Previous Comments:
------------------------------------------------------------------------
[2011-03-21 03:21:50] zhangsilly at gmail dot com
Description:
------------
in the file $PHP_PREFIX/include/php/ext/standard/php_smart_str.h ,line
52,
should have a pointer conversion.
now the code is below:
#define SMART_STR_DO_REALLOC(d, what) \
(d)->c = SMART_STR_REALLOC((d)->c, (d)->a + 1, (what))
but any extensions include it cann't be compiled before change the code
above
like this, no matter the compiler is visual studio(2005 or 2008) or
gcc:
#define SMART_STR_DO_REALLOC(d, what) \
(d)->c = (char*) SMART_STR_REALLOC((d)->c, (d)->a + 1, (what))
everytime I change it myself.But event the newest PHP 5.3.6, the pointer
conversion is still absent.
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/bug.php?id=54328&edit=1
Thread (2 messages)