From 7fb10c2dfae3cdf9ecb11d2ce2e6f0e99999f1d0 Mon Sep 17 00:00:00 2001 From: Tugdual Saunier Date: Thu, 22 Aug 2013 18:27:52 +0200 Subject: [PATCH] [ext] Fixed Windows compatibility (closes #1167) --- ext/twig/twig.c | 12 ++++-------- 1 files changed, 4 insertions(+), 8 deletions(-) diff --git a/ext/twig/twig.c b/ext/twig/twig.c index d41e2a8..2086014 100644 --- a/ext/twig/twig.c +++ b/ext/twig/twig.c @@ -78,9 +78,6 @@ ZEND_GET_MODULE(twig) int TWIG_ARRAY_KEY_EXISTS(zval *array, zval *key) { - zval temp; - int result; - if (Z_TYPE_P(array) != IS_ARRAY) { return 0; } @@ -260,7 +257,6 @@ zval *TWIG_GET_STATIC_PROPERTY(zval *class, char *prop_name TSRMLS_DC) zval *TWIG_GET_ARRAY_ELEMENT_ZVAL(zval *class, zval *prop_name TSRMLS_DC) { zval **tmp_zval; - char *tmp_name; if (class == NULL || Z_TYPE_P(class) != IS_ARRAY) { if (class != NULL && Z_TYPE_P(class) == IS_OBJECT && TWIG_INSTANCE_OF(class, zend_ce_arrayaccess TSRMLS_CC)) { @@ -755,7 +751,9 @@ PHP_FUNCTION(twig_template_get_attributes) zend_bool ignoreStrictCheck = 0; int free_ret = 0; zval *tmp_self_cache; - + char *class_name = NULL; + zval *tmp_class; + char *type_name; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ozz|asbb", &template, &object, &zitem, &arguments, &type, &type_len, &isDefinedTest, &ignoreStrictCheck) == FAILURE) { return; @@ -880,7 +878,7 @@ PHP_FUNCTION(twig_template_get_attributes) return; } - char *type_name = zend_zval_type_name(object); + type_name = zend_zval_type_name(object); Z_ADDREF_P(object); convert_to_string_ex(&object); @@ -893,8 +891,6 @@ PHP_FUNCTION(twig_template_get_attributes) /* $class = get_class($object); */ - char *class_name = NULL; - zval *tmp_class; class_name = TWIG_GET_CLASS_NAME(object TSRMLS_CC); tmp_self_cache = TWIG_GET_STATIC_PROPERTY(template, "cache" TSRMLS_CC); -- 1.7.2.5