From f0d98ad3de90dc5e1261bfd481c20a655ada2c9b Mon Sep 17 00:00:00 2001 From: Hannes Magnusson Date: Wed, 14 Jun 2006 21:36:10 +0000 Subject: [PATCH] MFH: argument info.. --- ext/fbsql/php_fbsql.c | 478 ++++++++++++++++++++++++++++++++++++------ ext/fdf/fdf.c | 299 ++++++++++++++++++++++---- ext/gettext/gettext.c | 89 +++++++- ext/gmp/gmp.c | 313 +++++++++++++++++++++++---- 4 files changed, 1030 insertions(+), 149 deletions(-) diff --git a/ext/fbsql/php_fbsql.c b/ext/fbsql/php_fbsql.c index bd84f0cd517..3174defd9d5 100644 --- a/ext/fbsql/php_fbsql.c +++ b/ext/fbsql/php_fbsql.c @@ -181,77 +181,430 @@ char *DigestPassword(char *user, char *password) return digest; } +/* {{{ arginfo */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_connect, 0, 0, 0) + ZEND_ARG_INFO(0, hostname) + ZEND_ARG_INFO(0, username) + ZEND_ARG_INFO(0, password) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_pconnect, 0, 0, 0) + ZEND_ARG_INFO(0, username) + ZEND_ARG_INFO(0, hostname) + ZEND_ARG_INFO(0, password) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_close, 0, 0, 0) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fbsql_set_transaction, 0) + ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, locking) + ZEND_ARG_INFO(0, isolation) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_autocommit, 0, 0, 1) + ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, OnOff) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_commit, 0, 0, 0) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_rollback, 0, 0, 0) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_create_blob, 0, 0, 1) + ZEND_ARG_INFO(0, blob_data) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_create_clob, 0, 0, 1) + ZEND_ARG_INFO(0, clob_data) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fbsql_set_lob_mode, 0) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, lob_mode) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_read_blob, 0, 0, 1) + ZEND_ARG_INFO(0, blob_handle) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_read_clob, 0, 0, 1) + ZEND_ARG_INFO(0, clob_handle) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_blob_size, 0, 0, 1) + ZEND_ARG_INFO(0, blob_handle) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_clob_size, 0, 0, 1) + ZEND_ARG_INFO(0, clob_handle) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_hostname, 0, 0, 1) + ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, host_name) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_database, 0, 0, 1) + ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, database) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_database_password, 0, 0, 1) + ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, database_password) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_username, 0, 0, 1) + ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, username) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_password, 0, 0, 1) + ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, password) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fbsql_set_password, 0) + ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, user) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, old_password) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_select_db, 0, 0, 0) + ZEND_ARG_INFO(0, database_name) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_set_characterset, 0, 0, 2) + ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, charcterset) + ZEND_ARG_INFO(0, in_out_both) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_change_user, 0, 0, 2) + ZEND_ARG_INFO(0, user) + ZEND_ARG_INFO(0, password) + ZEND_ARG_INFO(0, database) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_create_db, 0, 0, 1) + ZEND_ARG_INFO(0, database_name) + ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, database_options) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_drop_db, 0, 0, 1) + ZEND_ARG_INFO(0, database_name) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_start_db, 0, 0, 1) + ZEND_ARG_INFO(0, database_name) + ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, database_options) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_stop_db, 0, 0, 1) + ZEND_ARG_INFO(0, database_name) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_db_status, 0, 0, 1) + ZEND_ARG_INFO(0, database_name) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_query, 0, 0, 1) + ZEND_ARG_INFO(0, query) + ZEND_ARG_INFO(0, link_identifier) + ZEND_ARG_INFO(0, batch_size) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_db_query, 0, 0, 2) + ZEND_ARG_INFO(0, database_name) + ZEND_ARG_INFO(0, query) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_list_dbs, 0, 0, 0) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_list_tables, 0, 0, 1) + ZEND_ARG_INFO(0, database) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_list_fields, 0, 0, 2) + ZEND_ARG_INFO(0, database_name) + ZEND_ARG_INFO(0, table_name) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_error, 0, 0, 0) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_errno, 0, 0, 0) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_warnings, 0, 0, 0) + ZEND_ARG_INFO(0, flag) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_affected_rows, 0, 0, 0) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fbsql_rows_fetched, 0) + ZEND_ARG_INFO(0, result) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_insert_id, 0, 0, 0) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_result, 0, 0, 1) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, row) + ZEND_ARG_INFO(0, field) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fbsql_next_result, 0) + ZEND_ARG_INFO(0, result) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fbsql_num_rows, 0) + ZEND_ARG_INFO(0, result) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fbsql_num_fields, 0) + ZEND_ARG_INFO(0, result) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fbsql_fetch_row, 0) + ZEND_ARG_INFO(0, result) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fbsql_fetch_assoc, 0) + ZEND_ARG_INFO(0, result) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_fetch_object, 0, 0, 1) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, result_type) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_fetch_array, 0, 0, 1) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, result_type) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fbsql_data_seek, 0) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, row_number) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fbsql_fetch_lengths, 0) + ZEND_ARG_INFO(0, result) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_fetch_field, 0, 0, 1) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, field_index) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_field_seek, 0, 0, 1) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, field_index) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_field_name, 0, 0, 1) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, field_index) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_field_table, 0, 0, 1) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, field_index) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_field_len, 0, 0, 1) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, field_index) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_field_type, 0, 0, 1) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, field_index) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_field_flags, 0, 0, 1) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, field_index) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fbsql_table_name, 0) + ZEND_ARG_INFO(0, result) + ZEND_ARG_INFO(0, index) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fbsql_free_result, 0) + ZEND_ARG_INFO(0, result) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fbsql_get_autostart_info, 0, 0, 0) + ZEND_ARG_INFO(0, link_identifier) +ZEND_END_ARG_INFO() + +/* }}} */ + /* {{{ fbsql_functions[] */ zend_function_entry fbsql_functions[] = { - PHP_FE(fbsql_connect, NULL) - PHP_FE(fbsql_pconnect, NULL) - PHP_FE(fbsql_close, NULL) - PHP_FE(fbsql_select_db, NULL) - PHP_FE(fbsql_set_characterset, NULL) - PHP_FE(fbsql_create_db, NULL) - PHP_FE(fbsql_drop_db, NULL) - PHP_FE(fbsql_start_db, NULL) - PHP_FE(fbsql_stop_db, NULL) - PHP_FE(fbsql_db_status, NULL) - PHP_FE(fbsql_query, NULL) - PHP_FE(fbsql_db_query, NULL) - PHP_FE(fbsql_list_dbs, NULL) - PHP_FE(fbsql_list_tables, NULL) - PHP_FE(fbsql_list_fields, NULL) - PHP_FE(fbsql_error, NULL) - PHP_FE(fbsql_errno, NULL) - PHP_FE(fbsql_affected_rows, NULL) - PHP_FE(fbsql_rows_fetched, NULL) - PHP_FE(fbsql_insert_id, NULL) - PHP_FE(fbsql_result, NULL) - PHP_FE(fbsql_next_result, NULL) - PHP_FE(fbsql_num_rows, NULL) - PHP_FE(fbsql_num_fields, NULL) - PHP_FE(fbsql_fetch_row, NULL) - PHP_FE(fbsql_fetch_array, NULL) - PHP_FE(fbsql_fetch_assoc, NULL) - PHP_FE(fbsql_fetch_object, NULL) - PHP_FE(fbsql_data_seek, NULL) - PHP_FE(fbsql_fetch_lengths, NULL) - PHP_FE(fbsql_fetch_field, NULL) - PHP_FE(fbsql_field_seek, NULL) - PHP_FE(fbsql_free_result, NULL) - PHP_FE(fbsql_field_name, NULL) - PHP_FE(fbsql_field_table, NULL) - PHP_FE(fbsql_field_len, NULL) - PHP_FE(fbsql_field_type, NULL) - PHP_FE(fbsql_field_flags, NULL) - PHP_FE(fbsql_table_name, NULL) + PHP_FE(fbsql_connect, arginfo_fbsql_connect) + PHP_FE(fbsql_pconnect, arginfo_fbsql_pconnect) + PHP_FE(fbsql_close, arginfo_fbsql_close) + PHP_FE(fbsql_select_db, arginfo_fbsql_select_db) + PHP_FE(fbsql_set_characterset, arginfo_fbsql_set_characterset) + PHP_FE(fbsql_create_db, arginfo_fbsql_create_db) + PHP_FE(fbsql_drop_db, arginfo_fbsql_drop_db) + PHP_FE(fbsql_start_db, arginfo_fbsql_start_db) + PHP_FE(fbsql_stop_db, arginfo_fbsql_stop_db) + PHP_FE(fbsql_db_status, arginfo_fbsql_db_status) + PHP_FE(fbsql_query, arginfo_fbsql_query) + PHP_FE(fbsql_db_query, arginfo_fbsql_db_query) + PHP_FE(fbsql_list_dbs, arginfo_fbsql_list_dbs) + PHP_FE(fbsql_list_tables, arginfo_fbsql_list_tables) + PHP_FE(fbsql_list_fields, arginfo_fbsql_list_fields) + PHP_FE(fbsql_error, arginfo_fbsql_error) + PHP_FE(fbsql_errno, arginfo_fbsql_errno) + PHP_FE(fbsql_affected_rows, arginfo_fbsql_affected_rows) + PHP_FE(fbsql_rows_fetched, arginfo_fbsql_rows_fetched) + PHP_FE(fbsql_insert_id, arginfo_fbsql_insert_id) + PHP_FE(fbsql_result, arginfo_fbsql_result) + PHP_FE(fbsql_next_result, arginfo_fbsql_next_result) + PHP_FE(fbsql_num_rows, arginfo_fbsql_num_rows) + PHP_FE(fbsql_num_fields, arginfo_fbsql_num_fields) + PHP_FE(fbsql_fetch_row, arginfo_fbsql_fetch_row) + PHP_FE(fbsql_fetch_array, arginfo_fbsql_fetch_array) + PHP_FE(fbsql_fetch_assoc, arginfo_fbsql_fetch_assoc) + PHP_FE(fbsql_fetch_object, arginfo_fbsql_fetch_object) + PHP_FE(fbsql_data_seek, arginfo_fbsql_data_seek) + PHP_FE(fbsql_fetch_lengths, arginfo_fbsql_fetch_lengths) + PHP_FE(fbsql_fetch_field, arginfo_fbsql_fetch_field) + PHP_FE(fbsql_field_seek, arginfo_fbsql_field_seek) + PHP_FE(fbsql_free_result, arginfo_fbsql_free_result) + PHP_FE(fbsql_field_name, arginfo_fbsql_field_name) + PHP_FE(fbsql_field_table, arginfo_fbsql_field_table) + PHP_FE(fbsql_field_len, arginfo_fbsql_field_len) + PHP_FE(fbsql_field_type, arginfo_fbsql_field_type) + PHP_FE(fbsql_field_flags, arginfo_fbsql_field_flags) + PHP_FE(fbsql_table_name, arginfo_fbsql_table_name) /* Fontbase additions: */ - PHP_FE(fbsql_set_transaction, NULL) - PHP_FE(fbsql_autocommit, NULL) - PHP_FE(fbsql_commit, NULL) - PHP_FE(fbsql_rollback, NULL) + PHP_FE(fbsql_set_transaction, arginfo_fbsql_set_transaction) + PHP_FE(fbsql_autocommit, arginfo_fbsql_autocommit) + PHP_FE(fbsql_commit, arginfo_fbsql_commit) + PHP_FE(fbsql_rollback, arginfo_fbsql_rollback) - PHP_FE(fbsql_create_blob, NULL) - PHP_FE(fbsql_create_clob, NULL) - PHP_FE(fbsql_set_lob_mode, NULL) - PHP_FE(fbsql_read_blob, NULL) - PHP_FE(fbsql_read_clob, NULL) - PHP_FE(fbsql_blob_size, NULL) - PHP_FE(fbsql_clob_size, NULL) + PHP_FE(fbsql_create_blob, arginfo_fbsql_create_blob) + PHP_FE(fbsql_create_clob, arginfo_fbsql_create_clob) + PHP_FE(fbsql_set_lob_mode, arginfo_fbsql_set_lob_mode) + PHP_FE(fbsql_read_blob, arginfo_fbsql_read_blob) + PHP_FE(fbsql_read_clob, arginfo_fbsql_read_clob) + PHP_FE(fbsql_blob_size, arginfo_fbsql_blob_size) + PHP_FE(fbsql_clob_size, arginfo_fbsql_clob_size) - PHP_FE(fbsql_hostname, NULL) - PHP_FE(fbsql_database, NULL) - PHP_FE(fbsql_database_password, NULL) - PHP_FE(fbsql_username, NULL) - PHP_FE(fbsql_password, NULL) - PHP_FE(fbsql_warnings, NULL) - PHP_FE(fbsql_set_password, NULL) + PHP_FE(fbsql_hostname, arginfo_fbsql_hostname) + PHP_FE(fbsql_database, arginfo_fbsql_database) + PHP_FE(fbsql_database_password, arginfo_fbsql_database_password) + PHP_FE(fbsql_username, arginfo_fbsql_username) + PHP_FE(fbsql_password, arginfo_fbsql_password) + PHP_FE(fbsql_warnings, arginfo_fbsql_warnings) + PHP_FE(fbsql_set_password, arginfo_fbsql_set_password) - PHP_FE(fbsql_get_autostart_info, NULL) + PHP_FE(fbsql_get_autostart_info, arginfo_fbsql_get_autostart_info) /* PHP_FE(fbsql_set_autostart_info, NULL) */ /* Aliases: */ - PHP_FALIAS(fbsql, fbsql_db_query, NULL) - PHP_FALIAS(fbsql_tablename, fbsql_table_name, NULL) + PHP_FALIAS(fbsql, fbsql_db_query, arginfo_fbsql_db_query) + PHP_FALIAS(fbsql_tablename, fbsql_table_name, arginfo_fbsql_table_name) {NULL, NULL, NULL} }; @@ -1485,6 +1838,7 @@ PHP_FUNCTION(fbsql_set_characterset) fbcdcSetOutputCharacterSet(phpLink->connection, charset); } } +/* }}} */ /* {{{ proto int fbsql_change_user(string user, string password [, string database [, resource link_identifier]]) Change the user for a session */ @@ -1547,7 +1901,7 @@ PHP_FUNCTION(fbsql_change_user) } /* }}} */ -/* {{{ proto bool fbsql_create_db(string database_name [, resource link_identifier]) +/* {{{ proto bool fbsql_create_db(string database_name [, resource link_identifier [, string database_options]]) Create a new database on the server */ PHP_FUNCTION(fbsql_create_db) { @@ -2371,7 +2725,7 @@ PHP_FUNCTION(fbsql_affected_rows) } /* }}} */ -/* {{{ proto int fbsql_affected_rows([resource link_identifier]) +/* {{{ proto int fbsql_rows_fetched(resource result) Get the number of rows affected by the last statement */ PHP_FUNCTION(fbsql_rows_fetched) { diff --git a/ext/fdf/fdf.c b/ext/fdf/fdf.c index b88fa71260f..3fe953b9568 100644 --- a/ext/fdf/fdf.c +++ b/ext/fdf/fdf.c @@ -47,45 +47,272 @@ static int le_fdf; SAPI_POST_HANDLER_FUNC(fdf_post_handler); +/* {{{ arginfo */ +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_open, 0) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_open_string, 0) + ZEND_ARG_INFO(0, fdf_data) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_create, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_close, 0) + ZEND_ARG_INFO(0, fdfdoc) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fdf_get_value, 0, 0, 2) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, fieldname) + ZEND_ARG_INFO(0, which) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fdf_set_value, 0, 0, 3) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, fieldname) + ZEND_ARG_INFO(0, value) + ZEND_ARG_INFO(0, isname) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fdf_next_field_name, 0, 0, 1) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, fieldname) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_set_ap, 0) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, fieldname) + ZEND_ARG_INFO(0, face) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, pagenr) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_get_ap, 0) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, fieldname) + ZEND_ARG_INFO(0, face) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_get_encoding, 0) + ZEND_ARG_INFO(0, fdfdoc) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_set_status, 0) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, status) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_get_status, 0) + ZEND_ARG_INFO(0, fdfdoc) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fdf_set_file, 0, 0, 2) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, target_frame) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_get_file, 0) + ZEND_ARG_INFO(0, fdfdoc) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fdf_save, 0, 0, 1) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, filename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_save_string, 0) + ZEND_ARG_INFO(0, fdfdoc) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_add_template, 0) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, newpage) + ZEND_ARG_INFO(0, filename) + ZEND_ARG_INFO(0, template) + ZEND_ARG_INFO(0, rename) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_set_flags, 0) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, fieldname) + ZEND_ARG_INFO(0, whichflags) + ZEND_ARG_INFO(0, newflags) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_get_flags, 0) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, fieldname) + ZEND_ARG_INFO(0, whichflags) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_set_opt, 0) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, fieldname) + ZEND_ARG_INFO(0, element) + ZEND_ARG_INFO(0, value) + ZEND_ARG_INFO(0, name) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fdf_get_opt, 0, 0, 2) + ZEND_ARG_INFO(0, fdfdof) + ZEND_ARG_INFO(0, fieldname) + ZEND_ARG_INFO(0, element) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_set_submit_form_action, 0) + ZEND_ARG_INFO(0, resource fdfdoc) + ZEND_ARG_INFO(0, fieldname) + ZEND_ARG_INFO(0, whichtrigger) + ZEND_ARG_INFO(0, url) + ZEND_ARG_INFO(0, flags) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_set_javascript_action, 0) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, fieldname) + ZEND_ARG_INFO(0, whichtrigger) + ZEND_ARG_INFO(0, script) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_set_encoding, 0) + ZEND_ARG_INFO(0, fdf_document) + ZEND_ARG_INFO(0, encoding) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_errno, 0) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_error, 0) + ZEND_ARG_INFO(0, errno) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fdf_get_version, 0, 0, 0) + ZEND_ARG_INFO(0, fdfdoc) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_set_version, 0) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, version) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_add_doc_javascript, 0) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, scriptname) + ZEND_ARG_INFO(0, script) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_set_on_import_javascript, 0) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, script) + ZEND_ARG_INFO(0, before_data_import) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_set_target_frame, 0) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, target) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_remove_item, 0) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, fieldname) + ZEND_ARG_INFO(0, item) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_fdf_get_attachment, 0) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, fieldname) + ZEND_ARG_INFO(0, savepath) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fdf_enum_values, 0, 0, 2) + ZEND_ARG_INFO(0, fdfdoc) + ZEND_ARG_INFO(0, function) + ZEND_ARG_INFO(0, userdata) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_fdf_header, 0) +ZEND_END_ARG_INFO() + +/* }}} */ + /* {{{ fdf_functions[] */ zend_function_entry fdf_functions[] = { - PHP_FE(fdf_add_template, NULL) - PHP_FE(fdf_close, NULL) - PHP_FE(fdf_create, NULL) - PHP_FE(fdf_enum_values, NULL) - PHP_FE(fdf_errno, NULL) - PHP_FE(fdf_error, NULL) - PHP_FE(fdf_get_ap, NULL) - PHP_FE(fdf_get_encoding, NULL) - PHP_FE(fdf_get_file, NULL) - PHP_FE(fdf_get_flags, NULL) - PHP_FE(fdf_get_opt, NULL) - PHP_FE(fdf_get_status, NULL) - PHP_FE(fdf_get_value, NULL) - PHP_FE(fdf_get_version, NULL) - PHP_FE(fdf_next_field_name, NULL) - PHP_FE(fdf_open, NULL) - PHP_FE(fdf_open_string, NULL) - PHP_FE(fdf_remove_item, NULL) - PHP_FE(fdf_save, NULL) - PHP_FE(fdf_save_string, NULL) - PHP_FE(fdf_set_ap, NULL) - PHP_FE(fdf_set_encoding, NULL) - PHP_FE(fdf_set_file, NULL) - PHP_FE(fdf_set_flags, NULL) - PHP_FE(fdf_set_javascript_action, NULL) - PHP_FE(fdf_set_opt, NULL) - PHP_FE(fdf_set_status, NULL) - PHP_FE(fdf_set_submit_form_action, NULL) - PHP_FE(fdf_set_value, NULL) - PHP_FE(fdf_header, NULL) + PHP_FE(fdf_add_template, arginfo_fdf_add_template) + PHP_FE(fdf_close, arginfo_fdf_close) + PHP_FE(fdf_create, arginfo_fdf_create) + PHP_FE(fdf_enum_values, arginfo_fdf_enum_values) + PHP_FE(fdf_errno, arginfo_fdf_errno) + PHP_FE(fdf_error, arginfo_fdf_error) + PHP_FE(fdf_get_ap, arginfo_fdf_get_ap) + PHP_FE(fdf_get_encoding, arginfo_fdf_get_encoding) + PHP_FE(fdf_get_file, arginfo_fdf_get_file) + PHP_FE(fdf_get_flags, arginfo_fdf_get_flags) + PHP_FE(fdf_get_opt, arginfo_fdf_get_opt) + PHP_FE(fdf_get_status, arginfo_fdf_get_status) + PHP_FE(fdf_get_value, arginfo_fdf_get_value) + PHP_FE(fdf_get_version, arginfo_fdf_get_version) + PHP_FE(fdf_next_field_name, arginfo_fdf_next_field_name) + PHP_FE(fdf_open, arginfo_fdf_open) + PHP_FE(fdf_open_string, arginfo_fdf_open_string) + PHP_FE(fdf_remove_item, arginfo_fdf_remove_item) + PHP_FE(fdf_save, arginfo_fdf_save) + PHP_FE(fdf_save_string, arginfo_fdf_save_string) + PHP_FE(fdf_set_ap, arginfo_fdf_set_ap) + PHP_FE(fdf_set_encoding, arginfo_fdf_set_encoding) + PHP_FE(fdf_set_file, arginfo_fdf_set_file) + PHP_FE(fdf_set_flags, arginfo_fdf_set_flags) + PHP_FE(fdf_set_javascript_action, arginfo_fdf_set_javascript_action) + PHP_FE(fdf_set_opt, arginfo_fdf_set_opt) + PHP_FE(fdf_set_status, arginfo_fdf_set_status) + PHP_FE(fdf_set_submit_form_action, arginfo_fdf_set_submit_form_action) + PHP_FE(fdf_set_value, arginfo_fdf_set_value) + PHP_FE(fdf_header, arginfo_fdf_header) #ifdef HAVE_FDFTK_5 - PHP_FE(fdf_add_doc_javascript, NULL) - PHP_FE(fdf_get_attachment, NULL) - PHP_FE(fdf_set_on_import_javascript, NULL) - PHP_FE(fdf_set_target_frame, NULL) - PHP_FE(fdf_set_version, NULL) + PHP_FE(fdf_add_doc_javascript, arginfo_fdf_add_doc_javascript) + PHP_FE(fdf_get_attachment, arginfo_fdf_get_attachment) + PHP_FE(fdf_set_on_import_javascript, arginfo_fdf_set_on_import_javascript) + PHP_FE(fdf_set_target_frame, arginfo_fdf_set_target_frame) + PHP_FE(fdf_set_version, arginfo_fdf_set_version) #endif {NULL, NULL, NULL} }; @@ -1384,7 +1611,7 @@ PHP_FUNCTION(fdf_add_doc_javascript) { } /* }}} */ -/* {{{ proto bool fdf_set_on_import_javascript(resource fdfdoc, string script [, bool before_data_import]) +/* {{{ proto bool fdf_set_on_import_javascript(resource fdfdoc, string script, bool before_data_import) Adds javascript code to be executed when Acrobat opens the FDF */ PHP_FUNCTION(fdf_set_on_import_javascript) { zval *r_fdf; diff --git a/ext/gettext/gettext.c b/ext/gettext/gettext.c index 2212600224b..8cd04c4bcd1 100644 --- a/ext/gettext/gettext.c +++ b/ext/gettext/gettext.c @@ -30,27 +30,96 @@ #include "ext/standard/info.h" #include "php_gettext.h" +/* {{{ arginfo */ +static +ZEND_BEGIN_ARG_INFO(arginfo_textdomain, 0) + ZEND_ARG_INFO(0, domain) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gettext, 0) + ZEND_ARG_INFO(0, msgid) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_dgettext, 0) + ZEND_ARG_INFO(0, domain_name) + ZEND_ARG_INFO(0, msgid) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_dcgettext, 0) + ZEND_ARG_INFO(0, domain_name) + ZEND_ARG_INFO(0, msgid) + ZEND_ARG_INFO(0, category) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_bindtextdomain, 0) + ZEND_ARG_INFO(0, domain_name) + ZEND_ARG_INFO(0, dir) +ZEND_END_ARG_INFO() + +#if HAVE_NGETTEXT +static +ZEND_BEGIN_ARG_INFO(arginfo_ngettext, 0) + ZEND_ARG_INFO(0, msgid1) + ZEND_ARG_INFO(0, msgid2) + ZEND_ARG_INFO(0, count) +ZEND_END_ARG_INFO() +#endif + +#if HAVE_DNGETTEXT +static +ZEND_BEGIN_ARG_INFO(arginfo_dngettext, 0) + ZEND_ARG_INFO(0, domain) + ZEND_ARG_INFO(0, msgid1) + ZEND_ARG_INFO(0, msgid2) + ZEND_ARG_INFO(0, count) +ZEND_END_ARG_INFO() +#endif + +#if HAVE_DCNGETTEXT +static +ZEND_BEGIN_ARG_INFO(arginfo_dcngettext, 0) + ZEND_ARG_INFO(0, domain) + ZEND_ARG_INFO(0, msgid1) + ZEND_ARG_INFO(0, msgid2) + ZEND_ARG_INFO(0, count) + ZEND_ARG_INFO(0, category) +ZEND_END_ARG_INFO() +#endif + +#if HAVE_BIND_TEXTDOMAIN_CODESET +static +ZEND_BEGIN_ARG_INFO(arginfo_bind_textdomain_codeset, 0) + ZEND_ARG_INFO(0, domain) + ZEND_ARG_INFO(0, codeset) +ZEND_END_ARG_INFO() +#endif +/* }}} */ + /* {{{ php_gettext_functions[] */ zend_function_entry php_gettext_functions[] = { - PHP_NAMED_FE(textdomain, zif_textdomain, NULL) - PHP_NAMED_FE(gettext, zif_gettext, NULL) + PHP_NAMED_FE(textdomain, zif_textdomain, arginfo_textdomain) + PHP_NAMED_FE(gettext, zif_gettext, arginfo_gettext) /* Alias for gettext() */ - PHP_NAMED_FE(_, zif_gettext, NULL) - PHP_NAMED_FE(dgettext, zif_dgettext, NULL) - PHP_NAMED_FE(dcgettext, zif_dcgettext, NULL) - PHP_NAMED_FE(bindtextdomain, zif_bindtextdomain, NULL) + PHP_NAMED_FE(_, zif_gettext, arginfo_gettext) + PHP_NAMED_FE(dgettext, zif_dgettext, arginfo_dgettext) + PHP_NAMED_FE(dcgettext, zif_dcgettext, arginfo_dcgettext) + PHP_NAMED_FE(bindtextdomain, zif_bindtextdomain, arginfo_bindtextdomain) #if HAVE_NGETTEXT - PHP_NAMED_FE(ngettext, zif_ngettext, NULL) + PHP_NAMED_FE(ngettext, zif_ngettext, arginfo_ngettext) #endif #if HAVE_DNGETTEXT - PHP_NAMED_FE(dngettext, zif_dngettext, NULL) + PHP_NAMED_FE(dngettext, zif_dngettext, arginfo_dngettext) #endif #if HAVE_DCNGETTEXT - PHP_NAMED_FE(dcngettext, zif_dcngettext, NULL) + PHP_NAMED_FE(dcngettext, zif_dcngettext, arginfo_dcngettext) #endif #if HAVE_BIND_TEXTDOMAIN_CODESET - PHP_NAMED_FE(bind_textdomain_codeset, zif_bind_textdomain_codeset, NULL) + PHP_NAMED_FE(bind_textdomain_codeset, zif_bind_textdomain_codeset, arginfo_bind_textdomain_codeset) #endif {NULL, NULL, NULL} }; diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c index c946b8ff9c8..163c46b6fe4 100644 --- a/ext/gmp/gmp.c +++ b/ext/gmp/gmp.c @@ -37,48 +37,279 @@ /* True global resources - no need for thread safety here */ static int le_gmp; +/* {{{ arginfo */ +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_init, 0, 0, 1) + ZEND_ARG_INFO(0, number) + ZEND_ARG_INFO(0, base) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_intval, 0) + ZEND_ARG_INFO(0, gmpnumber) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_strval, 0, 0, 1) + ZEND_ARG_INFO(0, gmpnumber) + ZEND_ARG_INFO(0, base) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_add, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_sub, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_mul, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_div_qr, 0, 0, 2) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) + ZEND_ARG_INFO(0, round) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_div_r, 0, 0, 2) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) + ZEND_ARG_INFO(0, round) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_div_q, 0, 0, 2) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) + ZEND_ARG_INFO(0, round) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_mod, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_divexact, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_neg, 0) + ZEND_ARG_INFO(0, a) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_abs, 0) + ZEND_ARG_INFO(0, a) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_fact, 0) + ZEND_ARG_INFO(0, a) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_pow, 0) + ZEND_ARG_INFO(0, base) + ZEND_ARG_INFO(0, exp) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_powm, 0) + ZEND_ARG_INFO(0, base) + ZEND_ARG_INFO(0, exp) + ZEND_ARG_INFO(0, mod) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_sqrt, 0) + ZEND_ARG_INFO(0, a) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_sqrtrem, 0) + ZEND_ARG_INFO(0, a) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_perfect_square, 0) + ZEND_ARG_INFO(0, a) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_prob_prime, 0, 0, 1) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, reps) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_gcd, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_gcdext, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_invert, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_jacobi, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_legendre, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_cmp, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_sign, 0) + ZEND_ARG_INFO(0, a) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_random, 0, 0, 0) + ZEND_ARG_INFO(0, limiter) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_and, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_or, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_com, 0) + ZEND_ARG_INFO(0, a) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_nextprime, 0) + ZEND_ARG_INFO(0, a) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_xor, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO_EX(arginfo_gmp_setbit, 0, 0, 2) + ZEND_ARG_INFO(1, a) + ZEND_ARG_INFO(0, index) + ZEND_ARG_INFO(0, set_clear) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_clrbit, 0) + ZEND_ARG_INFO(1, a) + ZEND_ARG_INFO(0, index) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_popcount, 0) + ZEND_ARG_INFO(0, a) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_hamdist, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, b) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_scan0, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, start) +ZEND_END_ARG_INFO() + +static +ZEND_BEGIN_ARG_INFO(arginfo_gmp_scan1, 0) + ZEND_ARG_INFO(0, a) + ZEND_ARG_INFO(0, start) +ZEND_END_ARG_INFO() + +/* }}} */ + /* {{{ gmp_functions[] */ zend_function_entry gmp_functions[] = { - ZEND_FE(gmp_init, NULL) - ZEND_FE(gmp_intval, NULL) - ZEND_FE(gmp_strval, NULL) - ZEND_FE(gmp_add, NULL) - ZEND_FE(gmp_sub, NULL) - ZEND_FE(gmp_mul, NULL) - ZEND_FE(gmp_div_qr, NULL) - ZEND_FE(gmp_div_q, NULL) - ZEND_FE(gmp_div_r, NULL) - ZEND_FALIAS(gmp_div, gmp_div_q, NULL) - ZEND_FE(gmp_mod, NULL) - ZEND_FE(gmp_divexact, NULL) - ZEND_FE(gmp_neg, NULL) - ZEND_FE(gmp_abs, NULL) - ZEND_FE(gmp_fact, NULL) - ZEND_FE(gmp_sqrt, NULL) - ZEND_FE(gmp_sqrtrem, NULL) - ZEND_FE(gmp_pow, NULL) - ZEND_FE(gmp_powm, NULL) - ZEND_FE(gmp_perfect_square, NULL) - ZEND_FE(gmp_prob_prime, NULL) - ZEND_FE(gmp_gcd, NULL) - ZEND_FE(gmp_gcdext, NULL) - ZEND_FE(gmp_invert, NULL) - ZEND_FE(gmp_jacobi, NULL) - ZEND_FE(gmp_legendre, NULL) - ZEND_FE(gmp_cmp, NULL) - ZEND_FE(gmp_sign, NULL) - ZEND_FE(gmp_random, NULL) - ZEND_FE(gmp_and, NULL) - ZEND_FE(gmp_or, NULL) - ZEND_FE(gmp_com, NULL) - ZEND_FE(gmp_xor, NULL) - 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) - ZEND_FE(gmp_hamdist, NULL) + ZEND_FE(gmp_init, arginfo_gmp_init) + ZEND_FE(gmp_intval, arginfo_gmp_intval) + ZEND_FE(gmp_strval, arginfo_gmp_strval) + ZEND_FE(gmp_add, arginfo_gmp_add) + ZEND_FE(gmp_sub, arginfo_gmp_sub) + ZEND_FE(gmp_mul, arginfo_gmp_mul) + ZEND_FE(gmp_div_qr, arginfo_gmp_div_qr) + ZEND_FE(gmp_div_q, arginfo_gmp_div_q) + ZEND_FE(gmp_div_r, arginfo_gmp_div_r) + ZEND_FALIAS(gmp_div, gmp_div_q, arginfo_gmp_div_q) + ZEND_FE(gmp_mod, arginfo_gmp_mod) + ZEND_FE(gmp_divexact, arginfo_gmp_divexact) + ZEND_FE(gmp_neg, arginfo_gmp_neg) + ZEND_FE(gmp_abs, arginfo_gmp_abs) + ZEND_FE(gmp_fact, arginfo_gmp_fact) + ZEND_FE(gmp_sqrt, arginfo_gmp_sqrt) + ZEND_FE(gmp_sqrtrem, arginfo_gmp_sqrtrem) + ZEND_FE(gmp_pow, arginfo_gmp_pow) + ZEND_FE(gmp_powm, arginfo_gmp_powm) + ZEND_FE(gmp_perfect_square, arginfo_gmp_perfect_square) + ZEND_FE(gmp_prob_prime, arginfo_gmp_prob_prime) + ZEND_FE(gmp_gcd, arginfo_gmp_gcd) + ZEND_FE(gmp_gcdext, arginfo_gmp_gcdext) + ZEND_FE(gmp_invert, arginfo_gmp_invert) + ZEND_FE(gmp_jacobi, arginfo_gmp_jacobi) + ZEND_FE(gmp_legendre, arginfo_gmp_legendre) + ZEND_FE(gmp_cmp, arginfo_gmp_cmp) + ZEND_FE(gmp_sign, arginfo_gmp_sign) + ZEND_FE(gmp_random, arginfo_gmp_random) + ZEND_FE(gmp_and, arginfo_gmp_and) + ZEND_FE(gmp_or, arginfo_gmp_or) + ZEND_FE(gmp_com, arginfo_gmp_com) + ZEND_FE(gmp_xor, arginfo_gmp_xor) + ZEND_FE(gmp_setbit, arginfo_gmp_setbit) + ZEND_FE(gmp_clrbit, arginfo_gmp_clrbit) + ZEND_FE(gmp_scan0, arginfo_gmp_scan0) + ZEND_FE(gmp_scan1, arginfo_gmp_scan1) + ZEND_FE(gmp_popcount, arginfo_gmp_popcount) + ZEND_FE(gmp_hamdist, arginfo_gmp_hamdist) + ZEND_FE(gmp_nextprime, arginfo_gmp_nextprime) {NULL, NULL, NULL} /* Must be the last line in gmp_functions[] */ }; /* }}} */ @@ -1374,6 +1605,6 @@ static void _php_gmpnum_free(zend_rsrc_list_entry *rsrc TSRMLS_DC) * tab-width: 4 * c-basic-offset: 4 * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 + * vim600: noet sw=4 ts=4 fdm=marker + * vim<600: noet sw=4 ts=4 */