Package: zeroc-ice Severity: normal Tags: patch Hi,
I have pulled upstream patch to fix FTBFS with PHP 5.4 and uploaded NMU to DELAYED/5. You can find the patch used attached to this message. Any upload with higher version will cancel the NMU, but please merge PHP 5.4 fixes before uploading a new version. If you don't really care then just wait 5 days :) O. -- System Information: Debian Release: 6.0.4 APT prefers stable-updates APT policy: (500, 'stable-updates'), (500, 'stable') Architecture: amd64 (x86_64) Kernel: Linux 2.6.32-5-amd64 (SMP w/4 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash
diff --git a/debian/changelog b/debian/changelog index 39fdb57..2dd9906 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,12 @@ +zeroc-ice (3.4.2-7.2) unstable; urgency=low + + * Non-maintainer upload + * Fix FTBFS with PHP 5.4 (Closes: #662621) + + Pull PHP 5.4 patch from 'http://www.zeroc.com/forums/patches/5603- + ice-php-php-5-4-patch.html' (Courtesy of Fedora and ZeroC ICE team) + + -- Ondřej Surý <ond...@debian.org> Tue, 13 Mar 2012 17:07:07 +0100 + zeroc-ice (3.4.2-7.1) unstable; urgency=low * Non-maintainer upload diff --git a/debian/patches/php5.4-transition.patch b/debian/patches/php5.4-transition.patch new file mode 100644 index 0000000..c323127 --- /dev/null +++ b/debian/patches/php5.4-transition.patch @@ -0,0 +1,723 @@ +--- a/php/src/IcePHP/Communicator.cpp ++++ b/php/src/IcePHP/Communicator.cpp +@@ -716,7 +716,8 @@ handleFreeStorage(void* p TSRMLS_DC) + { + Wrapper<CommunicatorInfoIPtr>* obj = static_cast<Wrapper<CommunicatorInfoIPtr>*>(p); + delete obj->ptr; +- zend_objects_free_object_storage(static_cast<zend_object*>(p) TSRMLS_CC); ++ zend_object_std_dtor(static_cast<zend_object*>(p) TSRMLS_CC); ++ efree(p); + } + + #ifdef _WIN32 +@@ -834,6 +835,7 @@ ZEND_FUNCTION(Ice_initialize) + + Ice::StringSeq seq; + Ice::InitializationData initData; ++ zval* zvargs = 0; + zval* zvinit = 0; + + // +@@ -853,6 +855,7 @@ ZEND_FUNCTION(Ice_initialize) + { + RETURN_NULL(); + } ++ zvargs = *args[0]; + hasArgs = true; + if(ZEND_NUM_ARGS() > 1) + { +@@ -913,6 +916,15 @@ ZEND_FUNCTION(Ice_initialize) + { + RETURN_NULL(); + } ++ ++ if(zvargs && PZVAL_IS_REF(zvargs)) ++ { ++ zval_dtor(zvargs); ++ if(!createStringArray(zvargs, seq TSRMLS_CC)) ++ { ++ RETURN_NULL(); ++ } ++ } + } + + ZEND_FUNCTION(Ice_register) +@@ -1092,11 +1104,11 @@ ZEND_FUNCTION(Ice_getProperties) + // + // Predefined methods for Communicator. + // +-static function_entry _interfaceMethods[] = ++static zend_function_entry _interfaceMethods[] = + { + {0, 0, 0} + }; +-static function_entry _classMethods[] = ++static zend_function_entry _classMethods[] = + { + ZEND_ME(Ice_Communicator, __construct, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_CTOR) + ZEND_ME(Ice_Communicator, destroy, NULL, ZEND_ACC_PUBLIC) +--- a/php/src/IcePHP/Communicator.h ++++ b/php/src/IcePHP/Communicator.h +@@ -25,24 +25,6 @@ ZEND_FUNCTION(Ice_find); + ZEND_FUNCTION(Ice_getProperties); + } + +-#define ICEPHP_COMMUNICATOR_FUNCTIONS \ +- ZEND_FE(Ice_initialize, NULL) \ +- ZEND_FE(Ice_register, NULL) \ +- ZEND_FE(Ice_unregister, NULL) \ +- ZEND_FE(Ice_find, NULL) \ +- ZEND_FE(Ice_getProperties, NULL) +- +-#ifdef ICEPHP_USE_NAMESPACES +-# define ICEPHP_COMMUNICATOR_NS_FUNCTIONS \ +- ZEND_NS_FALIAS("Ice", initialize, Ice_initialize, NULL) \ +- ZEND_NS_FALIAS("Ice", register, Ice_register, NULL) \ +- ZEND_NS_FALIAS("Ice", unregister, Ice_unregister, NULL) \ +- ZEND_NS_FALIAS("Ice", find, Ice_find, NULL) \ +- ZEND_NS_FALIAS("Ice", getProperties, Ice_getProperties, NULL) +-#else +-# define ICEPHP_COMMUNICATOR_NS_FUNCTIONS +-#endif +- + namespace IcePHP + { + +--- a/php/src/IcePHP/Connection.cpp ++++ b/php/src/IcePHP/Connection.cpp +@@ -236,7 +236,8 @@ handleConnectionFreeStorage(void* p TSRM + { + Wrapper<Ice::ConnectionPtr>* obj = static_cast<Wrapper<Ice::ConnectionPtr>*>(p); + delete obj->ptr; +- zend_objects_free_object_storage(static_cast<zend_object*>(p) TSRMLS_CC); ++ zend_object_std_dtor(static_cast<zend_object*>(p) TSRMLS_CC); ++ efree(p); + } + + #ifdef _WIN32 +@@ -271,11 +272,11 @@ handleConnectionCompare(zval* zobj1, zva + // + // Predefined methods for Connection. + // +-static function_entry _interfaceMethods[] = ++static zend_function_entry _interfaceMethods[] = + { + {0, 0, 0} + }; +-static function_entry _connectionClassMethods[] = ++static zend_function_entry _connectionClassMethods[] = + { + ZEND_ME(Ice_Connection, __construct, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_CTOR) + ZEND_ME(Ice_Connection, __toString, NULL, ZEND_ACC_PUBLIC) +@@ -297,7 +298,7 @@ ZEND_METHOD(Ice_ConnectionInfo, __constr + // + // Predefined methods for ConnectionInfo. + // +-static function_entry _connectionInfoClassMethods[] = ++static zend_function_entry _connectionInfoClassMethods[] = + { + ZEND_ME(Ice_ConnectionInfo, __construct, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_CTOR) + {0, 0, 0} +@@ -329,7 +330,8 @@ handleConnectionInfoFreeStorage(void* p + { + Wrapper<Ice::ConnectionInfoPtr>* obj = static_cast<Wrapper<Ice::ConnectionInfoPtr>*>(p); + delete obj->ptr; +- zend_objects_free_object_storage(static_cast<zend_object*>(p) TSRMLS_CC); ++ zend_object_std_dtor(static_cast<zend_object*>(p) TSRMLS_CC); ++ efree(p); + } + + bool +--- a/php/src/IcePHP/Endpoint.cpp ++++ b/php/src/IcePHP/Endpoint.cpp +@@ -115,7 +115,8 @@ handleEndpointFreeStorage(void* p TSRMLS + { + Wrapper<Ice::EndpointPtr>* obj = static_cast<Wrapper<Ice::EndpointPtr>*>(p); + delete obj->ptr; +- zend_objects_free_object_storage(static_cast<zend_object*>(p) TSRMLS_CC); ++ zend_object_std_dtor(static_cast<zend_object*>(p) TSRMLS_CC); ++ efree(p); + } + + ZEND_METHOD(Ice_EndpointInfo, __construct) +@@ -213,10 +214,11 @@ handleEndpointInfoFreeStorage(void* p TS + { + Wrapper<Ice::EndpointInfoPtr>* obj = static_cast<Wrapper<Ice::EndpointInfoPtr>*>(p); + delete obj->ptr; +- zend_objects_free_object_storage(static_cast<zend_object*>(p) TSRMLS_CC); ++ zend_object_std_dtor(static_cast<zend_object*>(p) TSRMLS_CC); ++ efree(p); + } + +-static function_entry _interfaceMethods[] = ++static zend_function_entry _interfaceMethods[] = + { + {0, 0, 0} + }; +@@ -224,7 +226,7 @@ static function_entry _interfaceMethods[ + // + // Predefined methods for Endpoint. + // +-static function_entry _endpointMethods[] = ++static zend_function_entry _endpointMethods[] = + { + ZEND_ME(Ice_Endpoint, __construct, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_CTOR) + ZEND_ME(Ice_Endpoint, __toString, NULL, ZEND_ACC_PUBLIC) +@@ -236,7 +238,7 @@ static function_entry _endpointMethods[] + // + // Predefined methods for EndpointInfo. + // +-static function_entry _endpointInfoMethods[] = ++static zend_function_entry _endpointInfoMethods[] = + { + ZEND_ME(Ice_EndpointInfo, __construct, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_CTOR) + ZEND_ME(Ice_EndpointInfo, type, NULL, ZEND_ACC_PUBLIC) +--- a/php/src/IcePHP/Init.cpp ++++ b/php/src/IcePHP/Init.cpp +@@ -22,10 +22,73 @@ using namespace IcePHP; + + ZEND_DECLARE_MODULE_GLOBALS(ice) + ++ZEND_BEGIN_ARG_INFO(Ice_initialize_arginfo, 1) ++ZEND_END_ARG_INFO() ++ ++ZEND_BEGIN_ARG_INFO(Ice_createProperties_arginfo, 1) ++ZEND_END_ARG_INFO() ++ ++#define ICEPHP_COMMUNICATOR_FUNCTIONS \ ++ ZEND_FE(Ice_initialize, Ice_initialize_arginfo) \ ++ ZEND_FE(Ice_register, NULL) \ ++ ZEND_FE(Ice_unregister, NULL) \ ++ ZEND_FE(Ice_find, NULL) \ ++ ZEND_FE(Ice_getProperties, NULL) ++ ++#ifdef ICEPHP_USE_NAMESPACES ++# define ICEPHP_COMMUNICATOR_NS_FUNCTIONS \ ++ ZEND_NS_FALIAS("Ice", initialize, Ice_initialize, Ice_initialize_arginfo) \ ++ ZEND_NS_FALIAS("Ice", register, Ice_register, NULL) \ ++ ZEND_NS_FALIAS("Ice", unregister, Ice_unregister, NULL) \ ++ ZEND_NS_FALIAS("Ice", find, Ice_find, NULL) \ ++ ZEND_NS_FALIAS("Ice", getProperties, Ice_getProperties, NULL) ++#else ++# define ICEPHP_COMMUNICATOR_NS_FUNCTIONS ++#endif ++ ++#define ICEPHP_OPERATION_FUNCTIONS \ ++ ZEND_FE(IcePHP_defineOperation, NULL) ++ ++#define ICEPHP_PROPERTIES_FUNCTIONS \ ++ ZEND_FE(Ice_createProperties, Ice_createProperties_arginfo) ++ ++#ifdef ICEPHP_USE_NAMESPACES ++# define ICEPHP_PROPERTIES_NS_FUNCTIONS \ ++ ZEND_NS_FALIAS("Ice", createProperties, Ice_createProperties, Ice_createProperties_arginfo) ++#else ++# define ICEPHP_PROPERTIES_NS_FUNCTIONS ++#endif ++ ++#define ICEPHP_TYPE_FUNCTIONS \ ++ ZEND_FE(IcePHP_defineEnum, NULL) \ ++ ZEND_FE(IcePHP_defineStruct, NULL) \ ++ ZEND_FE(IcePHP_defineSequence, NULL) \ ++ ZEND_FE(IcePHP_defineDictionary, NULL) \ ++ ZEND_FE(IcePHP_defineProxy, NULL) \ ++ ZEND_FE(IcePHP_declareClass, NULL) \ ++ ZEND_FE(IcePHP_defineClass, NULL) \ ++ ZEND_FE(IcePHP_defineException, NULL) \ ++ ZEND_FE(IcePHP_stringify, NULL) \ ++ ZEND_FE(IcePHP_stringifyException, NULL) ++ ++#define ICEPHP_UTIL_FUNCTIONS \ ++ ZEND_FE(Ice_stringVersion, NULL) \ ++ ZEND_FE(Ice_intVersion, NULL) \ ++ ZEND_FE(Ice_generateUUID, NULL) ++ ++#ifdef ICEPHP_USE_NAMESPACES ++# define ICEPHP_UTIL_NS_FUNCTIONS \ ++ ZEND_NS_FALIAS("Ice", stringVersion, Ice_stringVersion, NULL) \ ++ ZEND_NS_FALIAS("Ice", intVersion, Ice_intVersion, NULL) \ ++ ZEND_NS_FALIAS("Ice", generateUUID, Ice_generateUUID, NULL) ++#else ++# define ICEPHP_UTIL_NS_FUNCTIONS ++#endif ++ + // + // Entries for all global functions. + // +-function_entry ice_functions[] = ++zend_function_entry ice_functions[] = + { + ICEPHP_COMMUNICATOR_FUNCTIONS + ICEPHP_COMMUNICATOR_NS_FUNCTIONS +--- a/php/src/IcePHP/Logger.cpp ++++ b/php/src/IcePHP/Logger.cpp +@@ -210,7 +210,8 @@ handleFreeStorage(void* p TSRMLS_DC) + { + Wrapper<Ice::LoggerPtr>* obj = static_cast<Wrapper<Ice::LoggerPtr>*>(p); + delete obj->ptr; +- zend_objects_free_object_storage(static_cast<zend_object*>(p) TSRMLS_CC); ++ zend_object_std_dtor(static_cast<zend_object*>(p) TSRMLS_CC); ++ efree(p); + } + + #ifdef _WIN32 +@@ -226,11 +227,11 @@ handleClone(zval* zv TSRMLS_DC) + // + // Predefined methods for Logger. + // +-static function_entry _interfaceMethods[] = ++static zend_function_entry _interfaceMethods[] = + { + {0, 0, 0} + }; +-static function_entry _classMethods[] = ++static zend_function_entry _classMethods[] = + { + ZEND_ME(Ice_Logger, __construct, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_CTOR) + ZEND_ME(Ice_Logger, __toString, NULL, ZEND_ACC_PUBLIC) +--- a/php/src/IcePHP/Operation.cpp ++++ b/php/src/IcePHP/Operation.cpp +@@ -218,7 +218,7 @@ IcePHP::OperationI::~OperationI() + if(_zendFunction) + { + delete []_zendFunction->arg_info; +- efree(_zendFunction->function_name); ++ efree(const_cast<char*>(_zendFunction->function_name)); + efree(_zendFunction); + } + } +@@ -238,12 +238,16 @@ IcePHP::OperationI::function() + for(p = inParams.begin(); p != inParams.end(); ++p, ++i) + { + getArgInfo(argInfo[i], *p, false); ++#if PHP_VERSION_ID < 50400 + argInfo[i].required_num_args = static_cast<zend_uint>(numParams); ++#endif + } + for(p = outParams.begin(); p != outParams.end(); ++p, ++i) + { + getArgInfo(argInfo[i], *p, true); ++#if PHP_VERSION_ID < 50400 + argInfo[i].required_num_args = static_cast<zend_uint>(numParams); ++#endif + } + + string fixed = fixIdent(name); +@@ -255,9 +259,11 @@ IcePHP::OperationI::function() + _zendFunction->prototype = 0; + _zendFunction->num_args = static_cast<zend_uint>(numParams); + _zendFunction->arg_info = argInfo; +- _zendFunction->pass_rest_by_reference = 0; + _zendFunction->required_num_args = _zendFunction->num_args; ++#if PHP_VERSION_ID < 50400 ++ _zendFunction->pass_rest_by_reference = 0; + _zendFunction->return_reference = 0; ++#endif + _zendFunction->handler = ZEND_FN(IcePHP_Operation_call); + } + +@@ -293,15 +299,16 @@ IcePHP::OperationI::getArgInfo(zend_arg_ + arg.name = 0; + arg.class_name = 0; + arg.allow_null = 1; +- if(SequenceInfoPtr::dynamicCast(info) || DictionaryInfoPtr::dynamicCast(info)) +- { +- arg.array_type_hint = 1; +- } +- else +- { +- arg.array_type_hint = 0; +- } ++ ++ const bool isArray = SequenceInfoPtr::dynamicCast(info) || DictionaryInfoPtr::dynamicCast(info); ++ ++#if PHP_VERSION_ID < 50400 ++ arg.array_type_hint = isArray ? 1 : 0; + arg.return_reference = 0; ++#else ++ arg.type_hint = isArray ? IS_ARRAY : 0; ++#endif ++ + arg.pass_by_reference = out ? 1 : 0; + } + +--- a/php/src/IcePHP/Operation.h ++++ b/php/src/IcePHP/Operation.h +@@ -20,9 +20,6 @@ extern "C" + ZEND_FUNCTION(IcePHP_defineOperation); + } + +-#define ICEPHP_OPERATION_FUNCTIONS \ +- ZEND_FE(IcePHP_defineOperation, NULL) +- + namespace IcePHP + { + +--- a/php/src/IcePHP/Properties.cpp ++++ b/php/src/IcePHP/Properties.cpp +@@ -493,7 +493,8 @@ handleFreeStorage(void* p TSRMLS_DC) + { + Wrapper<Ice::PropertiesPtr>* obj = static_cast<Wrapper<Ice::PropertiesPtr>*>(p); + delete obj->ptr; +- zend_objects_free_object_storage(static_cast<zend_object*>(p) TSRMLS_CC); ++ zend_object_std_dtor(static_cast<zend_object*>(p) TSRMLS_CC); ++ efree(p); + } + + #ifdef _WIN32 +@@ -589,11 +590,11 @@ ZEND_FUNCTION(Ice_createProperties) + // + // Predefined methods for Properties. + // +-static function_entry _interfaceMethods[] = ++static zend_function_entry _interfaceMethods[] = + { + {0, 0, 0} + }; +-static function_entry _classMethods[] = ++static zend_function_entry _classMethods[] = + { + ZEND_ME(Ice_Properties, __construct, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_CTOR) + ZEND_ME(Ice_Properties, __toString, NULL, ZEND_ACC_PUBLIC) +--- a/php/src/IcePHP/Properties.h ++++ b/php/src/IcePHP/Properties.h +@@ -20,16 +20,6 @@ extern "C" + ZEND_FUNCTION(Ice_createProperties); + } + +-#define ICEPHP_PROPERTIES_FUNCTIONS \ +- ZEND_FE(Ice_createProperties, NULL) +- +-#ifdef ICEPHP_USE_NAMESPACES +-# define ICEPHP_PROPERTIES_NS_FUNCTIONS \ +- ZEND_NS_FALIAS("Ice", createProperties, Ice_createProperties, NULL) +-#else +-# define ICEPHP_PROPERTIES_NS_FUNCTIONS +-#endif +- + namespace IcePHP + { + +--- a/php/src/IcePHP/Proxy.cpp ++++ b/php/src/IcePHP/Proxy.cpp +@@ -59,7 +59,11 @@ extern "C" + static zend_object_value handleAlloc(zend_class_entry* TSRMLS_DC); + static void handleFreeStorage(void* TSRMLS_DC); + static zend_object_value handleClone(zval* TSRMLS_DC); ++#if PHP_VERSION_ID < 50400 + static union _zend_function* handleGetMethod(zval**, char*, int TSRMLS_DC); ++#else ++static union _zend_function* handleGetMethod(zval**, char*, int, const _zend_literal* TSRMLS_DC); ++#endif + static int handleCompare(zval*, zval* TSRMLS_DC); + } + +@@ -1418,7 +1422,8 @@ handleFreeStorage(void* p TSRMLS_DC) + { + Wrapper<ProxyPtr>* obj = static_cast<Wrapper<ProxyPtr>*>(p); + delete obj->ptr; +- zend_objects_free_object_storage(static_cast<zend_object*>(p) TSRMLS_CC); ++ zend_object_std_dtor(static_cast<zend_object*>(p) TSRMLS_CC); ++ efree(p); + } + + #ifdef _WIN32 +@@ -1461,7 +1466,11 @@ handleClone(zval* zv TSRMLS_DC) + extern "C" + #endif + static union _zend_function* ++#if PHP_VERSION_ID < 50400 + handleGetMethod(zval** zv, char* method, int len TSRMLS_DC) ++#else ++handleGetMethod(zval** zv, char* method, int len, const _zend_literal* key TSRMLS_DC) ++#endif + { + zend_function* result; + +@@ -1470,7 +1479,11 @@ handleGetMethod(zval** zv, char* method, + // any of our predefined proxy methods. If it returns 0, then we return a + // function that will check the class definition. + // ++#if PHP_VERSION_ID < 50400 + result = zend_get_std_object_handlers()->get_method(zv, method, len TSRMLS_CC); ++#else ++ result = zend_get_std_object_handlers()->get_method(zv, method, len, key TSRMLS_CC); ++#endif + if(!result) + { + Wrapper<ProxyPtr>* obj = Wrapper<ProxyPtr>::extract(*zv TSRMLS_CC); +@@ -1532,7 +1545,7 @@ handleCompare(zval* zobj1, zval* zobj2 T + // + // Predefined methods for ObjectPrx. + // +-static function_entry _proxyMethods[] = ++static zend_function_entry _proxyMethods[] = + { + ZEND_ME(Ice_ObjectPrx, __construct, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_CTOR) + ZEND_ME(Ice_ObjectPrx, __toString, NULL, ZEND_ACC_PUBLIC) +--- a/php/src/IcePHP/Types.cpp ++++ b/php/src/IcePHP/Types.cpp +@@ -2405,7 +2405,8 @@ handleTypeInfoFreeStorage(void* p TSRMLS + { + Wrapper<TypeInfoPtr>* obj = static_cast<Wrapper<TypeInfoPtr>*>(p); + delete obj->ptr; +- zend_objects_free_object_storage(static_cast<zend_object*>(p) TSRMLS_CC); ++ zend_object_std_dtor(static_cast<zend_object*>(p) TSRMLS_CC); ++ efree(p); + } + + static bool +@@ -2718,7 +2719,8 @@ handleExceptionInfoFreeStorage(void* p T + { + Wrapper<ExceptionInfoPtr>* obj = static_cast<Wrapper<ExceptionInfoPtr>*>(p); + delete obj->ptr; +- zend_objects_free_object_storage(static_cast<zend_object*>(p) TSRMLS_CC); ++ zend_object_std_dtor(static_cast<zend_object*>(p) TSRMLS_CC); ++ efree(p); + } + + +@@ -2853,7 +2855,7 @@ ZEND_FUNCTION(IcePHP_stringifyException) + // + // Predefined methods for IcePHP_TypeInfo. + // +-static function_entry _typeInfoMethods[] = ++static zend_function_entry _typeInfoMethods[] = + { + {0, 0, 0} + }; +@@ -2861,7 +2863,7 @@ static function_entry _typeInfoMethods[] + // + // Predefined methods for IcePHP_ExceptionInfo. + // +-static function_entry _exceptionInfoMethods[] = ++static zend_function_entry _exceptionInfoMethods[] = + { + {0, 0, 0} + }; +--- a/php/src/IcePHP/Types.h ++++ b/php/src/IcePHP/Types.h +@@ -33,18 +33,6 @@ ZEND_FUNCTION(IcePHP_stringify); + ZEND_FUNCTION(IcePHP_stringifyException); + } + +-#define ICEPHP_TYPE_FUNCTIONS \ +- ZEND_FE(IcePHP_defineEnum, NULL) \ +- ZEND_FE(IcePHP_defineStruct, NULL) \ +- ZEND_FE(IcePHP_defineSequence, NULL) \ +- ZEND_FE(IcePHP_defineDictionary, NULL) \ +- ZEND_FE(IcePHP_defineProxy, NULL) \ +- ZEND_FE(IcePHP_declareClass, NULL) \ +- ZEND_FE(IcePHP_defineClass, NULL) \ +- ZEND_FE(IcePHP_defineException, NULL) \ +- ZEND_FE(IcePHP_stringify, NULL) \ +- ZEND_FE(IcePHP_stringifyException, NULL) +- + namespace IcePHP + { + +--- a/php/src/IcePHP/Util.cpp ++++ b/php/src/IcePHP/Util.cpp +@@ -17,6 +17,7 @@ using namespace std; + using namespace IcePHP; + using namespace Slice::PHP; + ++#if PHP_VERSION_ID < 50400 + #ifdef _WIN32 + extern "C" + #endif +@@ -25,20 +26,25 @@ dtor_wrapper(void* p) + { + zval_ptr_dtor(static_cast<zval**>(p)); + } ++#endif + + void* + IcePHP::createWrapper(zend_class_entry* ce, size_t sz TSRMLS_DC) + { + zend_object* obj; +- zval* tmp; + + obj = static_cast<zend_object*>(emalloc(sz)); +- obj->ce = ce; +- obj->guards = 0; + ++ zend_object_std_init(obj, ce TSRMLS_CC); ++ ++#if PHP_VERSION_ID < 50400 ++ zval* tmp; + obj->properties = static_cast<HashTable*>(emalloc(sizeof(HashTable))); + zend_hash_init(obj->properties, 0, 0, dtor_wrapper, 0); + zend_hash_copy(obj->properties, &ce->default_properties, (copy_ctor_func_t)zval_add_ref, &tmp, sizeof(zval*)); ++#else ++ object_properties_init(obj, ce); ++#endif + + return obj; + } +--- a/php/src/IcePHP/Util.h ++++ b/php/src/IcePHP/Util.h +@@ -22,20 +22,6 @@ ZEND_FUNCTION(Ice_intVersion); + ZEND_FUNCTION(Ice_generateUUID); + } + +-#define ICEPHP_UTIL_FUNCTIONS \ +- ZEND_FE(Ice_stringVersion, NULL) \ +- ZEND_FE(Ice_intVersion, NULL) \ +- ZEND_FE(Ice_generateUUID, NULL) +- +-#ifdef ICEPHP_USE_NAMESPACES +-# define ICEPHP_UTIL_NS_FUNCTIONS \ +- ZEND_NS_FALIAS("Ice", stringVersion, Ice_stringVersion, NULL) \ +- ZEND_NS_FALIAS("Ice", intVersion, Ice_intVersion, NULL) \ +- ZEND_NS_FALIAS("Ice", generateUUID, Ice_generateUUID, NULL) +-#else +-# define ICEPHP_UTIL_NS_FUNCTIONS +-#endif +- + namespace IcePHP + { + +--- a/php/test/Ice/binding/Client.php ++++ b/php/test/Ice/binding/Client.php +@@ -525,7 +525,7 @@ function allTests($communicator) + $com->shutdown(); + } + +-$communicator = Ice_initialize(&$argv); ++$communicator = Ice_initialize($argv); + allTests($communicator); + $communicator->destroy(); + exit(); +--- a/php/test/Ice/checksum/Client.php ++++ b/php/test/Ice/checksum/Client.php +@@ -88,7 +88,7 @@ function allTests($communicator) + return $checksum; + } + +-$communicator = Ice_initialize(&$argv); ++$communicator = Ice_initialize($argv); + $checksum = allTests($communicator); + $checksum->shutdown(); + $communicator->destroy(); +--- a/php/test/Ice/exceptions/Client.php ++++ b/php/test/Ice/exceptions/Client.php +@@ -378,7 +378,7 @@ function allTests($communicator) + return $thrower; + } + +-$communicator = Ice_initialize(&$argv); ++$communicator = Ice_initialize($argv); + $thrower = allTests($communicator); + $thrower->shutdown(); + $communicator->destroy(); +--- a/php/test/Ice/facets/Client.php ++++ b/php/test/Ice/facets/Client.php +@@ -89,7 +89,7 @@ function allTests($communicator) + return $gf; + } + +-$communicator = Ice_initialize(&$argv); ++$communicator = Ice_initialize($argv); + $g = allTests($communicator); + $g->shutdown(); + $communicator->destroy(); +--- a/php/test/Ice/info/Client.php ++++ b/php/test/Ice/info/Client.php +@@ -129,7 +129,7 @@ function allTests($communicator) + return $testIntf; + } + +-$communicator = Ice_initialize(&$argv); ++$communicator = Ice_initialize($argv); + $server = allTests($communicator); + $server->shutdown(); + $communicator->destroy(); +--- a/php/test/Ice/inheritance/Client.php ++++ b/php/test/Ice/inheritance/Client.php +@@ -236,7 +236,7 @@ function allTests($communicator) + return $initial; + } + +-$communicator = Ice_initialize(&$argv); ++$communicator = Ice_initialize($argv); + $initial = allTests($communicator); + $initial->shutdown(); + $communicator->destroy(); +--- a/php/test/Ice/objects/Client.php ++++ b/php/test/Ice/objects/Client.php +@@ -391,7 +391,7 @@ function allTests($communicator) + return $initial; + } + +-$communicator = Ice_initialize(&$argv); ++$communicator = Ice_initialize($argv); + $factory = new MyObjectFactory(); + $communicator->addObjectFactory($factory, "::Test::B"); + $communicator->addObjectFactory($factory, "::Test::C"); +--- a/php/test/Ice/operations/Client.php ++++ b/php/test/Ice/operations/Client.php +@@ -484,7 +484,7 @@ function allTests($communicator) + return $cl; + } + +-$communicator = Ice_initialize(&$argv); ++$communicator = Ice_initialize($argv); + + $myClass = allTests($communicator); + +--- a/php/test/Ice/proxy/Client.php ++++ b/php/test/Ice/proxy/Client.php +@@ -722,7 +722,7 @@ function allTests($communicator) + return $cl; + } + +-$communicator = Ice_initialize(&$argv); ++$communicator = Ice_initialize($argv); + $myClass = allTests($communicator); + $myClass->shutdown(); + $communicator->destroy(); +--- a/php/test/Ice/slicing/exceptions/Client.php ++++ b/php/test/Ice/slicing/exceptions/Client.php +@@ -315,7 +315,7 @@ function allTests($communicator) + return $test; + } + +-$communicator = Ice_initialize(&$argv); ++$communicator = Ice_initialize($argv); + $test = allTests($communicator); + $test->shutdown(); + $communicator->destroy(); +--- a/php/test/Ice/slicing/objects/Client.php ++++ b/php/test/Ice/slicing/objects/Client.php +@@ -830,7 +830,7 @@ function allTests($communicator) + return $test; + } + +-$communicator = Ice_initialize(&$argv); ++$communicator = Ice_initialize($argv); + $test = allTests($communicator); + $test->shutdown(); + $communicator->destroy(); +--- a/php/test/Slice/keyword/Client.php ++++ b/php/test/Slice/keyword/Client.php +@@ -96,7 +96,7 @@ function allTests($communicator) + echo "ok\n"; + } + +-$communicator = Ice_initialize(&$argv); ++$communicator = Ice_initialize($argv); + allTests($communicator); + $communicator->destroy(); + +--- a/php/test/Slice/structure/Client.php ++++ b/php/test/Slice/structure/Client.php +@@ -225,7 +225,7 @@ function allTests($communicator) + echo "ok\n"; + } + +-$communicator = Ice_initialize(&$argv); ++$communicator = Ice_initialize($argv); + allTests($communicator); + $communicator->destroy(); + diff --git a/debian/patches/series b/debian/patches/series index d361d86..10e4257 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -12,3 +12,4 @@ archs.patch libdb5.1.patch ptrdiff_t-gcc-4.6.patch cpp-make-rules.path +php5.4-transition.patch