X-Git-Url: http://git.asbjorn.biz/?p=swftools.git;a=blobdiff_plain;f=lib%2Fpython%2FSWF.c;h=b1919277201ea61013eb2f198ccbf0f939df770e;hp=e01184126d482798225815872414390bec2653da;hb=3281edc9ef69c0ba876f0146f55540227aa6a7fb;hpb=726d172d02228a2e9b084efba8d3173994343c2b diff --git a/lib/python/SWF.c b/lib/python/SWF.c index e011841..b191927 100644 --- a/lib/python/SWF.c +++ b/lib/python/SWF.c @@ -103,6 +103,8 @@ static PyObject* f_load(PyObject* self, PyObject* args) return NULL; swf = PyObject_New(SWFObject, &SWFClass); + mylog("+%08x(%d) f_load\n", (int)swf, swf->ob_refcnt); + memset(&swf->swf, 0, sizeof(SWF)); swf->filename = strdup(filename); @@ -121,11 +123,10 @@ static PyObject* f_load(PyObject* self, PyObject* args) return 0; } close(fi); - swf->swf.firstTag = 0; swf->taglist = taglist_new2(swf->swf.firstTag); + swf->swf.firstTag = 0; - mylog("+%08x(%d) load\n", (int)self, self->ob_refcnt); return (PyObject*)swf; } //---------------------------------------------------------------------------- @@ -148,6 +149,8 @@ static PyObject * swf_save(PyObject* self, PyObject* args, PyObject* kwargs) if (!PyArg_ParseTupleAndKeywords(args, kwargs, "|si", kwlist, &filename, &compress)) return NULL; + + mylog(" %08x(%d) f_save filename=%s compress=%d\n", (int)self, self->ob_refcnt, filename, compress); // keyword arg compress (=1) forces compression if(compress)