]> granicus.if.org Git - php/commitdiff
remove extern defintion of a variable that is no more
authorAndrey Hristov <andrey@php.net>
Mon, 11 Jan 2010 19:13:43 +0000 (19:13 +0000)
committerAndrey Hristov <andrey@php.net>
Mon, 11 Jan 2010 19:13:43 +0000 (19:13 +0000)
used outside of the file where it is declared.
Also really export with PHPAPI the protocol init/deinit functions

ext/mysqlnd/mysqlnd_wireprotocol.c
ext/mysqlnd/mysqlnd_wireprotocol.h

index 849518ac97bb9f239703f9162fc7e8e0a380b70b..87395055b13d8bd75a5d7cd41959064ab904a537 100644 (file)
@@ -61,8 +61,6 @@
        }
 
 
-extern mysqlnd_packet_methods packet_methods[];
-
 static const char *unknown_sqlstate= "HY000";
 
 char * const mysqlnd_empty_string = "";
@@ -1714,6 +1712,7 @@ void php_mysqlnd_chg_user_free_mem(void *_packet, zend_bool alloca TSRMLS_DC)
 
 /* {{{ packet_methods
  */
+static
 mysqlnd_packet_methods packet_methods[PROT_LAST] =
 {
        {
@@ -1931,7 +1930,7 @@ MYSQLND_METHOD(mysqlnd_protocol, get_change_user_response_packet)(MYSQLND_PROTOC
 
 
 /* {{{ mysqlnd_protocol_init */
-MYSQLND_PROTOCOL *
+PHPAPI MYSQLND_PROTOCOL *
 mysqlnd_protocol_init(zend_bool persistent TSRMLS_DC)
 {
        size_t alloc_size = sizeof(MYSQLND_PROTOCOL) + mysqlnd_plugin_count() * sizeof(void *);
@@ -1959,7 +1958,7 @@ mysqlnd_protocol_init(zend_bool persistent TSRMLS_DC)
 
 
 /* {{{ mysqlnd_protocol_free */
-void
+PHPAPI void
 mysqlnd_protocol_free(MYSQLND_PROTOCOL * const protocol TSRMLS_DC)
 {
        zend_bool pers = protocol->persistent;
index 6fc9454b3a92549dd26e9f3f9a6b35d53b260f8e..34ae7ea91693ed2d378a544eefd1e3d0029bf555 100644 (file)
@@ -54,8 +54,6 @@ typedef struct st_mysqlnd_packet_methods {
        void                            (*free_mem)(void *packet, zend_bool alloca TSRMLS_DC);
 } mysqlnd_packet_methods;
 
-extern mysqlnd_packet_methods packet_methods[];
-
 
 typedef struct st_mysqlnd_packet_header {
        size_t          size;