diff options
author | Max Semenik <maxsem.wiki@gmail.com> | 2020-07-01 16:32:55 +0300 |
---|---|---|
committer | Máté Kocsis <kocsismate@woohoolabs.com> | 2020-07-06 21:13:34 +0200 |
commit | 2b5de6f839feea0ae1d5289d59dd7f159fcdcc8c (patch) | |
tree | f23a5c00a96f30a62ddcf626b4c6a6d53809d14f /ext/pgsql/pgsql.c | |
parent | 47579986504022d3eab38e24fff5861d5e4eadad (diff) | |
download | php-git-2b5de6f839feea0ae1d5289d59dd7f159fcdcc8c.tar.gz |
Remove proto comments from C files
Closes GH-5758
Diffstat (limited to 'ext/pgsql/pgsql.c')
-rw-r--r-- | ext/pgsql/pgsql.c | 357 |
1 files changed, 119 insertions, 238 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c index 5a4cfd6f2c..442d09af04 100644 --- a/ext/pgsql/pgsql.c +++ b/ext/pgsql/pgsql.c @@ -544,8 +544,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_pg_select, 0, 0, 3) ZEND_END_ARG_INFO() /* }}} */ -/* {{{ pgsql_functions[] - */ +/* {{{ pgsql_functions[] */ static const zend_function_entry pgsql_functions[] = { /* connection functions */ PHP_FE(pg_connect, arginfo_pg_connect) @@ -676,8 +675,7 @@ static const zend_function_entry pgsql_functions[] = { }; /* }}} */ -/* {{{ pgsql_module_entry - */ +/* {{{ pgsql_module_entry */ zend_module_entry pgsql_module_entry = { STANDARD_MODULE_HEADER, "pgsql", @@ -744,8 +742,7 @@ static inline char * _php_pgsql_trim_result(PGconn * pgsql, char **buf) efree(msgbuf); \ } \ -/* {{{ php_pgsql_set_default_link - */ +/* {{{ php_pgsql_set_default_link */ static void php_pgsql_set_default_link(zend_resource *res) { GC_ADDREF(res); @@ -758,8 +755,7 @@ static void php_pgsql_set_default_link(zend_resource *res) } /* }}} */ -/* {{{ _close_pgsql_link - */ +/* {{{ _close_pgsql_link */ static void _close_pgsql_link(zend_resource *rsrc) { PGconn *link = (PGconn *)rsrc->ptr; @@ -781,8 +777,7 @@ static void _close_pgsql_link(zend_resource *rsrc) } /* }}} */ -/* {{{ _close_pgsql_plink - */ +/* {{{ _close_pgsql_plink */ static void _close_pgsql_plink(zend_resource *rsrc) { PGconn *link = (PGconn *)rsrc->ptr; @@ -797,8 +792,7 @@ static void _close_pgsql_plink(zend_resource *rsrc) } /* }}} */ -/* {{{ _php_pgsql_notice_handler - */ +/* {{{ _php_pgsql_notice_handler */ static void _php_pgsql_notice_handler(void *resource_id, const char *message) { zval *notices; @@ -823,8 +817,7 @@ static void _php_pgsql_notice_handler(void *resource_id, const char *message) } /* }}} */ -/* {{{ _rollback_transactions - */ +/* {{{ _rollback_transactions */ static int _rollback_transactions(zval *el) { PGconn *link; @@ -856,8 +849,7 @@ static int _rollback_transactions(zval *el) } /* }}} */ -/* {{{ _free_ptr - */ +/* {{{ _free_ptr */ static void _free_ptr(zend_resource *rsrc) { pgLofp *lofp = (pgLofp *)rsrc->ptr; @@ -865,8 +857,7 @@ static void _free_ptr(zend_resource *rsrc) } /* }}} */ -/* {{{ _free_result - */ +/* {{{ _free_result */ static void _free_result(zend_resource *rsrc) { pgsql_result_handle *pg_result = (pgsql_result_handle *)rsrc->ptr; @@ -900,8 +891,7 @@ static int _php_pgsql_detect_identifier_escape(const char *identifier, size_t le } /* }}} */ -/* {{{ PHP_INI - */ +/* {{{ PHP_INI */ PHP_INI_BEGIN() STD_PHP_INI_BOOLEAN( "pgsql.allow_persistent", "1", PHP_INI_SYSTEM, OnUpdateBool, allow_persistent, zend_pgsql_globals, pgsql_globals) STD_PHP_INI_ENTRY_EX("pgsql.max_persistent", "-1", PHP_INI_SYSTEM, OnUpdateLong, max_persistent, zend_pgsql_globals, pgsql_globals, display_link_numbers) @@ -912,8 +902,7 @@ STD_PHP_INI_BOOLEAN( "pgsql.log_notice", "0", PHP_INI_ALL, OnUpda PHP_INI_END() /* }}} */ -/* {{{ PHP_GINIT_FUNCTION - */ +/* {{{ PHP_GINIT_FUNCTION */ static PHP_GINIT_FUNCTION(pgsql) { #if defined(COMPILE_DL_PGSQL) && defined(ZTS) @@ -940,8 +929,7 @@ static void php_libpq_version(char *buf, size_t len) } } -/* {{{ PHP_MINIT_FUNCTION - */ +/* {{{ PHP_MINIT_FUNCTION */ PHP_MINIT_FUNCTION(pgsql) { char buf[16]; @@ -1060,8 +1048,7 @@ PHP_MINIT_FUNCTION(pgsql) } /* }}} */ -/* {{{ PHP_MSHUTDOWN_FUNCTION - */ +/* {{{ PHP_MSHUTDOWN_FUNCTION */ PHP_MSHUTDOWN_FUNCTION(pgsql) { UNREGISTER_INI_ENTRIES(); @@ -1072,8 +1059,7 @@ PHP_MSHUTDOWN_FUNCTION(pgsql) } /* }}} */ -/* {{{ PHP_RINIT_FUNCTION - */ +/* {{{ PHP_RINIT_FUNCTION */ PHP_RINIT_FUNCTION(pgsql) { PGG(default_link) = NULL; @@ -1082,8 +1068,7 @@ PHP_RINIT_FUNCTION(pgsql) } /* }}} */ -/* {{{ PHP_RSHUTDOWN_FUNCTION - */ +/* {{{ PHP_RSHUTDOWN_FUNCTION */ PHP_RSHUTDOWN_FUNCTION(pgsql) { /* clean up notice messages */ @@ -1095,8 +1080,7 @@ PHP_RSHUTDOWN_FUNCTION(pgsql) } /* }}} */ -/* {{{ PHP_MINFO_FUNCTION - */ +/* {{{ PHP_MINFO_FUNCTION */ PHP_MINFO_FUNCTION(pgsql) { char buf[256]; @@ -1120,8 +1104,7 @@ PHP_MINFO_FUNCTION(pgsql) } /* }}} */ -/* {{{ php_pgsql_do_connect - */ +/* {{{ php_pgsql_do_connect */ static void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS, int persistent) { char *host=NULL,*port=NULL,*options=NULL,*tty=NULL,*dbname=NULL,*connstring=NULL; @@ -1357,16 +1340,14 @@ err: } /* }}} */ -/* {{{ proto resource pg_connect(string connection_string[, int connect_type] | [string host, string port [, string options [, string tty,]]] string database) - Open a PostgreSQL connection */ +/* {{{ Open a PostgreSQL connection */ PHP_FUNCTION(pg_connect) { php_pgsql_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,0); } /* }}} */ -/* {{{ proto resource pg_connect_poll(resource connection) - Poll the status of an in-progress async PostgreSQL connection attempt*/ +/* {{{ Poll the status of an in-progress async PostgreSQL connection attempt*/ PHP_FUNCTION(pg_connect_poll) { zval *pgsql_link; @@ -1387,16 +1368,14 @@ PHP_FUNCTION(pg_connect_poll) } /* }}} */ -/* {{{ proto resource pg_pconnect(string connection_string | [string host, string port [, string options [, string tty,]]] string database) - Open a persistent PostgreSQL connection */ +/* {{{ Open a persistent PostgreSQL connection */ PHP_FUNCTION(pg_pconnect) { php_pgsql_do_connect(INTERNAL_FUNCTION_PARAM_PASSTHRU,1); } /* }}} */ -/* {{{ proto bool pg_close([resource connection]) - Close a PostgreSQL connection */ +/* {{{ Close a PostgreSQL connection */ PHP_FUNCTION(pg_close) { zval *pgsql_link = NULL; @@ -1437,8 +1416,7 @@ PHP_FUNCTION(pg_close) #define PHP_PG_HOST 6 #define PHP_PG_VERSION 7 -/* {{{ php_pgsql_get_link_info - */ +/* {{{ php_pgsql_get_link_info */ static void php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type) { zend_resource *link; @@ -1522,64 +1500,56 @@ static void php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type } /* }}} */ -/* {{{ proto string pg_dbname([resource connection]) - Get the database name */ +/* {{{ Get the database name */ PHP_FUNCTION(pg_dbname) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_DBNAME); } /* }}} */ -/* {{{ proto string pg_last_error([resource connection]) - Get the error message string */ +/* {{{ Get the error message string */ PHP_FUNCTION(pg_last_error) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_ERROR_MESSAGE); } /* }}} */ -/* {{{ proto string pg_options([resource connection]) - Get the options associated with the connection */ +/* {{{ Get the options associated with the connection */ PHP_FUNCTION(pg_options) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_OPTIONS); } /* }}} */ -/* {{{ proto int pg_port([resource connection]) - Return the port number associated with the connection */ +/* {{{ Return the port number associated with the connection */ PHP_FUNCTION(pg_port) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_PORT); } /* }}} */ -/* {{{ proto string pg_tty([resource connection]) - Return the tty name associated with the connection */ +/* {{{ Return the tty name associated with the connection */ PHP_FUNCTION(pg_tty) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_TTY); } /* }}} */ -/* {{{ proto string pg_host([resource connection]) - Returns the host name associated with the connection */ +/* {{{ Returns the host name associated with the connection */ PHP_FUNCTION(pg_host) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_HOST); } /* }}} */ -/* {{{ proto array pg_version([resource connection]) - Returns an array with client, protocol and server version (when available) */ +/* {{{ Returns an array with client, protocol and server version (when available) */ PHP_FUNCTION(pg_version) { php_pgsql_get_link_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_VERSION); } /* }}} */ -/* {{{ proto string|false pg_parameter_status([resource connection,] string param_name) - Returns the value of a server parameter */ +/* {{{ Returns the value of a server parameter */ PHP_FUNCTION(pg_parameter_status) { zval *pgsql_link = NULL; @@ -1612,8 +1582,7 @@ PHP_FUNCTION(pg_parameter_status) } /* }}} */ -/* {{{ proto bool pg_ping([resource connection]) - Ping database. If connection is bad, try to reconnect. */ +/* {{{ Ping database. If connection is bad, try to reconnect. */ PHP_FUNCTION(pg_ping) { zval *pgsql_link; @@ -1649,8 +1618,7 @@ PHP_FUNCTION(pg_ping) } /* }}} */ -/* {{{ proto resource pg_query([resource connection,] string query) - Execute a query */ +/* {{{ Execute a query */ PHP_FUNCTION(pg_query) { zval *pgsql_link = NULL; @@ -1745,8 +1713,7 @@ static void _php_pgsql_free_params(char **params, int num_params) } /* }}} */ -/* {{{ proto resource pg_query_params([resource connection,] string query, array params) - Execute a query */ +/* {{{ Execute a query */ PHP_FUNCTION(pg_query_params) { zval *pgsql_link = NULL; @@ -1862,8 +1829,7 @@ PHP_FUNCTION(pg_query_params) } /* }}} */ -/* {{{ proto resource pg_prepare([resource connection,] string stmtname, string query) - Prepare a query for future execution */ +/* {{{ Prepare a query for future execution */ PHP_FUNCTION(pg_prepare) { zval *pgsql_link = NULL; @@ -1944,8 +1910,7 @@ PHP_FUNCTION(pg_prepare) } /* }}} */ -/* {{{ proto resource pg_execute([resource connection,] string stmtname, array params) - Execute a prepared query */ +/* {{{ Execute a prepared query */ PHP_FUNCTION(pg_execute) { zval *pgsql_link = NULL; @@ -2059,8 +2024,7 @@ PHP_FUNCTION(pg_execute) #define PHP_PG_NUM_FIELDS 2 #define PHP_PG_CMD_TUPLES 3 -/* {{{ php_pgsql_get_result_info - */ +/* {{{ php_pgsql_get_result_info */ static void php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type) { zval *result; @@ -2093,32 +2057,28 @@ static void php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAMETERS, int entry_ty } /* }}} */ -/* {{{ proto int pg_num_rows(resource result) - Return the number of rows in the result */ +/* {{{ Return the number of rows in the result */ PHP_FUNCTION(pg_num_rows) { php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_NUM_ROWS); } /* }}} */ -/* {{{ proto int pg_num_fields(resource result) - Return the number of fields in the result */ +/* {{{ Return the number of fields in the result */ PHP_FUNCTION(pg_num_fields) { php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_NUM_FIELDS); } /* }}} */ -/* {{{ proto int pg_affected_rows(resource result) - Returns the number of affected tuples */ +/* {{{ Returns the number of affected tuples */ PHP_FUNCTION(pg_affected_rows) { php_pgsql_get_result_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_CMD_TUPLES); } /* }}} */ -/* {{{ proto mixed pg_last_notice(resource connection [, int option]) - Returns the last notice set by the backend */ +/* {{{ Returns the last notice set by the backend */ PHP_FUNCTION(pg_last_notice) { zval *pgsql_link = NULL; @@ -2170,8 +2130,7 @@ PHP_FUNCTION(pg_last_notice) } /* }}} */ -/* {{{ get_field_name - */ +/* {{{ get_field_name */ static char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list) { smart_str str = {0}; @@ -2231,8 +2190,7 @@ static char *get_field_name(PGconn *pgsql, Oid oid, HashTable *list) } /* }}} */ -/* {{{ proto mixed pg_field_table(resource result, int field_number[, bool oid_only]) - Returns the name of the table field belongs to, or table's oid if oid_only is true */ +/* {{{ Returns the name of the table field belongs to, or table's oid if oid_only is true */ PHP_FUNCTION(pg_field_table) { zval *result; @@ -2326,8 +2284,7 @@ PHP_FUNCTION(pg_field_table) #define PHP_PG_FIELD_TYPE 3 #define PHP_PG_FIELD_TYPE_OID 4 -/* {{{ php_pgsql_get_field_info - */ +/* {{{ php_pgsql_get_field_info */ static void php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type) { zval *result; @@ -2386,40 +2343,35 @@ static void php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAMETERS, int entry_typ } /* }}} */ -/* {{{ proto string pg_field_name(resource result, int field_number) - Returns the name of the field */ +/* {{{ Returns the name of the field */ PHP_FUNCTION(pg_field_name) { php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_FIELD_NAME); } /* }}} */ -/* {{{ proto int pg_field_size(resource result, int field_number) - Returns the internal size of the field */ +/* {{{ Returns the internal size of the field */ PHP_FUNCTION(pg_field_size) { php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_FIELD_SIZE); } /* }}} */ -/* {{{ proto string pg_field_type(resource result, int field_number) - Returns the type name for the given field */ +/* {{{ Returns the type name for the given field */ PHP_FUNCTION(pg_field_type) { php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_FIELD_TYPE); } /* }}} */ -/* {{{ proto string pg_field_type_oid(resource result, int field_number) - Returns the type oid for the given field */ +/* {{{ Returns the type oid for the given field */ PHP_FUNCTION(pg_field_type_oid) { php_pgsql_get_field_info(INTERNAL_FUNCTION_PARAM_PASSTHRU,PHP_PG_FIELD_TYPE_OID); } /* }}} */ -/* {{{ proto int pg_field_num(resource result, string field_name) - Returns the field number of the named field */ +/* {{{ Returns the field number of the named field */ PHP_FUNCTION(pg_field_num) { zval *result; @@ -2442,8 +2394,7 @@ PHP_FUNCTION(pg_field_num) } /* }}} */ -/* {{{ proto mixed pg_fetch_result(resource result, [int row_number,] mixed field_name) - Returns values from a result identifier */ +/* {{{ Returns values from a result identifier */ PHP_FUNCTION(pg_fetch_result) { zval *result, *field=NULL; @@ -2667,16 +2618,14 @@ static void php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAMETERS, zend_long result_ } /* }}} */ -/* {{{ proto array pg_fetch_row(resource result [, int row [, int result_type]]) - Get a row as an enumerated array */ +/* {{{ Get a row as an enumerated array */ PHP_FUNCTION(pg_fetch_row) { php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, PGSQL_NUM, 0); } /* }}} */ -/* {{{ proto array pg_fetch_assoc(resource result [, int row]) - Fetch a row as an assoc array */ +/* {{{ Fetch a row as an assoc array */ PHP_FUNCTION(pg_fetch_assoc) { /* pg_fetch_assoc() is added from PHP 4.3.0. It should raise error, when @@ -2687,16 +2636,14 @@ PHP_FUNCTION(pg_fetch_assoc) } /* }}} */ -/* {{{ proto array pg_fetch_array(resource result [, int row [, int result_type]]) - Fetch a row as an array */ +/* {{{ Fetch a row as an array */ PHP_FUNCTION(pg_fetch_array) { php_pgsql_fetch_hash(INTERNAL_FUNCTION_PARAM_PASSTHRU, PGSQL_BOTH, 0); } /* }}} */ -/* {{{ proto object pg_fetch_object(resource result [, int row [, string class_name [, NULL|array ctor_params]]]) - Fetch a row as an object */ +/* {{{ Fetch a row as an object */ PHP_FUNCTION(pg_fetch_object) { /* pg_fetch_object() allowed result_type used to be. 3rd parameter @@ -2705,8 +2652,7 @@ PHP_FUNCTION(pg_fetch_object) } /* }}} */ -/* {{{ proto array pg_fetch_all(resource result [, int result_type]) - Fetch all rows into array */ +/* {{{ Fetch all rows into array */ PHP_FUNCTION(pg_fetch_all) { zval *result; @@ -2736,8 +2682,7 @@ PHP_FUNCTION(pg_fetch_all) } /* }}} */ -/* {{{ proto array pg_fetch_all_columns(resource result [, int column_number]) - Fetch all rows into array */ +/* {{{ Fetch all rows into array */ PHP_FUNCTION(pg_fetch_all_columns) { zval *result; @@ -2779,8 +2724,7 @@ PHP_FUNCTION(pg_fetch_all_columns) } /* }}} */ -/* {{{ proto bool pg_result_seek(resource result, int offset) - Set internal row offset */ +/* {{{ Set internal row offset */ PHP_FUNCTION(pg_result_seek) { zval *result; @@ -2808,8 +2752,7 @@ PHP_FUNCTION(pg_result_seek) #define PHP_PG_DATA_LENGTH 1 #define PHP_PG_DATA_ISNULL 2 -/* {{{ php_pgsql_data_info - */ +/* {{{ php_pgsql_data_info */ static void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type) { zval *result, *field; @@ -2879,24 +2822,21 @@ static void php_pgsql_data_info(INTERNAL_FUNCTION_PARAMETERS, int entry_type) } /* }}} */ -/* {{{ proto int pg_field_prtlen(resource result, [int row,] mixed field_name_or_number) - Returns the printed length */ +/* {{{ Returns the printed length */ PHP_FUNCTION(pg_field_prtlen) { php_pgsql_data_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_PG_DATA_LENGTH); } /* }}} */ -/* {{{ proto int pg_field_is_null(resource result, [int row,] mixed field_name_or_number) - Test if a field is NULL */ +/* {{{ Test if a field is NULL */ PHP_FUNCTION(pg_field_is_null) { php_pgsql_data_info(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_PG_DATA_ISNULL); } /* }}} */ -/* {{{ proto bool pg_free_result(resource result) - Free result memory */ +/* {{{ Free result memory */ PHP_FUNCTION(pg_free_result) { zval *result; @@ -2915,8 +2855,7 @@ PHP_FUNCTION(pg_free_result) } /* }}} */ -/* {{{ proto string pg_last_oid(resource result) - Returns the last object identifier */ +/* {{{ Returns the last object identifier */ PHP_FUNCTION(pg_last_oid) { zval *result; @@ -2941,8 +2880,7 @@ PHP_FUNCTION(pg_last_oid) } /* }}} */ -/* {{{ proto bool pg_trace(string filename [, string mode [, resource connection]]) - Enable tracing a PostgreSQL connection */ +/* {{{ Enable tracing a PostgreSQL connection */ PHP_FUNCTION(pg_trace) { char *z_filename, *mode = "w"; @@ -2985,8 +2923,7 @@ PHP_FUNCTION(pg_trace) } /* }}} */ -/* {{{ proto bool pg_untrace([resource connection]) - Disable tracing of a PostgreSQL connection */ +/* {{{ Disable tracing of a PostgreSQL connection */ PHP_FUNCTION(pg_untrace) { zval *pgsql_link = NULL; @@ -3014,8 +2951,7 @@ PHP_FUNCTION(pg_untrace) } /* }}} */ -/* {{{ proto mixed pg_lo_create([resource connection],[mixed large_object_oid]) - Create a large object */ +/* {{{ Create a large object */ PHP_FUNCTION(pg_lo_create) { zval *pgsql_link = NULL, *oid = NULL; @@ -3087,8 +3023,7 @@ PHP_FUNCTION(pg_lo_create) } /* }}} */ -/* {{{ proto bool pg_lo_unlink([resource connection,] string large_object_oid) - Delete a large object */ +/* {{{ Delete a large object */ PHP_FUNCTION(pg_lo_unlink) { zval *pgsql_link = NULL; @@ -3158,8 +3093,7 @@ PHP_FUNCTION(pg_lo_unlink) } /* }}} */ -/* {{{ proto resource pg_lo_open([resource connection,] int large_object_oid, string mode) - Open a large object and return fd */ +/* {{{ Open a large object and return fd */ PHP_FUNCTION(pg_lo_open) { zval *pgsql_link = NULL; @@ -3280,8 +3214,7 @@ PHP_FUNCTION(pg_lo_open) } /* }}} */ -/* {{{ proto bool pg_lo_close(resource large_object) - Close a large object */ +/* {{{ Close a large object */ PHP_FUNCTION(pg_lo_close) { zval *pgsql_lofp; @@ -3309,8 +3242,7 @@ PHP_FUNCTION(pg_lo_close) #define PGSQL_LO_READ_BUF_SIZE 8192 -/* {{{ proto string pg_lo_read(resource large_object [, int len]) - Read a large object */ +/* {{{ Read a large object */ PHP_FUNCTION(pg_lo_read) { zval *pgsql_id; @@ -3344,8 +3276,7 @@ PHP_FUNCTION(pg_lo_read) } /* }}} */ -/* {{{ proto int pg_lo_write(resource large_object, string buf [, int len]) - Write a large object */ +/* {{{ Write a large object */ PHP_FUNCTION(pg_lo_write) { zval *pgsql_id; @@ -3387,8 +3318,7 @@ PHP_FUNCTION(pg_lo_write) } /* }}} */ -/* {{{ proto int pg_lo_read_all(resource large_object) - Read a large object and send straight to browser */ +/* {{{ Read a large object and send straight to browser */ PHP_FUNCTION(pg_lo_read_all) { zval *pgsql_id; @@ -3414,8 +3344,7 @@ PHP_FUNCTION(pg_lo_read_all) } /* }}} */ -/* {{{ proto int pg_lo_import([resource connection, ] string filename [, mixed oid]) - Import large object direct from filesystem */ +/* {{{ Import large object direct from filesystem */ PHP_FUNCTION(pg_lo_import) { zval *pgsql_link = NULL, *oid = NULL; @@ -3497,8 +3426,7 @@ PHP_FUNCTION(pg_lo_import) } /* }}} */ -/* {{{ proto bool pg_lo_export([resource connection, ] int objoid, string filename) - Export large object direct to filesystem */ +/* {{{ Export large object direct to filesystem */ PHP_FUNCTION(pg_lo_export) { zval *pgsql_link = NULL; @@ -3592,8 +3520,7 @@ PHP_FUNCTION(pg_lo_export) } /* }}} */ -/* {{{ proto bool pg_lo_seek(resource large_object, int offset [, int whence]) - Seeks position of large object */ +/* {{{ Seeks position of large object */ PHP_FUNCTION(pg_lo_seek) { zval *pgsql_id = NULL; @@ -3630,8 +3557,7 @@ PHP_FUNCTION(pg_lo_seek) } /* }}} */ -/* {{{ proto int pg_lo_tell(resource large_object) - Returns current position of large object */ +/* {{{ Returns current position of large object */ PHP_FUNCTION(pg_lo_tell) { zval *pgsql_id = NULL; @@ -3660,8 +3586,7 @@ PHP_FUNCTION(pg_lo_tell) } /* }}} */ -/* {{{ proto bool pg_lo_truncate(resource large_object, int size) - Truncate large object to size */ +/* {{{ Truncate large object to size */ PHP_FUNCTION(pg_lo_truncate) { zval *pgsql_id = NULL; @@ -3695,8 +3620,7 @@ PHP_FUNCTION(pg_lo_truncate) } /* }}} */ -/* {{{ proto int pg_set_error_verbosity([resource connection,] int verbosity) - Set error verbosity */ +/* {{{ Set error verbosity */ PHP_FUNCTION(pg_set_error_verbosity) { zval *pgsql_link = NULL; @@ -3730,8 +3654,7 @@ PHP_FUNCTION(pg_set_error_verbosity) } /* }}} */ -/* {{{ proto int pg_set_client_encoding([resource connection,] string encoding) - Set client encoding */ +/* {{{ Set client encoding */ PHP_FUNCTION(pg_set_client_encoding) { char *encoding; @@ -3762,8 +3685,7 @@ PHP_FUNCTION(pg_set_client_encoding) } /* }}} */ -/* {{{ proto string pg_client_encoding([resource connection]) - Get the current client encoding */ +/* {{{ Get the current client encoding */ PHP_FUNCTION(pg_client_encoding) { zval *pgsql_link = NULL; @@ -3792,8 +3714,7 @@ PHP_FUNCTION(pg_client_encoding) } /* }}} */ -/* {{{ proto bool pg_end_copy([resource connection]) - Sync with backend. Completes the Copy command */ +/* {{{ Sync with backend. Completes the Copy command */ PHP_FUNCTION(pg_end_copy) { zval *pgsql_link = NULL; @@ -3827,8 +3748,7 @@ PHP_FUNCTION(pg_end_copy) } /* }}} */ -/* {{{ proto bool pg_put_line([resource connection,] string query) - Send null-terminated string to backend server*/ +/* {{{ Send null-terminated string to backend server*/ PHP_FUNCTION(pg_put_line) { char *query; @@ -3864,8 +3784,7 @@ PHP_FUNCTION(pg_put_line) } /* }}} */ -/* {{{ proto array pg_copy_to(resource connection, string table_name [, string delimiter [, string null_as]]) - Copy table to array */ +/* {{{ Copy table to array */ PHP_FUNCTION(pg_copy_to) { zval *pgsql_link; @@ -3955,8 +3874,7 @@ PHP_FUNCTION(pg_copy_to) } /* }}} */ -/* {{{ proto bool pg_copy_from(resource connection, string table_name , array rows [, string delimiter [, string null_as]]) - Copy table from array */ +/* {{{ Copy table from array */ PHP_FUNCTION(pg_copy_from) { zval *pgsql_link = NULL, *pg_rows; @@ -4059,8 +3977,7 @@ PHP_FUNCTION(pg_copy_from) } /* }}} */ -/* {{{ proto string pg_escape_string([resource connection,] string data) - Escape string for text/char type */ +/* {{{ Escape string for text/char type */ PHP_FUNCTION(pg_escape_string) { zend_string *from = NULL, *to = NULL; @@ -4099,8 +4016,7 @@ PHP_FUNCTION(pg_escape_string) } /* }}} */ -/* {{{ proto string pg_escape_bytea([resource connection,] string data) - Escape binary for bytea type */ +/* {{{ Escape binary for bytea type */ PHP_FUNCTION(pg_escape_bytea) { char *from = NULL, *to = NULL; @@ -4138,8 +4054,7 @@ PHP_FUNCTION(pg_escape_bytea) } /* }}} */ -/* {{{ proto string pg_unescape_bytea(string data) - Unescape binary for bytea type */ +/* {{{ Unescape binary for bytea type */ PHP_FUNCTION(pg_unescape_bytea) { char *from = NULL, *to = NULL, *tmp = NULL; @@ -4211,24 +4126,21 @@ static void php_pgsql_escape_internal(INTERNAL_FUNCTION_PARAMETERS, int escape_l } /* }}} */ -/* {{{ proto string pg_escape_literal([resource connection,] string data) - Escape parameter as string literal (i.e. parameter) */ +/* {{{ Escape parameter as string literal (i.e. parameter) */ PHP_FUNCTION(pg_escape_literal) { php_pgsql_escape_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, 1); } /* }}} */ -/* {{{ proto string pg_escape_identifier([resource connection,] string data) - Escape identifier (i.e. table name, field name) */ +/* {{{ Escape identifier (i.e. table name, field name) */ PHP_FUNCTION(pg_escape_identifier) { php_pgsql_escape_internal(INTERNAL_FUNCTION_PARAM_PASSTHRU, 0); } /* }}} */ -/* {{{ proto string pg_result_error(resource result) - Get error message associated with result */ +/* {{{ Get error message associated with result */ PHP_FUNCTION(pg_result_error) { zval *result; @@ -4254,8 +4166,7 @@ PHP_FUNCTION(pg_result_error) } /* }}} */ -/* {{{ proto string pg_result_error_field(resource result, int fieldcode) - Get error message field associated with result */ +/* {{{ Get error message field associated with result */ PHP_FUNCTION(pg_result_error_field) { zval *result; @@ -4299,8 +4210,7 @@ PHP_FUNCTION(pg_result_error_field) } /* }}} */ -/* {{{ proto int pg_connection_status(resource connection) - Get connection status */ +/* {{{ Get connection status */ PHP_FUNCTION(pg_connection_status) { zval *pgsql_link = NULL; @@ -4320,8 +4230,7 @@ PHP_FUNCTION(pg_connection_status) /* }}} */ -/* {{{ proto int pg_transaction_status(resource connection) - Get transaction status */ +/* {{{ Get transaction status */ PHP_FUNCTION(pg_transaction_status) { zval *pgsql_link = NULL; @@ -4341,8 +4250,7 @@ PHP_FUNCTION(pg_transaction_status) /* }}} */ -/* {{{ proto bool pg_connection_reset(resource connection) - Reset connection (reconnect) */ +/* {{{ Reset connection (reconnect) */ PHP_FUNCTION(pg_connection_reset) { zval *pgsql_link; @@ -4368,8 +4276,7 @@ PHP_FUNCTION(pg_connection_reset) #define PHP_PG_ASYNC_IS_BUSY 1 #define PHP_PG_ASYNC_REQUEST_CANCEL 2 -/* {{{ php_pgsql_flush_query - */ +/* {{{ php_pgsql_flush_query */ static int php_pgsql_flush_query(PGconn *pgsql) { PGresult *res; @@ -4388,8 +4295,7 @@ static int php_pgsql_flush_query(PGconn *pgsql) } /* }}} */ -/* {{{ php_pgsql_do_async - */ +/* {{{ php_pgsql_do_async */ static void php_pgsql_do_async(INTERNAL_FUNCTION_PARAMETERS, int entry_type) { zval *pgsql_link; @@ -4431,16 +4337,14 @@ static void php_pgsql_do_async(INTERNAL_FUNCTION_PARAMETERS, int entry_type) } /* }}} */ -/* {{{ proto bool pg_cancel_query(resource connection) - Cancel request */ +/* {{{ Cancel request */ PHP_FUNCTION(pg_cancel_query) { php_pgsql_do_async(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_PG_ASYNC_REQUEST_CANCEL); } /* }}} */ -/* {{{ proto bool pg_connection_busy(resource connection) - Get connection is busy or not */ +/* {{{ Get connection is busy or not */ PHP_FUNCTION(pg_connection_busy) { php_pgsql_do_async(INTERNAL_FUNCTION_PARAM_PASSTHRU, PHP_PG_ASYNC_IS_BUSY); @@ -4458,8 +4362,7 @@ static int _php_pgsql_link_has_results(PGconn *pgsql) /* {{{ */ } /* }}} */ -/* {{{ proto bool pg_send_query(resource connection, string query) - Send asynchronous query */ +/* {{{ Send asynchronous query */ PHP_FUNCTION(pg_send_query) { zval *pgsql_link; @@ -4528,8 +4431,7 @@ PHP_FUNCTION(pg_send_query) } /* }}} */ -/* {{{ proto bool pg_send_query_params(resource connection, string query, array params) - Send asynchronous parameterized query */ +/* {{{ Send asynchronous parameterized query */ PHP_FUNCTION(pg_send_query_params) { zval *pgsql_link, *pv_param_arr, *tmp; @@ -4624,8 +4526,7 @@ PHP_FUNCTION(pg_send_query_params) } /* }}} */ -/* {{{ proto bool pg_send_prepare(resource connection, string stmtname, string query) - Asynchronously prepare a query for future execution */ +/* {{{ Asynchronously prepare a query for future execution */ PHP_FUNCTION(pg_send_prepare) { zval *pgsql_link; @@ -4694,8 +4595,7 @@ PHP_FUNCTION(pg_send_prepare) } /* }}} */ -/* {{{ proto bool pg_send_execute(resource connection, string stmtname, array params) - Executes prevriously prepared stmtname asynchronously */ +/* {{{ Executes prevriously prepared stmtname asynchronously */ PHP_FUNCTION(pg_send_execute) { zval *pgsql_link; @@ -4792,8 +4692,7 @@ PHP_FUNCTION(pg_send_execute) } /* }}} */ -/* {{{ proto resource pg_get_result(resource connection) - Get asynchronous query result */ +/* {{{ Get asynchronous query result */ PHP_FUNCTION(pg_get_result) { zval *pgsql_link; @@ -4822,8 +4721,7 @@ PHP_FUNCTION(pg_get_result) } /* }}} */ -/* {{{ proto mixed pg_result_status(resource result[, int result_type]) - Get status of query result */ +/* {{{ Get status of query result */ PHP_FUNCTION(pg_result_status) { zval *result; @@ -4856,8 +4754,7 @@ PHP_FUNCTION(pg_result_status) } /* }}} */ -/* {{{ proto mixed pg_get_notify([resource connection[, int result_type]]) - Get asynchronous notification */ +/* {{{ Get asynchronous notification */ PHP_FUNCTION(pg_get_notify) { zval *pgsql_link; @@ -4904,8 +4801,7 @@ PHP_FUNCTION(pg_get_notify) } /* }}} */ -/* {{{ proto int pg_get_pid([resource connection) - Get backend(server) pid */ +/* {{{ Get backend(server) pid */ PHP_FUNCTION(pg_get_pid) { zval *pgsql_link; @@ -4983,8 +4879,7 @@ static int php_pgsql_fd_cast(php_stream *stream, int cast_as, void **ret) /* {{{ } /* }}} */ -/* {{{ proto resource pg_socket(resource connection) - Get a read-only handle to the socket underlying the pgsql connection */ +/* {{{ Get a read-only handle to the socket underlying the pgsql connection */ PHP_FUNCTION(pg_socket) { zval *pgsql_link; @@ -5010,8 +4905,7 @@ PHP_FUNCTION(pg_socket) } /* }}} */ -/* {{{ proto bool pg_consume_input(resource connection) - Reads input on the connection */ +/* {{{ Reads input on the connection */ PHP_FUNCTION(pg_consume_input) { zval *pgsql_link; @@ -5029,8 +4923,7 @@ PHP_FUNCTION(pg_consume_input) } /* }}} */ -/* {{{ proto mixed pg_flush(resource connection) - Flush outbound query data on the connection */ +/* {{{ Flush outbound query data on the connection */ PHP_FUNCTION(pg_flush) { zval *pgsql_link; @@ -5181,8 +5074,7 @@ PHP_PGSQL_API int php_pgsql_meta_data(PGconn *pg_link, const char *table_name, z /* }}} */ -/* {{{ proto array pg_meta_data(resource db, string table [, bool extended]) - Get meta_data */ +/* {{{ Get meta_data */ PHP_FUNCTION(pg_meta_data) { zval *pgsql_link; @@ -5208,8 +5100,7 @@ PHP_FUNCTION(pg_meta_data) } /* }}} */ -/* {{{ php_pgsql_get_data_type - */ +/* {{{ php_pgsql_get_data_type */ static php_pgsql_data_type php_pgsql_get_data_type(const char *type_name, size_t len) { /* This is stupid way to do. I'll fix it when I decied how to support @@ -6046,8 +5937,7 @@ PHP_PGSQL_API int php_pgsql_convert(PGconn *pg_link, const char *table_name, con } /* }}} */ -/* {{{ proto array pg_convert(resource db, string table, array values[, int options]) - Check and convert values for PostgreSQL SQL statement */ +/* {{{ Check and convert values for PostgreSQL SQL statement */ PHP_FUNCTION(pg_convert) { zval *pgsql_link, *values; @@ -6139,8 +6029,7 @@ static inline void build_tablename(smart_str *querystr, PGconn *pg_link, const c } /* }}} */ -/* {{{ php_pgsql_insert - */ +/* {{{ php_pgsql_insert */ PHP_PGSQL_API int php_pgsql_insert(PGconn *pg_link, const char *table, zval *var_array, zend_ulong opt, zend_string **sql) { zval *val, converted; @@ -6255,8 +6144,7 @@ cleanup: } /* }}} */ -/* {{{ proto mixed pg_insert(resource db, string table, array values[, int options]) - Insert values (filed=>value) to table */ +/* {{{ Insert values (filed=>value) to table */ PHP_FUNCTION(pg_insert) { zval *pgsql_link, *values; @@ -6401,8 +6289,7 @@ static inline int build_assignment_string(PGconn *pg_link, smart_str *querystr, } /* }}} */ -/* {{{ php_pgsql_update - */ +/* {{{ php_pgsql_update */ PHP_PGSQL_API int php_pgsql_update(PGconn *pg_link, const char *table, zval *var_array, zval *ids_array, zend_ulong opt, zend_string **sql) { zval var_converted, ids_converted; @@ -6469,8 +6356,7 @@ cleanup: } /* }}} */ -/* {{{ proto mixed pg_update(resource db, string table, array fields, array ids[, int options]) - Update table using values (field=>value) and ids (id=>value) */ +/* {{{ Update table using values (field=>value) and ids (id=>value) */ PHP_FUNCTION(pg_update) { zval *pgsql_link, *values, *ids; @@ -6507,8 +6393,7 @@ PHP_FUNCTION(pg_update) } /* }}} */ -/* {{{ php_pgsql_delete - */ +/* {{{ php_pgsql_delete */ PHP_PGSQL_API int php_pgsql_delete(PGconn *pg_link, const char *table, zval *ids_array, zend_ulong opt, zend_string **sql) { zval ids_converted; @@ -6561,8 +6446,7 @@ cleanup: } /* }}} */ -/* {{{ proto mixed pg_delete(resource db, string table, array ids[, int options]) - Delete records has ids (id=>value) */ +/* {{{ Delete records has ids (id=>value) */ PHP_FUNCTION(pg_delete) { zval *pgsql_link, *ids; @@ -6599,8 +6483,7 @@ PHP_FUNCTION(pg_delete) } /* }}} */ -/* {{{ php_pgsql_result2array - */ +/* {{{ php_pgsql_result2array */ PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array, long result_type) { zval row; @@ -6643,8 +6526,7 @@ PHP_PGSQL_API int php_pgsql_result2array(PGresult *pg_result, zval *ret_array, l } /* }}} */ -/* {{{ php_pgsql_select - */ +/* {{{ php_pgsql_select */ PHP_PGSQL_API int php_pgsql_select(PGconn *pg_link, const char *table, zval *ids_array, zval *ret_array, zend_ulong opt, long result_type, zend_string **sql) { zval ids_converted; @@ -6701,8 +6583,7 @@ cleanup: } /* }}} */ -/* {{{ proto mixed pg_select(resource db, string table, array ids[, int options [, int result_type]) - Select records that has ids (id=>value) */ +/* {{{ Select records that has ids (id=>value) */ PHP_FUNCTION(pg_select) { zval *pgsql_link, *ids; |