From: Thies C. Arntzen Date: Wed, 15 Sep 1999 09:51:20 +0000 (+0000) Subject: HASH_OF is usable enough (i hate duplicating macros all over the place) X-Git-Tag: PRE_DELAYED_ARRAY_FETCH_PATCH~71 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=328d08bd63f738323fbc0177616a4f8dbf6e3b84;p=php HASH_OF is usable enough (i hate duplicating macros all over the place) --- diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index de3eff9adc..2f376468fc 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -18,8 +18,6 @@ */ -#define HASH_OF(p) ((p)->type==IS_ARRAY ? (p)->value.ht : (((p)->type==IS_OBJECT ? (p)->value.obj.properties : NULL))) - #include "php.h" #include "php_ini.h" #include "internal_functions_registry.h" diff --git a/main/php.h b/main/php.h index 4f635a21e8..2207dbce8d 100644 --- a/main/php.h +++ b/main/php.h @@ -249,6 +249,7 @@ extern int ap_vsnprintf(char *, size_t, const char *, va_list); #define STR_FREE(ptr) if (ptr && ptr!=empty_string && ptr!=undefined_variable_string) { efree(ptr); } #define COPY_STRING(yy) (yy).value.str.val = (char *) estrndup((yy).value.str.val,(yy).value.str.len) #define STR_PRINT(str) ((str)?(str):"") +#define HASH_OF(p) ((p)->type==IS_ARRAY ? (p)->value.ht : (((p)->type==IS_OBJECT ? (p)->value.obj.properties : NULL))) #ifndef MAXPATHLEN #define MAXPATHLEN 256 /* Should be safe for any weird systems that do not define it */