git.asbjorn.biz
/
swftools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
test importing a builtin type, too
[swftools.git]
/
lib
/
python
/
tag.c
diff --git
a/lib/python/tag.c
b/lib/python/tag.c
index
69938a8
..
f495499
100644
(file)
--- a/
lib/python/tag.c
+++ b/
lib/python/tag.c
@@
-83,7
+83,7
@@
static void tag_dealloc(PyObject * self)
tag->internals.data = 0;
}
if(tag->internals.tag) {
tag->internals.data = 0;
}
if(tag->internals.tag) {
- swf_DeleteTag(tag->internals.tag);
+ swf_DeleteTag(0, tag->internals.tag);
tag->internals.tag = 0;
}
Py_DECREF(tag->internals.tagmap);
tag->internals.tag = 0;
}
Py_DECREF(tag->internals.tagmap);
@@
-196,6
+196,11
@@
static PyObject* tag_getattr(PyObject * self, char* a)
char* name = swf_TagGetName(tag->internals.tag);
return Py_BuildValue("s", name);
}
char* name = swf_TagGetName(tag->internals.tag);
return Py_BuildValue("s", name);
}
+ if(!strcmp(a, "data")) {
+ if(!fillTAG(self))
+ return 0;
+ return Py_BuildValue("s#", tag->internals.tag->data, tag->internals.tag->len);
+ }
if(tag->internals.getattr) {
PyObject* ret = tag->internals.getattr(&tag->internals, a);
if(ret) return ret;
if(tag->internals.getattr) {
PyObject* ret = tag->internals.getattr(&tag->internals, a);
if(ret) return ret;
@@
-224,7
+229,7
@@
static int tag_setattr(PyObject * _self, char* a, PyObject * o)
/* a setattr will almost certainly change the tag data,
so delete the tag */
if(self->internals.tag) {
/* a setattr will almost certainly change the tag data,
so delete the tag */
if(self->internals.tag) {
- swf_DeleteTag(self->internals.tag);
+ swf_DeleteTag(0, self->internals.tag);
self->internals.tag = 0;
}
if(self->internals.setattr) {
self->internals.tag = 0;
}
if(self->internals.setattr) {