Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个 Python 代码调用一些 C 代码(.so 文件)。
有没有办法从 C 代码中获取在 Python 端调用它的行号?
我最终找到了PyFrame_GetLineNumber(PyFrameObject *f)C 函数,其源代码位于frameobject.c.
PyFrame_GetLineNumber(PyFrameObject *f)
frameobject.c