mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Inline DBA_ID_PARS macro
It is used only 3 times and provides variable declarations which one shouldn't need to grep to see what is declared
This commit is contained in:
parent
84e17d8f90
commit
29ef6523dd
1 changed files with 9 additions and 10 deletions
|
@ -89,13 +89,6 @@ ZEND_TSRMLS_CACHE_DEFINE()
|
|||
ZEND_GET_MODULE(dba)
|
||||
#endif
|
||||
|
||||
/* {{{ macromania */
|
||||
|
||||
#define DBA_ID_PARS \
|
||||
zval *id; \
|
||||
dba_info *info = NULL; \
|
||||
int ac = ZEND_NUM_ARGS()
|
||||
|
||||
/* these are used to get the standard arguments */
|
||||
|
||||
/* {{{ php_dba_myke_key */
|
||||
|
@ -914,7 +907,9 @@ PHP_FUNCTION(dba_close)
|
|||
/* {{{ Checks, if the specified key exists */
|
||||
PHP_FUNCTION(dba_exists)
|
||||
{
|
||||
DBA_ID_PARS;
|
||||
zval *id;
|
||||
dba_info *info = NULL;
|
||||
int ac = ZEND_NUM_ARGS();
|
||||
DBA_GET2;
|
||||
DBA_FETCH_RESOURCE_WITH_ID(info, id);
|
||||
|
||||
|
@ -932,7 +927,9 @@ PHP_FUNCTION(dba_fetch)
|
|||
{
|
||||
char *val;
|
||||
size_t len = 0;
|
||||
DBA_ID_PARS;
|
||||
zval *id;
|
||||
dba_info *info = NULL;
|
||||
int ac = ZEND_NUM_ARGS();
|
||||
zval *key;
|
||||
char *key_str, *key_free;
|
||||
size_t key_len;
|
||||
|
@ -1078,7 +1075,9 @@ PHP_FUNCTION(dba_nextkey)
|
|||
If inifile: remove all other key lines */
|
||||
PHP_FUNCTION(dba_delete)
|
||||
{
|
||||
DBA_ID_PARS;
|
||||
zval *id;
|
||||
dba_info *info = NULL;
|
||||
int ac = ZEND_NUM_ARGS();
|
||||
DBA_GET2;
|
||||
DBA_FETCH_RESOURCE_WITH_ID(info, id);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue