From: Rob Richards Date: Fri, 26 Dec 2008 20:28:43 +0000 (+0000) Subject: MFH: properly export functions X-Git-Tag: php-5.3.0beta1~373 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5690e188da82a7332247f4c97fe56f4e187a7d00;p=php MFH: properly export functions --- diff --git a/ext/simplexml/php_simplexml.h b/ext/simplexml/php_simplexml.h index 309f0186c5..531786967f 100644 --- a/ext/simplexml/php_simplexml.h +++ b/ext/simplexml/php_simplexml.h @@ -77,7 +77,19 @@ typedef struct { #define SIMPLEXML_G(v) (simplexml_globals.v) #endif -ZEND_API zend_class_entry *sxe_get_element_class_entry(); +#ifdef PHP_WIN32 +#ifdef SIMPLEXML_EXPORTS +#define PHP_SXE_API __declspec(dllexport) +#else +#define PHP_SXE_API __declspec(dllimport) +#endif /* SIMPLEXML_EXPORTS */ +#elif defined(__GNUC__) && __GNUC__ >= 4 +#define PHP_SXE_API __attribute__ ((visibility("default"))) +#else +#define PHP_SXE_API +#endif /* PHP_WIN32 */ + +PHP_SXE_API zend_class_entry *sxe_get_element_class_entry(); #endif diff --git a/ext/simplexml/php_simplexml_exports.h b/ext/simplexml/php_simplexml_exports.h index 5daef99a92..61f6309bec 100755 --- a/ext/simplexml/php_simplexml_exports.h +++ b/ext/simplexml/php_simplexml_exports.h @@ -39,7 +39,7 @@ } \ } -ZEND_API zend_object_value sxe_object_new(zend_class_entry *ce TSRMLS_DC); +PHP_SXE_API zend_object_value sxe_object_new(zend_class_entry *ce TSRMLS_DC); /* {{{ php_sxe_fetch_object() */ static inline php_sxe_object * diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c index 1819d56f5c..f470d6e253 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -40,7 +40,7 @@ zend_class_entry *sxe_class_entry = NULL; -ZEND_API zend_class_entry *sxe_get_element_class_entry() /* {{{ */ +PHP_SXE_API zend_class_entry *sxe_get_element_class_entry() /* {{{ */ { return sxe_class_entry; } @@ -2082,7 +2082,7 @@ php_sxe_register_object(php_sxe_object *intern TSRMLS_DC) /* {{{ sxe_object_new() */ -ZEND_API zend_object_value +PHP_SXE_API zend_object_value sxe_object_new(zend_class_entry *ce TSRMLS_DC) { php_sxe_object *intern; @@ -2344,7 +2344,7 @@ static int php_sxe_iterator_current_key(zend_object_iterator *iter, char **str_k } /* }}} */ -ZEND_API void php_sxe_move_forward_iterator(php_sxe_object *sxe TSRMLS_DC) /* {{{ */ +PHP_SXE_API void php_sxe_move_forward_iterator(php_sxe_object *sxe TSRMLS_DC) /* {{{ */ { xmlNodePtr node = NULL; php_sxe_object *intern;