Permalink
Browse files

5.4 compatibility

  • Loading branch information...
1 parent 7b8f377 commit 457aec837a50ffefd3d13ec34ebc2206f454f03d @piotras committed Dec 15, 2011
Showing with 7 additions and 3 deletions.
  1. +7 −3 php_midgard__helpers.h
View
@@ -49,6 +49,10 @@ zend_class_entry *php_date_get_timezone_ce(void);
void php_midgard_docs_add_class (const gchar *classname);
void php_midgard_docs_add_method_comment (const char *classname, const char *method, const char *comment);
const gchar *php_midgard_docs_get_method_comment (const gchar *classname, const gchar *method);
-
-#define php_mgd_register_auto_global(name) \
- zend_register_auto_global(#name, sizeof(#name)-1, NULL TSRMLS_CC);
+#if (PHP_MAJOR_VERSION == 5 && PHP_MINOR_VERSION >= 3)
+# define php_mgd_register_auto_global(name) \
+# zend_register_auto_global(#name, sizeof(#name)-1, 0, NULL TSRMLS_CC);
+#else
+# define php_mgd_register_auto_global(name) \
+# zend_register_auto_global(#name, sizeof(#name)-1, NULL TSRMLS_CC);
+#endif

0 comments on commit 457aec8

Please sign in to comment.