Mark Shannon <m...@hotpy.org> added the comment:

I disagree. All that is doing is locking in the current poor interface.

We do need to extend the C API for these uses, yes. But we need an API that 
addresses Cython's needs directly and at a higher level.

For example, Cython often wants to insert a frame into the call stack for 
debugging and introspection.

Rather than have Cython laboriously create a Python frame with fake code 
object, etc., it would make much more sense for us to offer an API to insert a 
"native" frame into the stack and update the line number.

E.g. something like:

int PushNativeFrame(const char *filename);
void PopNativeFrame(void);
int CurrentNativeFrame_SetLineNumber(int lineno);

We might even want to use such an API ourselves in some modules.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45247>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to