From 6d72eaadfcc19eb917ca15ada059210e2b63a91f Mon Sep 17 00:00:00 2001 From: kramm Date: Thu, 8 Apr 2004 08:54:39 +0000 Subject: [PATCH] FoldAll is now done in SWF.c --- lib/python/taglist.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/lib/python/taglist.c b/lib/python/taglist.c index 8b4acf1..7e101c8 100644 --- a/lib/python/taglist.c +++ b/lib/python/taglist.c @@ -29,22 +29,19 @@ PyObject * taglist_new2(TAG*tag) mylog("+%08x(%d) taglist_new2 tag=%08x", (int)taglist, taglist->ob_refcnt, tag); PyObject* tagmap = tagmap_new(); - swf_FoldAllTags(tag); - - int nr=0; + int nr=0, len=0; TAG*t = tag; TAG*last = t; - while(t) {nr++;last=t;t=t->next;} + while(t) {len++;last=t;t=t->next;} if(last && last->id==ST_END) { - swf_DeleteTag(last); - nr--; + swf_DeleteTag(last); last = 0; + len--; + if(len==0) tag = 0; } - taglist->taglist = PyList_New(nr); + taglist->taglist = PyList_New(len); - mylog("+%08x(%d) taglist_new2: %d items", (int)taglist, taglist->ob_refcnt, nr); - nr = 0; t = tag; while(t) { -- 1.7.10.4