mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
- 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).
This commit is contained in:
parent
8e7a5098dd
commit
e13285ded7
2 changed files with 10 additions and 11 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue