OSDN Git Service

move #define to file head.
authorYoshihiro Yamazaki <yoya@awm.jp>
Mon, 20 Feb 2012 06:44:30 +0000 (15:44 +0900)
committerYoshihiro Yamazaki <yoya@awm.jp>
Mon, 20 Feb 2012 06:44:30 +0000 (15:44 +0900)
src/php_swfed.c

index 2e26ce3..2fbba57 100644 (file)
 #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;