Closed GoogleCodeExporter closed 9 years ago
auwf, I hate it when this happens.. :-) I put this on my list of things to look
into quickly, thanks!
btw, it's a good idea to try some unsupported modules to locate bugs, but
please don't expect string processing libs to become faster with shedskin!
strings in C++ are probably actually slower than in CPython..
Original comment by mark.duf...@gmail.com
on 8 Nov 2010 at 8:56
I realize that string processing speed isn't going to improve that much yet.
I'm trying to make StringIO work because so many modules import it.
(Incidentally, it would really help if Shed Skin error messages like the one
for an import within a conditional or an undefined type came with module names
and line numbers. Thanks.)
Original comment by na...@animats.com
on 8 Nov 2010 at 9:05
This turns out to be related to the line
del self.buf, self.pos
in StringIO.close.
It's "del self.buf" that's causing a crash. Replacing that with
self.buf = ""
is a successful workaround.
Attached is a somewhat hacked up version of StringIO which will pass its unit
test compiled with ShedSkin. Other problems that had to be dealt with involved
removing Unicode support, avoiding "isinstance(s, str)", and eliminating mixing
of None and int types.
Original comment by na...@animats.com
on 9 Nov 2010 at 5:29
Attachments:
thanks for looking further into this. deleting an attribute is not supported by
shedskin (too dynamic to translate to C++), so we should probably add a
warning/error message for this case.
I'm hoping to look into all the issues you reported on wednesday.
Original comment by mark.duf...@gmail.com
on 9 Nov 2010 at 8:56
btw, "del self.buf, self.pos" seems to be a no-op: it creates a tuple, then
deletes just the tuple!?
Original comment by mark.duf...@gmail.com
on 14 Nov 2010 at 9:38
oh, sorry, it does seem to work actually.. bah.
Original comment by mark.duf...@gmail.com
on 14 Nov 2010 at 9:46
okay, I fixed the crash, and added a warning instead. thanks again for
reporting!
btw, I could fix the other two issues today, but instead I added them to the
'easy tasks' wiki page.. I hope you don't mind. it seems like a good idea to
have some easy tasks around to try and lure people into shedskin development..
:-)
Original comment by mark.duf...@gmail.com
on 14 Nov 2010 at 10:50
Original issue reported on code.google.com by
na...@animats.com
on 8 Nov 2010 at 6:00Attachments: