File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -331,6 +331,23 @@ For convenience, some of these functions will always return a
331331 use.
332332
333333
334+ .. c:function:: PyObject *PyErr_ProgramTextObject(PyObject *filename, int lineno)
335+
336+ Get the source line in *filename * at line *lineno *. *filename * should be a
337+ Python :class: `str ` object.
338+
339+ On success, this function returns a Python string object with the found line.
340+ On failure, this function returns ``NULL `` without an exception set.
341+
342+
343+ .. c :function :: PyObject *PyErr_ProgramText (const char *filename, int lineno)
344+
345+ Similar to :c:func: `PyErr_ProgramTextObject `, but *filename * is a
346+ :c:expr: `const char * `, which is decoded with the
347+ :term: `filesystem encoding and error handler `, instead of a
348+ Python object reference.
349+
350+
334351Issuing warnings
335352================
336353
You can’t perform that action at this time.
0 commit comments