Permalink
Browse files

Change windows stuff here, not that anyone uses it

  • Loading branch information...
1 parent a555e38 commit 3d324df8b4cdb4c6eb5ed8d7d6d054ce32d84436 @mkoppanen committed Nov 26, 2013
Showing with 13 additions and 6 deletions.
  1. +1 −0 config.w32
  2. +3 −3 php_memcached.c
  3. +9 −3 php_memcached.h
View
@@ -14,4 +14,5 @@ if (PHP_MEMCACHED == "yes") {
}
EXTENSION("memcached", "memcached.c");
AC_DEFINE("HAVE_MEMCACHED", 1, "memcached support");
+ AC_DEFINE("MEMCACHED_EXPORTS", 1)
}
View
@@ -3510,19 +3510,19 @@ static int php_memc_zval_from_payload(zval *value, const char *payload_in, size_
return retval;
}
-PHPAPI
+PHP_MEMCACHED_API
zend_class_entry *php_memc_get_ce(void)
{
return memcached_ce;
}
-PHPAPI
+PHP_MEMCACHED_API
zend_class_entry *php_memc_get_exception(void)
{
return memcached_exception_ce;
}
-PHPAPI
+PHP_MEMCACHED_API
zend_class_entry *php_memc_get_exception_base(int root TSRMLS_DC)
{
#if HAVE_SPL
View
@@ -28,9 +28,15 @@
#define PHP_MEMCACHED_VERSION "2.2.0b1"
-PHPAPI zend_class_entry *php_memc_get_ce(void);
-PHPAPI zend_class_entry *php_memc_get_exception(void);
-PHPAPI zend_class_entry *php_memc_get_exception_base(int root TSRMLS_DC);
+#if defined(PHP_WIN32) && defined(MEMCACHED_EXPORTS)
+#define PHP_MEMCACHED_API __declspec(dllexport)
+#else
+#define PHP_MEMCACHED_API PHPAPI
+#endif
+
+PHP_MEMCACHED_API zend_class_entry *php_memc_get_ce(void);
+PHP_MEMCACHED_API zend_class_entry *php_memc_get_exception(void);
+PHP_MEMCACHED_API zend_class_entry *php_memc_get_exception_base(int root TSRMLS_DC);
extern zend_module_entry memcached_module_entry;
#define phpext_memcached_ptr &memcached_module_entry

0 comments on commit 3d324df

Please sign in to comment.