Browse Source

add unicode compatible macros for returning strings from xml based extensions

migration/RELEASE_1_0_0
Rob Richards 20 years ago
parent
commit
4e1b1c07fb
  1. 10
      ext/libxml/php_libxml.h

10
ext/libxml/php_libxml.h

@ -102,6 +102,16 @@ PHP_LIBXML_API void php_libxml_issue_error(int level, const char *msg TSRMLS_DC)
PHP_LIBXML_API void php_libxml_initialize();
PHP_LIBXML_API void php_libxml_shutdown();
#define ZVAL_XML_STRING(z, s, flags) { \
UConverter *libxml_utf_conv = NULL; \
if (UG(unicode)) { \
libxml_utf_conv = UG(utf8_conv); \
} \
ZVAL_U_STRING(libxml_utf_conv, z, s, flags); \
}
#define RETVAL_XML_STRING(s, flags) ZVAL_XML_STRING(return_value, s, flags)
#ifdef ZTS
#define LIBXML(v) TSRMG(libxml_globals_id, zend_libxml_globals *, v)
#else

Loading…
Cancel
Save