From e13285ded79f94c9349763f59014eb467357cefc Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Sun, 30 Apr 2000 16:32:36 +0000 Subject: - Take Sascha's advice and create on V_OPEN() which replaces open(). - Unlike the other macros its argument has to have braces around it, for - example, open(filename, flags) becomse V_OPEN((filename, flags)) - Made small conversion to new Zend macros. The ugly (*foo)->value.str.val - now becomes Z_STRVAL_PP(foo). PP means pointer pointer, there also exist - single P's for example foo->value.str.val becomes Z_STRVAL_P(foo). --- main/php.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'main/php.h') diff --git a/main/php.h b/main/php.h index 75facd3895..64d6b3f782 100644 --- a/main/php.h +++ b/main/php.h @@ -298,8 +298,8 @@ PHPAPI int cfg_get_string(char *varname, char **result); #ifdef VIRTUAL_DIR #define V_GETCWD(buff, size) virtual_getcwd(buff,size) #define V_FOPEN(path, mode) virtual_fopen(path, mode) -#define V_OPEN(path, flags) virtual_open(path, flags) -#define V_OPEN_CREAT(path, flags, mode) virtual_open(path, flags, mode) +/* The V_OPEN macro will need to be used as V_OPEN((path, flags, ...)) */ +#define V_OPEN(open_args) virtual_open open_args #define V_CREAT(path, mode) virtual_creat(path, mode) #define V_CHDIR(path) virtual_chdir(path) #define V_CHDIR_FILE(path) virtual_chdir_file(path) @@ -313,8 +313,7 @@ PHPAPI int cfg_get_string(char *varname, char **result); #else #define V_GETCWD(buff, size) getcwd(buff,size) #define V_FOPEN(path, mode) fopen(path, mode) -#define V_OPEN(path, flags) open(path, flags) -#define V_OPEN_CREAT(path, flags, mode) open(path, flags, mode) +#define V_OPEN(open_args) open open_args #define V_CREAT(path, mode) creat(path, mode) #define V_CHDIR(path) chdir(path) #define V_CHDIR_FILE(path) chdir_file(path) -- cgit v1.2.1