diff options
author | Zeev Suraski <zeev@php.net> | 2003-08-03 17:44:39 +0000 |
---|---|---|
committer | Zeev Suraski <zeev@php.net> | 2003-08-03 17:44:39 +0000 |
commit | 538d58dd5f13a3ffda958ec002733dcbbc965352 (patch) | |
tree | 6d82510f96846c52de5ca250ddb337e1a21918c7 | |
parent | 4e796a70802e42ed03b12a18375b0f446a251e59 (diff) | |
download | php-git-538d58dd5f13a3ffda958ec002733dcbbc965352.tar.gz |
Use new infrastructure.
There are bound to be some messups, please report build/runtime bugs!
-rw-r--r-- | ext/curl/interface.c | 4 | ||||
-rw-r--r-- | ext/exif/exif.c | 5 | ||||
-rw-r--r-- | ext/gmp/gmp.c | 6 | ||||
-rw-r--r-- | ext/ldap/ldap.c | 19 | ||||
-rw-r--r-- | ext/mbstring/mbstring.c | 12 | ||||
-rw-r--r-- | ext/mcve/mcve.c | 1 | ||||
-rw-r--r-- | ext/mssql/php_mssql.c | 3 | ||||
-rw-r--r-- | ext/mysqli/mysqli_fe.c | 15 | ||||
-rw-r--r-- | ext/ncurses/ncurses_fe.c | 31 | ||||
-rw-r--r-- | ext/oci8/oci8.c | 11 | ||||
-rw-r--r-- | ext/odbc/php_odbc.c | 4 | ||||
-rw-r--r-- | ext/openssl/openssl.c | 30 | ||||
-rw-r--r-- | ext/oracle/oracle.c | 4 | ||||
-rw-r--r-- | ext/simplexml/simplexml.c | 4 | ||||
-rw-r--r-- | ext/sockets/sockets.c | 49 | ||||
-rw-r--r-- | ext/sqlite/sqlite.c | 8 | ||||
-rw-r--r-- | ext/standard/basic_functions.c | 44 | ||||
-rw-r--r-- | ext/sysvmsg/sysvmsg.c | 23 | ||||
-rw-r--r-- | ext/xml/xml.c | 8 | ||||
-rw-r--r-- | ext/xmlrpc/xmlrpc-epi-php.c | 7 | ||||
-rw-r--r-- | ext/yaz/php_yaz.c | 9 |
21 files changed, 190 insertions, 107 deletions
diff --git a/ext/curl/interface.c b/ext/curl/interface.c index cfb3be6ecc..0f46ec28a9 100644 --- a/ext/curl/interface.c +++ b/ext/curl/interface.c @@ -55,8 +55,6 @@ static void _php_curl_close(zend_rsrc_list_entry *rsrc TSRMLS_DC); #define CAAS(s, v) add_assoc_string_ex(return_value, s, sizeof(s), (char *) v, 1); #define CAAZ(s, v) add_assoc_zval_ex(return_value, s, sizeof(s), (zval *) v); -static const unsigned char second_args_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE }; - /* {{{ curl_functions[] */ function_entry curl_functions[] = { @@ -72,7 +70,7 @@ function_entry curl_functions[] = { PHP_FE(curl_multi_add_handle, NULL) PHP_FE(curl_multi_remove_handle, NULL) PHP_FE(curl_multi_select, NULL) - PHP_FE(curl_multi_exec, second_args_force_ref) + PHP_FE(curl_multi_exec, second_arg_force_ref) PHP_FE(curl_multi_getcontent, NULL) PHP_FE(curl_multi_info_read, NULL) PHP_FE(curl_multi_close, NULL) diff --git a/ext/exif/exif.c b/ext/exif/exif.c index 3b947e5fdb..c1c4efd9f6 100644 --- a/ext/exif/exif.c +++ b/ext/exif/exif.c @@ -93,7 +93,10 @@ typedef unsigned char uchar; #define EFREE_IF(ptr) if (ptr) efree(ptr) -static unsigned char exif_thumbnail_force_ref[] = {2, BYREF_NONE, BYREF_FORCE_REST}; +static +ZEND_BEGIN_ARG_INFO(exif_thumbnail_force_ref, 1) +ZEND_END_ARG_INFO(); + /* {{{ exif_functions[] */ diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index c294116337..1363b6710d 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -35,8 +35,6 @@ ZEND_DECLARE_MODULE_GLOBALS(gmp) /* True global resources - no need for thread safety here */ static int le_gmp; -static unsigned char first_of_two_force_ref[] = { 2, BYREF_FORCE, BYREF_NONE }; - /* {{{ gmp_functions[] */ function_entry gmp_functions[] = { @@ -73,8 +71,8 @@ function_entry gmp_functions[] = { ZEND_FE(gmp_or, NULL) ZEND_FE(gmp_com, NULL) ZEND_FE(gmp_xor, NULL) - ZEND_FE(gmp_setbit, first_of_two_force_ref) - ZEND_FE(gmp_clrbit, first_of_two_force_ref) + ZEND_FE(gmp_setbit, first_arg_force_ref) + ZEND_FE(gmp_clrbit, first_arg_force_ref) ZEND_FE(gmp_scan0, NULL) ZEND_FE(gmp_scan1, NULL) ZEND_FE(gmp_popcount, NULL) diff --git a/ext/ldap/ldap.c b/ext/ldap/ldap.c index a148e5767e..e9687f9f4b 100644 --- a/ext/ldap/ldap.c +++ b/ext/ldap/ldap.c @@ -79,8 +79,15 @@ typedef struct { ZEND_DECLARE_MODULE_GLOBALS(ldap) -static unsigned char third_argument_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; -static unsigned char arg3to6of6_force_ref[] = { 6, BYREF_NONE, BYREF_NONE, BYREF_FORCE, BYREF_FORCE, BYREF_FORCE, BYREF_FORCE }; +static + ZEND_BEGIN_ARG_INFO(arg3to6of6_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); static int le_link, le_result, le_result_entry, le_ber_entry; @@ -106,8 +113,8 @@ function_entry ldap_functions[] = { PHP_FE(ldap_first_entry, NULL) PHP_FE(ldap_next_entry, NULL) PHP_FE(ldap_get_entries, NULL) - PHP_FE(ldap_first_attribute, third_argument_force_ref) - PHP_FE(ldap_next_attribute, third_argument_force_ref) + PHP_FE(ldap_first_attribute, third_arg_force_ref) + PHP_FE(ldap_next_attribute, third_arg_force_ref) PHP_FE(ldap_get_attributes, NULL) PHP_FE(ldap_get_values, NULL) PHP_FE(ldap_get_values_len, NULL) @@ -131,13 +138,13 @@ function_entry ldap_functions[] = { PHP_FE(ldap_sort, NULL) #if (LDAP_API_VERSION > 2000) || HAVE_NSLDAP - PHP_FE(ldap_get_option, third_argument_force_ref) + PHP_FE(ldap_get_option, third_arg_force_ref) PHP_FE(ldap_set_option, NULL) PHP_FE(ldap_parse_result, arg3to6of6_force_ref) PHP_FE(ldap_first_reference, NULL) PHP_FE(ldap_next_reference, NULL) #ifdef HAVE_LDAP_PARSE_REFERENCE - PHP_FE(ldap_parse_reference, third_argument_force_ref) + PHP_FE(ldap_parse_reference, third_arg_force_ref) #endif PHP_FE(ldap_rename, NULL) #ifdef HAVE_LDAP_START_TLS_S diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 06be86fe91..502b6dcd8a 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -144,11 +144,11 @@ static const enum mbfl_no_encoding php_mb_default_identify_list[] = { static const int php_mb_default_identify_list_size = sizeof(php_mb_default_identify_list)/sizeof(enum mbfl_no_encoding); /* }}} */ -static const unsigned char third_and_rest_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE_REST }; -static const unsigned char second_args_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE }; -#if HAVE_MBREGEX -static const unsigned char third_argument_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; -#endif +static const + ZEND_BEGIN_ARG_INFO(third_and_rest_force_ref, 1) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_END_ARG_INFO(); /* {{{ mb_overload_def mb_ovld[] */ static const struct mb_overload_def mb_ovld[] = { @@ -197,7 +197,7 @@ function_entry mbstring_functions[] = { PHP_FE(mb_http_output, NULL) PHP_FE(mb_detect_order, NULL) PHP_FE(mb_substitute_character, NULL) - PHP_FE(mb_parse_str, (unsigned char *)second_args_force_ref) + PHP_FE(mb_parse_str, (unsigned char *)second_arg_force_ref) PHP_FE(mb_output_handler, NULL) PHP_FE(mb_preferred_mime_name, NULL) PHP_FE(mb_strlen, NULL) diff --git a/ext/mcve/mcve.c b/ext/mcve/mcve.c index a328037baa..964a895de2 100644 --- a/ext/mcve/mcve.c +++ b/ext/mcve/mcve.c @@ -39,7 +39,6 @@ static int mcve_init; /* For Safe Memory Deallocation */ /* }}} */ /* {{{ extension definition structures */ -static unsigned char second_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE }; function_entry mcve_functions[] = { PHP_FE(mcve_initengine, NULL) diff --git a/ext/mssql/php_mssql.c b/ext/mssql/php_mssql.c index ea73c20ccb..04cd33c586 100644 --- a/ext/mssql/php_mssql.c +++ b/ext/mssql/php_mssql.c @@ -46,7 +46,6 @@ static void php_mssql_get_column_content_with_type(mssql_link *mssql_ptr,int off static void php_mssql_get_column_content_without_type(mssql_link *mssql_ptr,int offset,zval *result, int column_type TSRMLS_DC); static void _mssql_bind_hash_dtor(void *data); -static unsigned char a3_arg_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; function_entry mssql_functions[] = { PHP_FE(mssql_connect, NULL) @@ -75,7 +74,7 @@ function_entry mssql_functions[] = { PHP_FE(mssql_min_error_severity, NULL) PHP_FE(mssql_min_message_severity, NULL) PHP_FE(mssql_init, NULL) - PHP_FE(mssql_bind, a3_arg_force_ref) + PHP_FE(mssql_bind, third_arg_force_ref) PHP_FE(mssql_execute, NULL) PHP_FE(mssql_free_statement, NULL) PHP_FE(mssql_guid_string, NULL) diff --git a/ext/mysqli/mysqli_fe.c b/ext/mysqli/mysqli_fe.c index 6c6f50ee3b..58f7cdaa55 100644 --- a/ext/mysqli/mysqli_fe.c +++ b/ext/mysqli/mysqli_fe.c @@ -30,9 +30,16 @@ #include "php_mysqli.h" -static char all_arg_force_by_ref_rest[] = {1, BYREF_FORCE_REST}; -static char second_arg_force_by_ref_rest[] = {2, BYREF_NONE, BYREF_FORCE_REST}; -static char third_arg_force_by_ref_rest[] = {3, BYREF_NONE, BYREF_NONE, BYREF_FORCE_REST}; +static + ZEND_BEGIN_ARG_INFO(second_arg_force_by_ref_rest, 1) + ZEND_ARG_PASS_INFO(0) + ZEND_END_ARG_INFO(); + +static + ZEND_BEGIN_ARG_INFO(third_arg_force_by_ref_rest, 1) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_END_ARG_INFO(); /* {{{ mysqli_functions[] * @@ -230,7 +237,7 @@ function_entry mysqli_result_methods[] = { function_entry mysqli_stmt_methods[] = { PHP_FALIAS(affected_rows,mysqli_stmt_affected_rows,NULL) PHP_FALIAS(bind_param,mysqli_bind_param,second_arg_force_by_ref_rest) - PHP_FALIAS(bind_result,mysqli_bind_result,all_arg_force_by_ref_rest) + PHP_FALIAS(bind_result,mysqli_bind_result, all_args_force_ref) PHP_FALIAS(execute,mysqli_execute,NULL) PHP_FALIAS(fetch,mysqli_fetch,NULL) PHP_FALIAS(param_count,mysqli_param_count,NULL) diff --git a/ext/ncurses/ncurses_fe.c b/ext/ncurses/ncurses_fe.c index 24668594b2..07106706b3 100644 --- a/ext/ncurses/ncurses_fe.c +++ b/ext/ncurses/ncurses_fe.c @@ -25,11 +25,26 @@ #include "php_ini.h" #include "php_ncurses.h" -static unsigned char first_args_force_ref[] = {1, BYREF_FORCE}; -static unsigned char firstandsecond_args_force_ref[] = {2, BYREF_FORCE, BYREF_FORCE}; -static unsigned char second_args_force_ref[] = {2, BYREF_NONE, BYREF_FORCE}; -static unsigned char secondandthird_args_force_ref[] = {3, BYREF_NONE, BYREF_FORCE, BYREF_FORCE}; -static unsigned char second_thru_fourth_args_force_ref[] = {4, BYREF_NONE, BYREF_FORCE, BYREF_FORCE, BYREF_FORCE}; +static + ZEND_BEGIN_ARG_INFO(firstandsecond_args_force_ref, 0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); + +static + ZEND_BEGIN_ARG_INFO(secondandthird_args_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); + +static + ZEND_BEGIN_ARG_INFO(second_thru_fourth_args_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); /* ncurses_functions[] * @@ -151,7 +166,7 @@ function_entry ncurses_functions[] = { PHP_FE(ncurses_mvinch, NULL) PHP_FE(ncurses_mvwaddstr, NULL) PHP_FE(ncurses_insstr, NULL) - PHP_FE(ncurses_instr, first_args_force_ref) + PHP_FE(ncurses_instr, first_arg_force_ref) PHP_FE(ncurses_mvhline, NULL) PHP_FE(ncurses_mvcur, NULL) PHP_FE(ncurses_init_color, NULL) @@ -165,8 +180,8 @@ function_entry ncurses_functions[] = { PHP_FE(ncurses_keyok, NULL) PHP_FE(ncurses_termname, NULL) PHP_FE(ncurses_longname, NULL) - PHP_FE(ncurses_mousemask, second_args_force_ref) - PHP_FE(ncurses_getmouse, first_args_force_ref) + PHP_FE(ncurses_mousemask, second_arg_force_ref) + PHP_FE(ncurses_getmouse, first_arg_force_ref) PHP_FE(ncurses_ungetmouse, NULL) PHP_FE(ncurses_mouse_trafo, firstandsecond_args_force_ref) PHP_FE(ncurses_wmouse_trafo, secondandthird_args_force_ref) diff --git a/ext/oci8/oci8.c b/ext/oci8/oci8.c index 28895f5b59..8fd34a43f2 100644 --- a/ext/oci8/oci8.c +++ b/ext/oci8/oci8.c @@ -302,12 +302,9 @@ PHP_FUNCTION(ocicolltrim); #define OCI_FETCHSTATEMENT_BY_ROW 1<<5 #define OCI_FETCHSTATEMENT_BY (OCI_FETCHSTATEMENT_BY_COLUMN | OCI_FETCHSTATEMENT_BY_ROW) -static unsigned char a3_arg_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; -static unsigned char a2_arg_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE }; - static zend_function_entry php_oci_functions[] = { - PHP_FE(ocidefinebyname, a3_arg_force_ref) - PHP_FE(ocibindbyname, a3_arg_force_ref) + PHP_FE(ocidefinebyname, third_arg_force_ref) + PHP_FE(ocibindbyname, third_arg_force_ref) PHP_FE(ocicolumnisnull, NULL) PHP_FE(ocicolumnname, NULL) PHP_FE(ocicolumnsize, NULL) @@ -318,8 +315,8 @@ static zend_function_entry php_oci_functions[] = { PHP_FE(ociexecute, NULL) PHP_FE(ocicancel, NULL) PHP_FE(ocifetch, NULL) - PHP_FE(ocifetchinto, a2_arg_force_ref) - PHP_FE(ocifetchstatement, a2_arg_force_ref) + PHP_FE(ocifetchinto, second_arg_force_ref) + PHP_FE(ocifetchstatement, second_arg_force_ref) PHP_FE(ocifreestatement, NULL) PHP_FE(ociinternaldebug, NULL) PHP_FE(ocinumcols, NULL) diff --git a/ext/odbc/php_odbc.c b/ext/odbc/php_odbc.c index 75ae7e705b..3413a14ea7 100644 --- a/ext/odbc/php_odbc.c +++ b/ext/odbc/php_odbc.c @@ -66,8 +66,6 @@ static int le_result, le_conn, le_pconn; #define SAFE_SQL_NTS(n) ((SWORD) ((n)?(SQL_NTS):0)) -static unsigned char a3_arg3_and_3_force_ref[] = { 3, BYREF_NONE, BYREF_FORCE, BYREF_ALLOW}; - /* {{{ odbc_functions[] */ function_entry odbc_functions[] = { @@ -91,7 +89,7 @@ function_entry odbc_functions[] = { PHP_FE(odbc_fetch_object, NULL) #endif PHP_FE(odbc_fetch_row, NULL) - PHP_FE(odbc_fetch_into, a3_arg3_and_3_force_ref) + PHP_FE(odbc_fetch_into, second_arg_force_ref) PHP_FE(odbc_field_len, NULL) PHP_FE(odbc_field_scale, NULL) PHP_FE(odbc_field_name, NULL) diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 5a1764ee01..071b5027a6 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -52,10 +52,12 @@ #define DEBUG_SMIME 0 -static unsigned char arg2_force_ref[] = - { 2, BYREF_NONE, BYREF_FORCE }; -static unsigned char arg2and3_force_ref[] = - { 3, BYREF_NONE, BYREF_FORCE, BYREF_FORCE }; +static + ZEND_BEGIN_ARG_INFO(arg2and3_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); enum php_openssl_key_type { OPENSSL_KEYTYPE_RSA, @@ -80,7 +82,7 @@ function_entry openssl_functions[] = { /* public/private key functions */ PHP_FE(openssl_pkey_free, NULL) PHP_FE(openssl_pkey_new, NULL) - PHP_FE(openssl_pkey_export, arg2_force_ref) + PHP_FE(openssl_pkey_export, second_arg_force_ref) PHP_FE(openssl_pkey_export_to_file, NULL) PHP_FE(openssl_pkey_get_private, NULL) PHP_FE(openssl_pkey_get_public, NULL) @@ -95,19 +97,19 @@ function_entry openssl_functions[] = { PHP_FE(openssl_x509_parse, NULL) PHP_FE(openssl_x509_checkpurpose, NULL) PHP_FE(openssl_x509_check_private_key, NULL) - PHP_FE(openssl_x509_export, arg2_force_ref) + PHP_FE(openssl_x509_export, second_arg_force_ref) PHP_FE(openssl_x509_export_to_file, NULL) /* CSR funcs */ - PHP_FE(openssl_csr_new, arg2_force_ref) - PHP_FE(openssl_csr_export, arg2_force_ref) + PHP_FE(openssl_csr_new, second_arg_force_ref) + PHP_FE(openssl_csr_export, second_arg_force_ref) PHP_FE(openssl_csr_export_to_file, NULL) PHP_FE(openssl_csr_sign, NULL) - PHP_FE(openssl_sign, arg2_force_ref) + PHP_FE(openssl_sign, second_arg_force_ref) PHP_FE(openssl_verify, NULL) PHP_FE(openssl_seal, arg2and3_force_ref) - PHP_FE(openssl_open, arg2_force_ref) + PHP_FE(openssl_open, second_arg_force_ref) /* for S/MIME handling */ PHP_FE(openssl_pkcs7_verify, NULL) @@ -115,10 +117,10 @@ function_entry openssl_functions[] = { PHP_FE(openssl_pkcs7_sign, NULL) PHP_FE(openssl_pkcs7_encrypt, NULL) - PHP_FE(openssl_private_encrypt, arg2_force_ref) - PHP_FE(openssl_private_decrypt, arg2_force_ref) - PHP_FE(openssl_public_encrypt, arg2_force_ref) - PHP_FE(openssl_public_decrypt, arg2_force_ref) + PHP_FE(openssl_private_encrypt, second_arg_force_ref) + PHP_FE(openssl_private_decrypt, second_arg_force_ref) + PHP_FE(openssl_public_encrypt, second_arg_force_ref) + PHP_FE(openssl_public_decrypt, second_arg_force_ref) PHP_FE(openssl_error_string, NULL) {NULL, NULL, NULL} diff --git a/ext/oracle/oracle.c b/ext/oracle/oracle.c index 03cbff635a..002c5109bb 100644 --- a/ext/oracle/oracle.c +++ b/ext/oracle/oracle.c @@ -109,8 +109,6 @@ PHP_RSHUTDOWN_FUNCTION(oracle); PHP_MINFO_FUNCTION(oracle); /* }}} */ -static unsigned char second_args_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE }; - /* {{{ oracle_functions[] */ function_entry oracle_functions[] = { @@ -124,7 +122,7 @@ function_entry oracle_functions[] = { PHP_FE(ora_errorcode, NULL) PHP_FE(ora_exec, NULL) PHP_FE(ora_fetch, NULL) - PHP_FE(ora_fetch_into, second_args_force_ref) + PHP_FE(ora_fetch_into, second_arg_force_ref) PHP_FE(ora_columntype, NULL) PHP_FE(ora_columnname, NULL) PHP_FE(ora_columnsize, NULL) diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 2e1cf951ae..5e94cbec62 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -489,7 +489,8 @@ sxe_method_get(zval *object, char *name, int len TSRMLS_DC) f = emalloc(sizeof(zend_internal_function)); f->type = ZEND_OVERLOADED_FUNCTION; - f->arg_types = NULL; + f->arg_info = NULL; + f->num_args = 0; f->scope = sxe_class_entry; f->fn_flags = 0; f->function_name = estrndup(name, len); @@ -807,6 +808,7 @@ static zend_object_handlers sxe_object_handlers = { sxe_object_set, sxe_property_exists, sxe_property_delete, + NULL, sxe_properties_get, sxe_method_get, sxe_call_method, diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index c45ff687f2..979b709729 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -96,23 +96,40 @@ static int le_iov; static int le_socket; #define le_socket_name "Socket" -static unsigned char first_through_third_args_force_ref[] = -{3, BYREF_FORCE, BYREF_FORCE, BYREF_FORCE}; - -static unsigned char second_and_third_args_force_ref[] = -{3, BYREF_NONE, BYREF_FORCE, BYREF_FORCE}; - -static unsigned char second_arg_of_four_force_ref[] = -{4, BYREF_NONE, BYREF_FORCE, BYREF_NONE, BYREF_NONE}; - -static unsigned char fourth_arg_force_ref[] = -{4, BYREF_NONE, BYREF_NONE, BYREF_NONE, BYREF_FORCE}; +static + ZEND_BEGIN_ARG_INFO(first_through_third_args_force_ref, 0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); + +static + ZEND_BEGIN_ARG_INFO(second_and_third_args_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); static unsigned char second_fifth_and_sixth_args_force_ref[] = -{6, BYREF_NONE, BYREF_FORCE, BYREF_NONE, BYREF_NONE, BYREF_FORCE, BYREF_FORCE}; - -static unsigned char third_through_seventh_args_force_ref[] = -{7, BYREF_NONE, BYREF_NONE, BYREF_FORCE, BYREF_FORCE, BYREF_FORCE, BYREF_FORCE, BYREF_FORCE}; + ZEND_BEGIN_ARG_INFO(second_fifth_and_sixth_args_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); + +static + ZEND_BEGIN_ARG_INFO(third_through_seventh_args_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); /* {{{ sockets_functions[] */ @@ -139,7 +156,7 @@ function_entry sockets_functions[] = { PHP_FE(socket_connect, NULL) PHP_FE(socket_strerror, NULL) PHP_FE(socket_bind, NULL) - PHP_FE(socket_recv, second_arg_of_four_force_ref) + PHP_FE(socket_recv, second_arg_force_ref) PHP_FE(socket_send, NULL) PHP_FE(socket_recvfrom, second_fifth_and_sixth_args_force_ref) PHP_FE(socket_sendto, NULL) diff --git a/ext/sqlite/sqlite.c b/ext/sqlite/sqlite.c index 15dbf1c007..2c4b69b175 100644 --- a/ext/sqlite/sqlite.c +++ b/ext/sqlite/sqlite.c @@ -66,8 +66,6 @@ extern ps_module ps_mod_sqlite; extern int sqlite_encode_binary(const unsigned char *in, int n, unsigned char *out); extern int sqlite_decode_binary(const unsigned char *in, unsigned char *out); -static unsigned char arg3_force_ref[] = {3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; - static int le_sqlite_db, le_sqlite_result, le_sqlite_pdb; static inline void php_sqlite_strtoupper(char *s) @@ -165,8 +163,8 @@ struct php_sqlite_agg_functions { enum { PHPSQLITE_ASSOC = 1, PHPSQLITE_NUM = 2, PHPSQLITE_BOTH = PHPSQLITE_ASSOC|PHPSQLITE_NUM }; function_entry sqlite_functions[] = { - PHP_FE(sqlite_open, arg3_force_ref) - PHP_FE(sqlite_popen, arg3_force_ref) + PHP_FE(sqlite_open, third_arg_force_ref) + PHP_FE(sqlite_popen, third_arg_force_ref) PHP_FE(sqlite_close, NULL) PHP_FE(sqlite_query, NULL) PHP_FE(sqlite_array_query, NULL) @@ -197,7 +195,7 @@ function_entry sqlite_functions[] = { PHP_FE(sqlite_unbuffered_query, NULL) PHP_FE(sqlite_create_aggregate, NULL) PHP_FE(sqlite_create_function, NULL) - PHP_FE(sqlite_factory, arg3_force_ref) + PHP_FE(sqlite_factory, third_arg_force_ref) PHP_FE(sqlite_udf_encode_binary, NULL) PHP_FE(sqlite_udf_decode_binary, NULL) {NULL, NULL, NULL} diff --git a/ext/standard/basic_functions.c b/ext/standard/basic_functions.c index 3382f89be2..5354e16858 100644 --- a/ext/standard/basic_functions.c +++ b/ext/standard/basic_functions.c @@ -99,14 +99,40 @@ php_basic_globals basic_globals; #include "php_fopen_wrappers.h" #include "streamsfuncs.h" -static unsigned char first_and_second__args_force_ref[] = { 2, BYREF_FORCE, BYREF_FORCE }; -static unsigned char second_and_third_args_force_ref[] = { 3, BYREF_NONE, BYREF_FORCE, BYREF_FORCE }; -static unsigned char second_args_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE }; -static unsigned char third_and_fourth_args_force_ref[] = { 4, BYREF_NONE, BYREF_NONE, BYREF_FORCE, BYREF_FORCE }; -static unsigned char third_and_rest_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE_REST }; -static unsigned char first_through_third_args_force_ref[] = {3, BYREF_FORCE, BYREF_FORCE, BYREF_FORCE}; -static unsigned char fourth_arg_force_ref[] = { 4, BYREF_NONE, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; - +static + ZEND_BEGIN_ARG_INFO(first_and_second__args_force_ref, 0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); + +static + ZEND_BEGIN_ARG_INFO(second_and_third_args_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); + +static + ZEND_BEGIN_ARG_INFO(third_and_fourth_args_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); + +static + ZEND_BEGIN_ARG_INFO(third_and_rest_force_ref, 1) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); + +static + ZEND_BEGIN_ARG_INFO(first_through_third_args_force_ref, 0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); typedef struct _php_shutdown_function_entry { zval **arguments; @@ -304,7 +330,7 @@ function_entry basic_functions[] = { PHP_FE(iptcparse, NULL) PHP_FE(iptcembed, NULL) - PHP_FE(getimagesize, second_args_force_ref) + PHP_FE(getimagesize, second_arg_force_ref) PHP_FE(image_type_to_mime_type, NULL) PHP_FE(phpinfo, NULL) diff --git a/ext/sysvmsg/sysvmsg.c b/ext/sysvmsg/sysvmsg.c index 0b452dfcac..73870fe6a0 100644 --- a/ext/sysvmsg/sysvmsg.c +++ b/ext/sysvmsg/sysvmsg.c @@ -40,8 +40,27 @@ /* True global resources - no need for thread safety here */ static int le_sysvmsg; -static unsigned char sixth_arg_force_ref[] = { 6, BYREF_NONE, BYREF_NONE, BYREF_NONE, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; -static unsigned char msg_receive_args_force_ref[] = { 8, BYREF_NONE, BYREF_NONE, BYREF_FORCE, BYREF_NONE, BYREF_FORCE, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; +static + ZEND_BEGIN_ARG_INFO(sixth_arg_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); + +static + ZEND_BEGIN_ARG_INFO(msg_receive_args_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); /* {{{ sysvmsg_functions[] * diff --git a/ext/xml/xml.c b/ext/xml/xml.c index 95a08c71e4..2504a94460 100644 --- a/ext/xml/xml.c +++ b/ext/xml/xml.c @@ -100,7 +100,13 @@ void _xml_endNamespaceDeclHandler(void *, const XML_Char *); /* }}} */ /* {{{ extension definition structures */ -static unsigned char third_and_fourth_args_force_ref[] = { 4, BYREF_NONE, BYREF_NONE, BYREF_FORCE, BYREF_FORCE }; +static + ZEND_BEGIN_ARG_INFO(third_and_fourth_args_force_ref, 0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(0) + ZEND_ARG_PASS_INFO(1) + ZEND_ARG_PASS_INFO(1) + ZEND_END_ARG_INFO(); function_entry xml_functions[] = { PHP_FE(xml_parser_create, NULL) diff --git a/ext/xmlrpc/xmlrpc-epi-php.c b/ext/xmlrpc/xmlrpc-epi-php.c index b65fe30ffa..6d5c0d34fa 100644 --- a/ext/xmlrpc/xmlrpc-epi-php.c +++ b/ext/xmlrpc/xmlrpc-epi-php.c @@ -80,16 +80,13 @@ ZEND_DECLARE_MODULE_GLOBALS(xmlrpc) static int le_xmlrpc_server; -static unsigned char second_args_force_ref[] = { 3, BYREF_NONE, BYREF_FORCE, BYREF_NONE }; -static unsigned char first_args_force_ref[] = { 2, BYREF_FORCE, BYREF_NONE }; - function_entry xmlrpc_functions[] = { PHP_FE(xmlrpc_encode, NULL) PHP_FE(xmlrpc_decode, NULL) - PHP_FE(xmlrpc_decode_request, second_args_force_ref) + PHP_FE(xmlrpc_decode_request, second_arg_force_ref) PHP_FE(xmlrpc_encode_request, NULL) PHP_FE(xmlrpc_get_type, NULL) - PHP_FE(xmlrpc_set_type, first_args_force_ref) + PHP_FE(xmlrpc_set_type, first_arg_force_ref) PHP_FE(xmlrpc_is_fault, NULL) PHP_FE(xmlrpc_server_create, NULL) PHP_FE(xmlrpc_server_destroy, NULL) diff --git a/ext/yaz/php_yaz.c b/ext/yaz/php_yaz.c index 1b549a4063..48fdaa89af 100644 --- a/ext/yaz/php_yaz.c +++ b/ext/yaz/php_yaz.c @@ -109,14 +109,11 @@ static Yaz_Association *shared_associations; static int order_associations; static int le_link; -static unsigned char third_argument_force_ref[] = { 3, BYREF_NONE, BYREF_NONE, BYREF_FORCE }; -static unsigned char second_argument_force_ref[] = { 2, BYREF_NONE, BYREF_FORCE }; - function_entry yaz_functions [] = { PHP_FE(yaz_connect, NULL) PHP_FE(yaz_close, NULL) PHP_FE(yaz_search, NULL) - PHP_FE(yaz_wait, second_argument_force_ref) + PHP_FE(yaz_wait, second_arg_force_ref) PHP_FE(yaz_errno, NULL) PHP_FE(yaz_error, NULL) PHP_FE(yaz_addinfo, NULL) @@ -128,10 +125,10 @@ function_entry yaz_functions [] = { PHP_FE(yaz_itemorder, NULL) PHP_FE(yaz_es_result, NULL) PHP_FE(yaz_scan, NULL) - PHP_FE(yaz_scan_result, second_argument_force_ref) + PHP_FE(yaz_scan_result, second_arg_force_ref) PHP_FE(yaz_present, NULL) PHP_FE(yaz_ccl_conf, NULL) - PHP_FE(yaz_ccl_parse, third_argument_force_ref) + PHP_FE(yaz_ccl_parse, third_arg_force_ref) PHP_FE(yaz_database, NULL) PHP_FE(yaz_sort, NULL) PHP_FE(yaz_schema, NULL) |