Skip to content

Commit 29ef652

Browse files
committed
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
1 parent 84e17d8 commit 29ef652

File tree

1 file changed

+9
-10
lines changed

1 file changed

+9
-10
lines changed

ext/dba/dba.c

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -89,13 +89,6 @@ ZEND_TSRMLS_CACHE_DEFINE()
8989
ZEND_GET_MODULE(dba)
9090
#endif
9191

92-
/* {{{ macromania */
93-
94-
#define DBA_ID_PARS \
95-
zval *id; \
96-
dba_info *info = NULL; \
97-
int ac = ZEND_NUM_ARGS()
98-
9992
/* these are used to get the standard arguments */
10093

10194
/* {{{ php_dba_myke_key */
@@ -914,7 +907,9 @@ PHP_FUNCTION(dba_close)
914907
/* {{{ Checks, if the specified key exists */
915908
PHP_FUNCTION(dba_exists)
916909
{
917-
DBA_ID_PARS;
910+
zval *id;
911+
dba_info *info = NULL;
912+
int ac = ZEND_NUM_ARGS();
918913
DBA_GET2;
919914
DBA_FETCH_RESOURCE_WITH_ID(info, id);
920915

@@ -932,7 +927,9 @@ PHP_FUNCTION(dba_fetch)
932927
{
933928
char *val;
934929
size_t len = 0;
935-
DBA_ID_PARS;
930+
zval *id;
931+
dba_info *info = NULL;
932+
int ac = ZEND_NUM_ARGS();
936933
zval *key;
937934
char *key_str, *key_free;
938935
size_t key_len;
@@ -1078,7 +1075,9 @@ PHP_FUNCTION(dba_nextkey)
10781075
If inifile: remove all other key lines */
10791076
PHP_FUNCTION(dba_delete)
10801077
{
1081-
DBA_ID_PARS;
1078+
zval *id;
1079+
dba_info *info = NULL;
1080+
int ac = ZEND_NUM_ARGS();
10821081
DBA_GET2;
10831082
DBA_FETCH_RESOURCE_WITH_ID(info, id);
10841083

0 commit comments

Comments
 (0)