diff options
author | Andi Gutmans <andi@php.net> | 2000-04-30 16:32:36 +0000 |
---|---|---|
committer | Andi Gutmans <andi@php.net> | 2000-04-30 16:32:36 +0000 |
commit | e13285ded79f94c9349763f59014eb467357cefc (patch) | |
tree | d777a222d182ac6f6fbace611e27d7cddf06f478 /main/php.h | |
parent | 8e7a5098dd31cc768c34c046820822dfeb9d048d (diff) | |
download | php-git-e13285ded79f94c9349763f59014eb467357cefc.tar.gz |
- 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).
Diffstat (limited to 'main/php.h')
-rw-r--r-- | main/php.h | 7 |
1 files changed, 3 insertions, 4 deletions
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) |