From: Andrey Hristov Date: Mon, 11 Jan 2010 19:13:43 +0000 (+0000) Subject: remove extern defintion of a variable that is no more X-Git-Tag: php-5.4.0alpha1~456 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a108f1bae853c44015023db6d379b1e679af792;p=php remove extern defintion of a variable that is no more used outside of the file where it is declared. Also really export with PHPAPI the protocol init/deinit functions --- diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.c b/ext/mysqlnd/mysqlnd_wireprotocol.c index 849518ac97..87395055b1 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.c +++ b/ext/mysqlnd/mysqlnd_wireprotocol.c @@ -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; diff --git a/ext/mysqlnd/mysqlnd_wireprotocol.h b/ext/mysqlnd/mysqlnd_wireprotocol.h index 6fc9454b3a..34ae7ea916 100644 --- a/ext/mysqlnd/mysqlnd_wireprotocol.h +++ b/ext/mysqlnd/mysqlnd_wireprotocol.h @@ -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;