From: Rob Richards Date: Fri, 26 Dec 2008 20:27:14 +0000 (+0000) Subject: properly export functions X-Git-Tag: php-5.4.0alpha1~191^2~4744 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ebe5b582aa13bf7205fce20324f1faaa9ef12030;p=php properly export functions --- diff --git a/ext/simplexml/php_simplexml.h b/ext/simplexml/php_simplexml.h index 01d8c7770c..fe514d8990 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(TSRMLS_D); +#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(TSRMLS_D); #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 bf06cdcf7e..125bb54196 100644 --- a/ext/simplexml/simplexml.c +++ b/ext/simplexml/simplexml.c @@ -39,7 +39,7 @@ zend_class_entry *sxe_class_entry = NULL; -ZEND_API zend_class_entry *sxe_get_element_class_entry(TSRMLS_D) /* {{{ */ +PHP_SXE_API zend_class_entry *sxe_get_element_class_entry(TSRMLS_D) /* {{{ */ { return sxe_class_entry; } @@ -2117,7 +2117,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; @@ -2424,7 +2424,7 @@ static int php_sxe_iterator_current_key(zend_object_iterator *iter, zstr *str_ke } /* }}} */ -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;