Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
...
  • 1 commit
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 18 additions and 4 deletions.
  1. +2 −2 igbinary.c
  2. +16 −2 igbinary.h
View
4 igbinary.c
@@ -317,7 +317,7 @@ PHP_MINFO_FUNCTION(igbinary) {
}
/* }}} */
/* {{{ int igbinary_serialize(uint8_t**, size_t*, zval*) */
-int igbinary_serialize(uint8_t **ret, size_t *ret_len, zval *z TSRMLS_DC) {
+IGBINARY_API int igbinary_serialize(uint8_t **ret, size_t *ret_len, zval *z TSRMLS_DC) {
struct igbinary_serialize_data igsd;
if (igbinary_serialize_data_init(&igsd, Z_TYPE_P(z) != IS_OBJECT && Z_TYPE_P(z) != IS_ARRAY TSRMLS_CC)) {
@@ -347,7 +347,7 @@ int igbinary_serialize(uint8_t **ret, size_t *ret_len, zval *z TSRMLS_DC) {
}
/* }}} */
/* {{{ int igbinary_unserialize(const uint8_t *, size_t, zval **) */
-int igbinary_unserialize(const uint8_t *buf, size_t buf_len, zval **z TSRMLS_DC) {
+IGBINARY_API int igbinary_unserialize(const uint8_t *buf, size_t buf_len, zval **z TSRMLS_DC) {
struct igbinary_unserialize_data igsd;
igbinary_unserialize_data_init(&igsd TSRMLS_CC);
View
18 igbinary.h
@@ -16,6 +16,20 @@
#endif
#include "php.h"
+#ifdef PHP_WIN32
+# if defined(IGBINARY_EXPORTS) || (!defined(COMPILE_DL_IGBINARY))
+# define IGBINARY_API __declspec(dllexport)
+# elif defined(COMPILE_DL_IGBINARY)
+# define IGBINARY_API __declspec(dllimport)
+# else
+# define IGBINARY_API /* nothing special */
+# endif
+#elif defined(__GNUC__) && __GNUC__ >= 4
+# define IGBINARY_API __attribute__ ((visibility("default")))
+#else
+# define IGBINARY_API /* nothing special */
+#endif
+
#define IGBINARY_VERSION "1.1.2-dev"
/** Serialize zval.
@@ -25,14 +39,14 @@
* @param[in] z Variable to be serialized
* @return 0 on success, 1 elsewhere.
*/
-int igbinary_serialize(uint8_t **ret, size_t *ret_len, zval *z TSRMLS_DC);
+IGBINARY_API int igbinary_serialize(uint8_t **ret, size_t *ret_len, zval *z TSRMLS_DC);
/** Unserialize to zval.
* @param[in] buf Buffer with serialized data.
* @param[in] buf_len Buffer length.
* @param[out] z Unserialized zval
* @return 0 on success, 1 elsewhere.
*/
-int igbinary_unserialize(const uint8_t *buf, size_t buf_len, zval **z TSRMLS_DC);
+IGBINARY_API int igbinary_unserialize(const uint8_t *buf, size_t buf_len, zval **z TSRMLS_DC);
#endif /* IGBINARY_H */

No commit comments for this range

Something went wrong with that request. Please try again.