2
/************************************************************/
3
/*** C header subsection: debugging info ***/
5
/* NOTE: this is not included by <g_include.h>.
6
The #include is generated manually if needed. */
8
#undef METHODDEF_DEBUGINFO
9
#define METHODDEF_DEBUGINFO \
10
{ "debuginfo_offset", debuginfo_offset, METH_VARARGS }, \
11
{ "debuginfo_global", debuginfo_global, METH_VARARGS }, \
12
{ "debuginfo_peek", debuginfo_peek, METH_VARARGS },
16
PyObject *debuginfo_offset(PyObject *self, PyObject *args);
17
PyObject *debuginfo_global(PyObject *self, PyObject *args);
18
PyObject *debuginfo_peek(PyObject *self, PyObject *args);
23
#ifndef PYPY_NOT_MAIN_FILE
25
PyObject *debuginfo_offset(PyObject *self, PyObject *args)
28
if (!PyArg_ParseTuple(args, "i", &index))
30
return PyInt_FromLong(debuginfo_offsets[index]);
33
PyObject *debuginfo_global(PyObject *self, PyObject *args)
36
if (!PyArg_ParseTuple(args, "i", &index))
38
return PyLong_FromVoidPtr(debuginfo_globals[index]);
41
PyObject *debuginfo_peek(PyObject *self, PyObject *args)
46
if (!PyArg_ParseTuple(args, "Oi", &o, &size))
48
start = PyLong_AsVoidPtr(o);
51
return PyString_FromStringAndSize((char *)start, size);
54
#endif /* PYPY_NOT_MAIN_FILE */