cvs: ZendEngine2 / zend_alloc.h
| From: | Andrei Zmievski | Date: | Fri, 12 Aug 2005 17:14:25 +0000 |
| Subject: | cvs: ZendEngine2 / zend_alloc.h | ||
| Groups: | php.zend-engine.cvs | ||
| Request: | Send a blank email to php-zend-engine-cvs+get-4001@lists.php.net to get a copy of this message | ||
andrei Fri Aug 12 13:14:25 2005 EDT
Modified files:
/ZendEngine2 zend_alloc.h
Log:
Add unicode macros for when Zend memory manager is disabled.
http://cvs.php.net/diff.php/ZendEngine2/zend_alloc.h?r1=1.64&r2=1.65&ty=u
Index: ZendEngine2/zend_alloc.h
diff -u ZendEngine2/zend_alloc.h:1.64 ZendEngine2/zend_alloc.h:1.65
--- ZendEngine2/zend_alloc.h:1.64 Thu Aug 11 19:34:54 2005
+++ ZendEngine2/zend_alloc.h Fri Aug 12 13:14:21 2005
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: zend_alloc.h,v 1.64 2005/08/11 23:34:54 andrei Exp $ */
+/* $Id: zend_alloc.h,v 1.65 2005/08/12 17:14:21 andrei Exp $ */
#ifndef ZEND_ALLOC_H
#define ZEND_ALLOC_H
@@ -151,6 +151,10 @@
#define erealloc_recoverable(ptr, size) realloc((ptr), (size))
#define estrdup(s) strdup(s)
#define estrndup(s, length) zend_strndup((s), (length))
+#define eumalloc(size) (UChar*)malloc(UBYTES(size))
+#define eurealloc(ptr, size) (UChar*)erealloc((ptr), UBYTES(size))
+#define eustrndup(s, length) zend_ustrndup((s), (length))
+#define eustrdup(s) zend_ustrdup((s), u_strlen(s))
/* Relay wrapper macros */
#define emalloc_rel(size) malloc(size)
@@ -161,6 +165,9 @@
#define erealloc_recoverable_rel(ptr, size) realloc((ptr), (size))
#define estrdup_rel(s) strdup(s)
#define estrndup_rel(s, length) zend_strndup((s), (length))
+#define eumalloc_rel(size) (UChar*)malloc(UBYTES(size))
+#define eurealloc_rel(ptr, size) (UChar*)realloc((ptr), UBYTES(size))
+#define eustrndup_rel(s, length) zend_ustrndup((s), (length))
/* Selective persistent/non persistent allocation macros */
#define pemalloc(size, persistent) malloc(size)
@@ -170,6 +177,8 @@
#define perealloc(ptr, size, persistent) realloc((ptr), (size))
#define perealloc_recoverable(ptr, size, persistent) realloc((ptr), (size))
#define pestrdup(s, persistent) strdup(s)
+#define peumalloc(size, persistent) (UChar*)malloc(UBYTES(size))
+#define peurealloc(ptr, size, persistent) (UChar*)realloc((ptr),UBYTES(size))
#define pemalloc_rel(size, persistent) malloc(size)
#define pefree_rel(ptr, persistent) free(ptr)