From 24e865fc24fc57b3da757426ea83972bd1a87dbe Mon Sep 17 00:00:00 2001 From: Yoshihiro Yamazaki Date: Mon, 20 Feb 2012 15:44:30 +0900 Subject: [PATCH] move #define to file head. --- src/php_swfed.c | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/php_swfed.c b/src/php_swfed.c index 2e26ce3..2fbba57 100644 --- a/src/php_swfed.c +++ b/src/php_swfed.c @@ -42,6 +42,24 @@ #include "swf_tag.h" #include "swf_object.h" +#define SWFED_VERSION "0.53a" + +#define get_zend_hash_value_long(table, key, value) do { \ + zval **tmp = NULL; \ + if (zend_hash_find(table, key, sizeof(key), (void**)&tmp) == SUCCESS) { \ + convert_to_long_ex(tmp); \ + value = Z_LVAL_PP(tmp); \ + } \ + } while (0); + +#define get_zend_hash_value_boolean(table, key, value) do { \ + zval **tmp = NULL; \ + if (zend_hash_find(table, key, sizeof(key), (void**)&tmp) == SUCCESS) { \ + convert_to_boolean_ex(tmp); \ + value = Z_LVAL_PP(tmp); \ + } \ + } while (0); + /* If you declare any globals in php_swfed.h uncomment this: ZEND_DECLARE_MODULE_GLOBALS(swfed) */ @@ -108,8 +126,6 @@ zend_function_entry swfed_functions[] = { }; /* }}} */ -#define SWFED_VERSION "0.53a" - /* {{{ swfed_module_entry */ zend_module_entry swfed_module_entry = { @@ -1080,22 +1096,6 @@ PHP_METHOD(swfed, replaceGIFData) { #endif /* HAVE_GIF */ } -#define get_zend_hash_value_long(table, key, value) do { \ - zval **tmp = NULL; \ - if (zend_hash_find(table, key, sizeof(key), (void**)&tmp) == SUCCESS) { \ - convert_to_long_ex(tmp); \ - value = Z_LVAL_PP(tmp); \ - } \ - } while (0); - -#define get_zend_hash_value_boolean(table, key, value) do { \ - zval **tmp = NULL; \ - if (zend_hash_find(table, key, sizeof(key), (void**)&tmp) == SUCCESS) { \ - convert_to_boolean_ex(tmp); \ - value = Z_LVAL_PP(tmp); \ - } \ - } while (0); - PHP_METHOD(swfed, replaceBitmapData) { char *data = NULL, *alpha_data = NULL; int data_len = 0 , alpha_data_len = 0; -- 2.11.0