summaryrefslogtreecommitdiff
path: root/ext/pgsql
diff options
context:
space:
mode:
authorRui Hirokawa <hirokawa@php.net>2000-09-12 23:19:58 +0000
committerRui Hirokawa <hirokawa@php.net>2000-09-12 23:19:58 +0000
commit4ffaf3555602708c193ebd2b76ea72f2e3ac082a (patch)
tree003d6d9801bd2cbb289e3c360b9114ec8aa6a9a6 /ext/pgsql
parentf7054b3561a39c0759e24ea14f85c7cd4ee9b24a (diff)
downloadphp-git-4ffaf3555602708c193ebd2b76ea72f2e3ac082a.tar.gz
updated some functions'name using obsolete name convention.
Diffstat (limited to 'ext/pgsql')
-rw-r--r--ext/pgsql/pgsql.c15
-rw-r--r--ext/pgsql/php_pgsql.h4
2 files changed, 11 insertions, 8 deletions
diff --git a/ext/pgsql/pgsql.c b/ext/pgsql/pgsql.c
index 07c42b79cd..f429b1c026 100644
--- a/ext/pgsql/pgsql.c
+++ b/ext/pgsql/pgsql.c
@@ -78,8 +78,11 @@ function_entry pgsql_functions[] = {
PHP_FE(pg_put_line, NULL)
PHP_FE(pg_end_copy, NULL)
#if HAVE_PQCLIENTENCODING
- PHP_FE(pg_clientencoding, NULL)
- PHP_FE(pg_setclientencoding, NULL)
+ PHP_FE(pg_client_enc, NULL)
+ PHP_FE(pg_set_client_enc, NULL)
+ /* for downwards compatibility */
+ PHP_FALIAS(pg_clientencoding, pg_client_enc, NULL)
+ PHP_FALIAS(pg_setclientencoding, pg_set_client_enc, NULL)
#endif
{NULL, NULL, NULL}
};
@@ -1706,9 +1709,9 @@ PHP_FUNCTION(pg_loexport)
#if HAVE_PQCLIENTENCODING
-/* {{{ proto int pg_setclientencoding([int connection,] string encoding)
+/* {{{ proto int pg_set_client_enc([int connection,] string encoding)
Set client encoding */
-PHP_FUNCTION(pg_setclientencoding)
+PHP_FUNCTION(pg_set_client_enc)
{
zval **encoding, **pgsql_link = NULL;
int id = -1;
@@ -1742,9 +1745,9 @@ PHP_FUNCTION(pg_setclientencoding)
}
/* }}} */
-/* {{{ proto string pg_clientencoding([int connection])
+/* {{{ proto string pg_client_enc([int connection])
Get the current client encoding */
-PHP_FUNCTION(pg_clientencoding)
+PHP_FUNCTION(pg_client_enc)
{
zval **pgsql_link = NULL;
int id = -1;
diff --git a/ext/pgsql/php_pgsql.h b/ext/pgsql/php_pgsql.h
index 54b3f5d67f..53cb1127b6 100644
--- a/ext/pgsql/php_pgsql.h
+++ b/ext/pgsql/php_pgsql.h
@@ -88,8 +88,8 @@ PHP_FUNCTION(pg_loexport);
PHP_FUNCTION(pg_put_line);
PHP_FUNCTION(pg_end_copy);
#if HAVE_PQCLIENTENCODING
-PHP_FUNCTION(pg_clientencoding);
-PHP_FUNCTION(pg_setclientencoding);
+PHP_FUNCTION(pg_client_enc);
+PHP_FUNCTION(pg_set_client_enc);
#endif
void php_pgsql_do_connect(INTERNAL_FUNCTION_PARAMETERS,int persistent);