svnno****@sourc*****
svnno****@sourc*****
2011年 3月 6日 (日) 22:13:52 JST
Revision: 381 http://sourceforge.jp/projects/swfed/svn/view?view=rev&revision=381 Author: yoya Date: 2011-03-06 22:13:52 +0900 (Sun, 06 Mar 2011) Log Message: ----------- swf_tag_move (data, detail 等の情報の移し替え)の実装 Modified Paths: -------------- trunk/src/swf_tag.c trunk/src/swf_tag.h -------------- next part -------------- Modified: trunk/src/swf_tag.c =================================================================== --- trunk/src/swf_tag.c 2011-03-06 11:56:11 UTC (rev 380) +++ trunk/src/swf_tag.c 2011-03-06 13:13:52 UTC (rev 381) @@ -837,3 +837,14 @@ return 0; } +extern swf_tag_t * swf_tag_move(swf_tag_t *from_tag) { + swf_tag_t *to_tag = calloc(sizeof(*to_tag), 1); + to_tag->tag = from_tag->tag; + to_tag->data = from_tag->data; + from_tag->data = NULL; + to_tag->length = from_tag->length; + to_tag->length_longformat = from_tag->length_longformat; + to_tag->detail = from_tag->detail; + from_tag->detail = NULL; + return to_tag; +} Modified: trunk/src/swf_tag.h =================================================================== --- trunk/src/swf_tag.h 2011-03-06 11:56:11 UTC (rev 380) +++ trunk/src/swf_tag.h 2011-03-06 13:13:52 UTC (rev 381) @@ -110,4 +110,6 @@ y_keyvalue_t *kv, struct swf_object_ *swf); +extern swf_tag_t * swf_tag_move(swf_tag_t *tag); + #endif /* __SWF_TAG_H__ */