cvs: ZendEngine2 / zend_API.h
| From: | Dmitry Stogov | Date: | Wed, 22 Feb 2006 11:37:11 +0000 |
| Subject: | cvs: ZendEngine2 / zend_API.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-4611@lists.php.net to get a copy of this message | ||
dmitry Wed Feb 22 11:37:11 2006 UTC
Modified files:
/ZendEngine2 zend_API.h
Log:
Unicode support
http://cvs.php.net/viewcvs.cgi/ZendEngine2/zend_API.h?r1=1.233&r2=1.234&diff_format=u
Index: ZendEngine2/zend_API.h
diff -u ZendEngine2/zend_API.h:1.233 ZendEngine2/zend_API.h:1.234
--- ZendEngine2/zend_API.h:1.233 Tue Feb 21 20:12:41 2006
+++ ZendEngine2/zend_API.h Wed Feb 22 11:37:11 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_API.h,v 1.233 2006/02/21 20:12:41 dmitry Exp $ */
+/* $Id: zend_API.h,v 1.234 2006/02/22 11:37:11 dmitry Exp $ */
#ifndef ZEND_API_H
#define ZEND_API_H
@@ -248,6 +248,21 @@
ZEND_API void zend_update_property_unicode(zend_class_entry *scope, zval *object, char *name, int
name_length, UChar *value TSRMLS_DC);
ZEND_API void zend_update_property_unicodel(zend_class_entry *scope, zval *object, char *name, int
name_length, UChar *value, int value_length TSRMLS_DC);
+#define zend_update_property_text(ce, obj, key, key_len, str) \
+ if (UG(unicode)) { \
+ zend_update_property_unicode(ce, obj, key, key_len, (str).u TSRMLS_CC); \
+ } else { \
+ zend_update_property_string(ce, obj, key, key_len, (str).s TSRMLS_CC); \
+ }
+
+#define zend_update_property_textl(ce, obj, key, key_len, str, len) \
+ if (UG(unicode)) { \
+ zend_update_property_unicodel(ce, obj, key, key_len, str.u, len TSRMLS_CC); \
+ } else { \
+ zend_update_property_stringl(ce, obj, key, key_len, str.s, len TSRMLS_CC); \
+ }
+
+
ZEND_API int zend_update_static_property(zend_class_entry *scope, char *name, int name_length, zval
*value TSRMLS_DC);
ZEND_API int zend_update_static_property_null(zend_class_entry *scope, char *name, int name_length
TSRMLS_DC);
ZEND_API int zend_update_static_property_bool(zend_class_entry *scope, char *name, int name_length,
long value TSRMLS_DC);
@@ -377,16 +392,16 @@
#define add_assoc_text(arg, key, str, duplicate) \
if (UG(unicode)) { \
- add_assoc_unicode(arg, key, (UChar*)(str), duplicate); \
+ add_assoc_unicode(arg, key, (str).u, duplicate); \
} else { \
- add_assoc_string(arg, key, (char*)(str), duplicate); \
+ add_assoc_string(arg, key, (str).s, duplicate); \
}
#define add_assoc_textl(arg, key, str, length, duplicate) \
if (UG(unicode)) { \
- add_assoc_unicodel(arg, key, (UChar*)(str), length, duplicate); \
+ add_assoc_unicodel(arg, key, (str).u, length, duplicate); \
} else { \
- add_assoc_stringl(arg, key, (char*)(str), length, duplicate); \
+ add_assoc_stringl(arg, key, (str).s, length, duplicate); \
}
#define add_assoc_ascii_string(arg, key, str, duplicate) \
@@ -429,16 +444,16 @@
#define add_index_text(arg, idx, str, duplicate) \
if (UG(unicode)) { \
- add_index_unicode(arg, idx, (UChar*)(str), duplicate); \
+ add_index_unicode(arg, idx, (str).u, duplicate); \
} else { \
- add_index_string(arg, idx, (char*)(str), duplicate); \
+ add_index_string(arg, idx, (str).s, duplicate); \
}
#define add_index_textl(arg, idx, str, length, duplicate) \
if (UG(unicode)) { \
- add_index_unicodel(arg, idx, (UChar*)(str), length, duplicate); \
+ add_index_unicodel(arg, idx, (str).u, length, duplicate); \
} else { \
- add_index_stringl(arg, idx, (char*)(str), length, duplicate); \
+ add_index_stringl(arg, idx, (str).s, length, duplicate); \
}
#define add_index_ascii_string(arg, idx, str, duplicate) \