Home Patches

Patch for Ice 3.5.0: Allow building IcePHP with PHP namespaces

grembogrembo Member Michael GmelinOrganization: Grem Equity GmbHProject: E-Commerce platform
Building IcePHP with USE_NAMESPACES=yes fails due to the invalid use of the INIT_NS_CLASS_ENTRY macro, e.g.:
     zend_class_entry ce;
-    INIT_NS_CLASS_ENTRY(ce, STRCAST("Ice"), STRCAST("Communicator"), _interfaceMethods);
+    INIT_NS_CLASS_ENTRY(ce, "Ice", "Communicator", _interfaceMethods);
     INIT_CLASS_ENTRY(ce, "Ice_Communicator", _interfaceMethods);

The attached patch fixes the problem.

To apply the source patch Attachment not found. to a fresh Ice 3.5.0 source distribution:
cd Ice-3.5.0
patch -p0 < ice350-icephp-namespaces.patch.txt


p.s. - this also includes http://www.zeroc.com/forums/patches/5964-c-11-build-fix-php-src-icephp-init-cpp.html to allow compilation with C++11.

p.p.s - I tested this using clang, C++11 and PHP 5.4.
Sign In or Register to comment.