Re: [pyxser-users] Pyxser generates strange 'name' attribute values
Brought to you by:
damowe
|
From: Max S. <ms...@gm...> - 2010-05-11 05:33:14
|
Hi, Daniel!
Thank you for your work! I've tested revision 145, it works fine.
But there is a really simple issue. When I'm trying to serialize any
sqlalchemy-based object, pyxser segaults. So I looked at the sources
and added a simple check for a NULL pointer:
--- src/pyxser_collections.c (revision 145)
+++ src/pyxser_collections.c (working copy)
@@ -195,7 +195,9 @@
args->rootNode = &csn;
args->currentNode = &csn;
newSerNode = pyxser_SerializeXml(args);
- PYXSER_FREE_OBJECT(unic);
+ if (unic != NULL) {
+ PYXSER_FREE_OBJECT(unic);
+ }
args->o = oold;
args->item = oold;
args->currentNode = currentNodeOld;
I don't know the C language enought to fix it in the right way, may be
there is a memory leak now.
All other tests I made generates valid xml. Now we have cool tool to
serialize python objects to xml-) Thank you!
Best regards, Max Sinelnikov.
On Mon, May 10, 2010 at 9:23 PM, Daniel Molina Wegener <dm...@co...> wrote:
> NP Max, I think that the problem is solved, please try the r145 on
> trunk. Please notify me if that works, I've made some small test here,
> but I need to be sure that it works with your application :)
>
> Thanks in advance...
>
>
> Best regards,
> --
> Daniel Molina Wegener <dmw [at] coder [dot] cl>
> Software Architect, System Programmer & Web Developer
> Phone: +56 (2) 979-0277 | Blog: http://coder.cl/
>
|