Remove C++/C99-style comments.
[python.git] / Doc / c-api / reflection.rst
blob3996c1f18d63d0aac97983a71564034bfba92e93
1 .. highlightlang:: c
3 .. _reflection:
5 Reflection
6 ==========
8 .. cfunction:: PyObject* PyEval_GetBuiltins()
10    Return a dictionary of the builtins in the current execution frame,
11    or the interpreter of the thread state if no frame is currently executing.
14 .. cfunction:: PyObject* PyEval_GetLocals()
16    Return a dictionary of the local variables in the current execution frame,
17    or *NULL* if no frame is currently executing.
20 .. cfunction:: PyObject* PyEval_GetGlobals()
22    Return a dictionary of the global variables in the current execution frame,
23    or *NULL* if no frame is currently executing.
26 .. cfunction:: PyFrameObject* PyEval_GetFrame()
28    Return the current thread state's frame, which is *NULL* if no frame is
29    currently executing.
32 .. cfunction:: int PyFrame_GetLineNumber(PyFrameObject *frame)
34    Return the line number that *frame* is currently executing.
37 .. cfunction:: int PyEval_GetRestricted()
39    If there is a current frame and it is executing in restricted mode, return true,
40    otherwise false.
43 .. cfunction:: const char* PyEval_GetFuncName(PyObject *func)
45    Return the name of *func* if it is a function, class or instance object, else the
46    name of *func*\s type.
49 .. cfunction:: const char* PyEval_GetFuncDesc(PyObject *func)
51    Return a description string, depending on the type of *func*.
52    Return values include "()" for functions and methods, " constructor",
53    " instance", and " object".  Concatenated with the result of
54    :cfunc:`PyEval_GetFuncName`, the result will be a description of
55    *func*.