diff options
| author | Rob Richards <rrichards@php.net> | 2008-12-26 20:28:43 +0000 |
|---|---|---|
| committer | Rob Richards <rrichards@php.net> | 2008-12-26 20:28:43 +0000 |
| commit | 5690e188da82a7332247f4c97fe56f4e187a7d00 (patch) | |
| tree | 2f0e77a12ac23af3d21cd0f0dee57b162c00710b /ext | |
| parent | 50d26a85a6d27602f15f3aacd5e9e964b9034cb9 (diff) | |
| download | php-git-5690e188da82a7332247f4c97fe56f4e187a7d00.tar.gz | |
MFH: properly export functions
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/simplexml/php_simplexml.h | 14 | ||||
| -rwxr-xr-x | ext/simplexml/php_simplexml_exports.h | 2 | ||||
| -rw-r--r-- | ext/simplexml/simplexml.c | 6 |
3 files changed, 17 insertions, 5 deletions
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; |
