[Swfed-svn] swfed-svn [458] author: yoya

Back to archive index

svnno****@sourc***** svnno****@sourc*****
2011年 3月 24日 (木) 19:44:40 JST


Revision: 458
          http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=458
Author:   yoya
Date:     2011-03-24 19:44:40 +0900 (Thu, 24 Mar 2011)

Log Message:
-----------
author: yoya
replaceMovieClip に第3引数 (unused_cid_purge)を追加

Modified Paths:
--------------
    trunk/src/php_swfed.c
    trunk/src/swf_object.c
    trunk/src/swf_object.h


-------------- next part --------------
Modified: trunk/src/php_swfed.c
===================================================================
--- trunk/src/php_swfed.c	2011-03-24 09:46:36 UTC (rev 457)
+++ trunk/src/php_swfed.c	2011-03-24 10:44:40 UTC (rev 458)
@@ -1159,16 +1159,32 @@
     char *instance_name = NULL, *swf_data = NULL;
     int  instance_name_len = 0, swf_data_len = 0;
     swf_object_t *swf = NULL;
+    int unused_cid_purge = 1; // デフォルト on
     int result = 0;
-    if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss",
-                              &instance_name, &instance_name_len,
-                              &swf_data, &swf_data_len) == FAILURE) {
-        RETURN_FALSE;
+    switch (ZEND_NUM_ARGS()) {
+      default:
+        WRONG_PARAM_COUNT;
+        RETURN_FALSE; /* XXX */
+      case 2:
+        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss",
+				  &instance_name, &instance_name_len,
+				  &swf_data, &swf_data_len) == FAILURE) {
+	  RETURN_FALSE;
+	}
+      break;
+      case 3:
+        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssb",
+				  &instance_name, &instance_name_len,
+				  &swf_data, &swf_data_len, &unused_cid_purge) == FAILURE) {
+	  RETURN_FALSE;
+	}
+	break;
     }
     swf = get_swf_object(getThis() TSRMLS_CC);    
     result = swf_object_replace_movieclip(swf, instance_name,
                                           instance_name_len,
-                                          swf_data, swf_data_len);
+                                          swf_data, swf_data_len,
+                                          unused_cid_purge);
     if (result) {
         RETURN_FALSE;
     }

Modified: trunk/src/swf_object.c
===================================================================
--- trunk/src/swf_object.c	2011-03-24 09:46:36 UTC (rev 457)
+++ trunk/src/swf_object.c	2011-03-24 10:44:40 UTC (rev 458)
@@ -943,7 +943,8 @@
 int
 swf_object_replace_movieclip(swf_object_t *swf,
                              unsigned char *instance_name, int instance_name_len,
-                             unsigned char *swf_data, int swf_data_len) {
+                             unsigned char *swf_data, int swf_data_len,
+                             int unused_cid_purge) {
     int cid = 0, sprite_cid = 0, ret = 0;
     swf_tag_t *tag = NULL;
 #ifdef SWF_OBJECT_UNUSED_CID_PURGE

Modified: trunk/src/swf_object.h
===================================================================
--- trunk/src/swf_object.h	2011-03-24 09:46:36 UTC (rev 457)
+++ trunk/src/swf_object.h	2011-03-24 10:44:40 UTC (rev 458)
@@ -102,9 +102,9 @@
                                         unsigned char *instance_name,
                                         int instancee_name_len,
                                         unsigned char *swf_data,
-                                        int swf_data_len);
+                                        int swf_data_len,
+                                        int unused_cid_purge);
 
-
 extern int swf_object_apply_shapematrix_factor(swf_object_t *swf,int shape_id,
                                                double scale_x, double scale_y,
                                                double rotate_rad,



Swfed-svn メーリングリストの案内
Back to archive index