mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
Refactor PGSQL extension to use zend_string*
* Prevents some unnecessary strlen() computation * Use interned "NULL" * Certain PGSQL_API functions now accept zend_string* instead of char* Closes GH-6792
This commit is contained in:
parent
0ffb4a5c9d
commit
612609e1bd
3 changed files with 194 additions and 213 deletions
|
@ -100,3 +100,6 @@ PHP 8.1 INTERNALS UPGRADE NOTES
|
||||||
- The functions php_pgsql_meta_data(), php_pgsql_convert(), php_pgsql_insert(),
|
- The functions php_pgsql_meta_data(), php_pgsql_convert(), php_pgsql_insert(),
|
||||||
php_pgsql_update(), php_pgsql_delete(), and php_pgsql_select() have had
|
php_pgsql_update(), php_pgsql_delete(), and php_pgsql_select() have had
|
||||||
their return type formalized to zend_result.
|
their return type formalized to zend_result.
|
||||||
|
- The functions php_pgsql_meta_data(), php_pgsql_convert(), php_pgsql_insert(),
|
||||||
|
php_pgsql_update(), php_pgsql_delete(), and php_pgsql_select() now accept a
|
||||||
|
zend_string* instead of a char* for the table name.
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -176,12 +176,12 @@ PHP_FUNCTION(pg_select);
|
||||||
#define PGSQL_DML_ESCAPE (1<<12) /* No convert, but escape only */
|
#define PGSQL_DML_ESCAPE (1<<12) /* No convert, but escape only */
|
||||||
|
|
||||||
/* exported functions */
|
/* exported functions */
|
||||||
PHP_PGSQL_API zend_result php_pgsql_meta_data(PGconn *pg_link, const char *table_name, zval *meta, bool extended);
|
PHP_PGSQL_API zend_result php_pgsql_meta_data(PGconn *pg_link, const zend_string *table_name, zval *meta, bool extended);
|
||||||
PHP_PGSQL_API zend_result php_pgsql_convert(PGconn *pg_link, const char *table_name, const zval *values, zval *result, zend_ulong opt);
|
PHP_PGSQL_API zend_result php_pgsql_convert(PGconn *pg_link, const zend_string *table_name, const zval *values, zval *result, zend_ulong opt);
|
||||||
PHP_PGSQL_API zend_result php_pgsql_insert(PGconn *pg_link, const char *table, zval *values, zend_ulong opt, zend_string **sql);
|
PHP_PGSQL_API zend_result php_pgsql_insert(PGconn *pg_link, const zend_string *table, zval *values, zend_ulong opt, zend_string **sql);
|
||||||
PHP_PGSQL_API zend_result php_pgsql_update(PGconn *pg_link, const char *table, zval *values, zval *ids, zend_ulong opt , zend_string **sql);
|
PHP_PGSQL_API zend_result php_pgsql_update(PGconn *pg_link, const zend_string *table, zval *values, zval *ids, zend_ulong opt , zend_string **sql);
|
||||||
PHP_PGSQL_API zend_result php_pgsql_delete(PGconn *pg_link, const char *table, zval *ids, zend_ulong opt, zend_string **sql);
|
PHP_PGSQL_API zend_result php_pgsql_delete(PGconn *pg_link, const zend_string *table, zval *ids, zend_ulong opt, zend_string **sql);
|
||||||
PHP_PGSQL_API zend_result php_pgsql_select(PGconn *pg_link, const char *table, zval *ids, zval *ret_array, zend_ulong opt, long fetch_option, zend_string **sql );
|
PHP_PGSQL_API zend_result php_pgsql_select(PGconn *pg_link, const zend_string *table, zval *ids, zval *ret_array, zend_ulong opt, long fetch_option, zend_string **sql );
|
||||||
PHP_PGSQL_API void php_pgsql_result2array(PGresult *pg_result, zval *ret_array, long fetch_option);
|
PHP_PGSQL_API void php_pgsql_result2array(PGresult *pg_result, zval *ret_array, long fetch_option);
|
||||||
|
|
||||||
/* internal functions */
|
/* internal functions */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue