diff options
author | Felipe Pena <felipe@php.net> | 2008-06-29 13:21:02 +0000 |
---|---|---|
committer | Felipe Pena <felipe@php.net> | 2008-06-29 13:21:02 +0000 |
commit | 02c36c4c4a4bf90a1433abe1de1ed8a053113711 (patch) | |
tree | 4280ff8472caa83563058cefbc87193af53ad1bb | |
parent | 1f69fbd2c354b1402e79ff2a37f75d4005013fad (diff) | |
download | php-git-02c36c4c4a4bf90a1433abe1de1ed8a053113711.tar.gz |
- New parameter parsing API
-rw-r--r-- | ext/dbase/dbase.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/dbase/dbase.c b/ext/dbase/dbase.c index ea81a4bc7e..fceebf5a60 100644 --- a/ext/dbase/dbase.c +++ b/ext/dbase/dbase.c @@ -829,20 +829,20 @@ const zend_function_entry dbase_functions[] = { */ PHP_FUNCTION(dbase_get_header_info) { - zval **dbh_id, *row; + zval *row; dbfield_t *dbf, *cur_f; dbhead_t *dbh; int dbh_type; + long dbh_id; DBase_TLS_VARS; - if (ZEND_NUM_ARGS() != 1 || (zend_get_parameters_ex(1, &dbh_id) == FAILURE)) { - WRONG_PARAM_COUNT; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &dbh_id) == FAILURE) { + return; } - convert_to_long_ex(dbh_id); - dbh = zend_list_find(Z_LVAL_PP(dbh_id), &dbh_type); + dbh = zend_list_find(dbh_id, &dbh_type); if (!dbh || dbh_type != DBase_GLOBAL(le_dbhead)) { - php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", Z_LVAL_PP(dbh_id)); + php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unable to find database for identifier %ld", dbh_id); RETURN_FALSE; } |