This forum has been archived. Please start a new discussion on GitHub.

Patch for Ice 3.5.0: Allow building IcePHP with PHP namespaces

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 to allow compilation with C++11.

p.p.s - I tested this using clang, C++11 and PHP 5.4.