]> granicus.if.org Git - php/commitdiff
- Rename setopt and getopt to set_option and get_option, provide alias.
authorMarkus Fischer <mfischer@php.net>
Wed, 1 May 2002 11:08:08 +0000 (11:08 +0000)
committerMarkus Fischer <mfischer@php.net>
Wed, 1 May 2002 11:08:08 +0000 (11:08 +0000)
ext/sockets/php_sockets.h
ext/sockets/sockets.c

index f3986f7b0c2a62f81a3f41ec12c5ab5f33f00923..b7f47f5072a2b03faefd8814b652aaf20a02fd28 100644 (file)
@@ -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);
index ba4b39bd0fea608d4eb4c518f239428f276c9e2b..8ef70bf1830fc9b08df2a884bfb0500528053855 100644 (file)
@@ -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;