setjmp and longjmp cause super sad panda misery for me.
They make it hard to use threads with tinypy, and also cause troubles
with cpython ctypes... and I can imagine, it'd make it harder to embed
tinypy in some systems too.
They are currently used for exception handling, but maybe we can do
exception handling a different way?
Anyway, yes it's possible to remove setjmp/longjmp stuff as long as the status of `tp->ex` is checked after each tp_call (or anything else that could invoke an exception) and then manually call tp_handle.
This could be done at the end of tp_step I suppose, and you'd have to modify _tp_run to exit gracefully...
tp_handle could be yanked out too, allowing anybody to write their on handler?
> setjmp and longjmp cause super sad panda misery for me.
> They make it hard to use threads with tinypy, and also cause troubles > with cpython ctypes... and I can imagine, it'd make it harder to embed > tinypy in some systems too.
> They are currently used for exception handling, but maybe we can do > exception handling a different way?
> Anyway, yes it's possible to remove setjmp/longjmp stuff as long as
> the status of `tp->ex` is checked after each tp_call (or anything else
> that could invoke an exception) and then manually call tp_handle.
> This could be done at the end of tp_step I suppose, and you'd have to
> modify _tp_run to exit gracefully...
> tp_handle could be yanked out too, allowing anybody to write their on handler?
> > setjmp and longjmp cause super sad panda misery for me.
> > They make it hard to use threads with tinypy, and also cause troubles
> > with cpython ctypes... and I can imagine, it'd make it harder to embed
> > tinypy in some systems too.
> > They are currently used for exception handling, but maybe we can do
> > exception handling a different way?
On Feb 24, 6:03 am, illume <ren...@gmail.com> wrote:
> setjmp and longjmp cause super sad panda misery for me.
Hi everyone, I'm new to tinypy, just heard of it on the SWIG mailing
list, and it sounds completely awesome! (I have always been enamored
with the Lua VM, but I hate the Lua language, love Python, and have
always wanted the sandboxing features I have read tinypy has!
Being a newb, I am inclined to ask this: I read that tinypy is
stackless -- so why does would it need to use setjmp/longjmp for
*anything*?
> On Feb 24, 6:03 am, illume <ren...@gmail.com> wrote:
> > setjmp and longjmp cause super sad panda misery for me.
> Hi everyone, I'm new to tinypy, just heard of it on the SWIG mailing
> list, and it sounds completely awesome! (I have always been enamored
> with the Lua VM, but I hate the Lua language, love Python, and have
> always wanted the sandboxing features I have read tinypy has!
> Being a newb, I am inclined to ask this: I read that tinypy is
> stackless -- so why does would it need to use setjmp/longjmp for
> *anything*?