From: Markus Fischer Date: Wed, 1 May 2002 11:08:08 +0000 (+0000) Subject: - Rename setopt and getopt to set_option and get_option, provide alias. X-Git-Tag: php-4.3.0dev-ZendEngine2-Preview1~320 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a5501ddfdd8cb4738fa07b1989f792c9fd1e328;p=php - Rename setopt and getopt to set_option and get_option, provide alias. --- 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;