summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarkus Fischer <mfischer@php.net>2002-05-01 11:08:08 +0000
committerMarkus Fischer <mfischer@php.net>2002-05-01 11:08:08 +0000
commit1a5501ddfdd8cb4738fa07b1989f792c9fd1e328 (patch)
tree21e5e899b830c3b833667502fb2013e73d18b364
parenta2fbdad20ee94c37f736f9aef6ffa91c98d63ee3 (diff)
downloadphp-git-1a5501ddfdd8cb4738fa07b1989f792c9fd1e328.tar.gz
- Rename setopt and getopt to set_option and get_option, provide alias.
-rw-r--r--ext/sockets/php_sockets.h4
-rw-r--r--ext/sockets/sockets.c17
2 files changed, 13 insertions, 8 deletions
diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h
index f3986f7b0c..b7f47f5072 100644
--- a/ext/sockets/php_sockets.h
+++ b/ext/sockets/php_sockets.h
@@ -72,8 +72,8 @@ PHP_FUNCTION(socket_recvmsg);
PHP_FUNCTION(socket_sendmsg);
PHP_FUNCTION(socket_readv);
PHP_FUNCTION(socket_writev);
-PHP_FUNCTION(socket_getopt);
-PHP_FUNCTION(socket_setopt);
+PHP_FUNCTION(socket_get_option);
+PHP_FUNCTION(socket_set_option);
PHP_FUNCTION(socket_shutdown);
PHP_FUNCTION(socket_last_error);
PHP_FUNCTION(socket_clear_error);
diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c
index ba4b39bd0f..8ef70bf183 100644
--- a/ext/sockets/sockets.c
+++ b/ext/sockets/sockets.c
@@ -145,11 +145,16 @@ function_entry sockets_functions[] = {
PHP_FE(socket_sendmsg, NULL)
PHP_FE(socket_readv, NULL)
PHP_FE(socket_writev, NULL)
- PHP_FE(socket_getopt, NULL)
- PHP_FE(socket_setopt, NULL)
+ PHP_FE(socket_get_option, NULL)
+ PHP_FE(socket_set_option, NULL)
PHP_FE(socket_shutdown, NULL)
PHP_FE(socket_last_error, NULL)
PHP_FE(socket_clear_error, NULL)
+
+ /* for downwards compatability */
+ PHP_FALIAS(socket_getopt, socket_get_option, NULL)
+ PHP_FALIAS(socket_setopt, socket_set_option, NULL)
+
{NULL, NULL, NULL}
};
/* }}} */
@@ -1690,9 +1695,9 @@ PHP_FUNCTION(socket_sendmsg)
}
/* }}} */
-/* {{{ proto mixed socket_getopt(resource socket, int level, int optname)
+/* {{{ proto mixed socket_get_option(resource socket, int level, int optname)
Gets socket options for the socket */
-PHP_FUNCTION(socket_getopt)
+PHP_FUNCTION(socket_get_option)
{
zval *arg1;
struct linger linger_val;
@@ -1754,9 +1759,9 @@ PHP_FUNCTION(socket_getopt)
}
/* }}} */
-/* {{{ proto bool socket_setopt(resource socket, int level, int optname, int|array optval)
+/* {{{ proto bool socket_set_option(resource socket, int level, int optname, int|array optval)
Sets socket options for the socket */
-PHP_FUNCTION(socket_setopt)
+PHP_FUNCTION(socket_set_option)
{
zval *arg1, *arg4;
struct linger lv;