Skip to content
Browse files

merged branch arjenjb/master (PR #528)

Commits
-------

c65be3e Pass around the TSRM
09d3095 Moved zval declaration
c941552 Removed globals
ffb2460 Added config.w32 for windows builds

Discussion
----------

Fixed compilation on windows
  • Loading branch information...
2 parents 84c4ba1 + c65be3e commit 7cfb0ecbb8b3d16cb28c69d13758072405b5e7a2 @fabpot fabpot committed
Showing with 11 additions and 14 deletions.
  1. +8 −0 ext/twig/config.w32
  2. +0 −3 ext/twig/php_twig.h
  3. +3 −11 ext/twig/twig.c
View
8 ext/twig/config.w32
@@ -0,0 +1,8 @@
+// vim:ft=javascript
+
+ARG_ENABLE("twig", "Twig support", "no");
+
+if (PHP_TWIG != "no") {
+ AC_DEFINE('HAVE_TWIG', 1);
+ EXTENSION('twig', 'twig.c');
+}
View
3 ext/twig/php_twig.h
@@ -38,9 +38,6 @@ PHP_RINIT_FUNCTION(twig);
PHP_RSHUTDOWN_FUNCTION(twig);
PHP_MINFO_FUNCTION(twig);
-ZEND_BEGIN_MODULE_GLOBALS(twig)
-ZEND_END_MODULE_GLOBALS(twig)
-
#ifdef ZTS
#define TWIG_G(v) TSRMG(twig_globals_id, zend_twig_globals *, v)
#else
View
14 ext/twig/twig.c
@@ -64,19 +64,11 @@ zend_module_entry twig_module_entry = {
ZEND_GET_MODULE(twig)
#endif
-ZEND_DECLARE_MODULE_GLOBALS(twig)
-
PHP_INI_BEGIN()
PHP_INI_END()
-
-static void twig_init_globals(zend_twig_globals *twig_globals)
-{
-}
-
PHP_MINIT_FUNCTION(twig)
{
- ZEND_INIT_MODULE_GLOBALS(twig, twig_init_globals, NULL);
REGISTER_INI_ENTRIES();
return SUCCESS;
@@ -595,7 +587,7 @@ char *TWIG_IMPLODE_ARRAY_KEYS(char *joiner, zval *array TSRMLS_DC)
return collector.c;
}
-static void TWIG_THROW_EXCEPTION(char *exception_name, char *message, ...)
+static void TWIG_THROW_EXCEPTION(char *exception_name, char *message TSRMLS_DC, ...)
{
char *buffer;
va_list args;
@@ -711,6 +703,8 @@ PHP_FUNCTION(twig_template_get_attributes)
zend_bool isDefinedTest = 0;
zend_bool ignoreStrictCheck = 0;
int free_ret = 0;
+ zval *tmp_self_cache;
+
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ozz|asbb", &template, &object, &item, &arguments, &type, &type_len, &isDefinedTest, &ignoreStrictCheck) == FAILURE) {
return;
@@ -825,8 +819,6 @@ PHP_FUNCTION(twig_template_get_attributes)
}
}
*/
- zval *tmp_self_cache;
-
if (Z_TYPE_P(object) == IS_OBJECT) {
char *class_name = NULL;

0 comments on commit 7cfb0ec

Please sign in to comment.
Something went wrong with that request. Please try again.