Skip to content

bpo-30866: Add _testcapi.stack_pointer() #2601

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 10, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Modules/_testcapimodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -4272,6 +4272,13 @@ test_pyobject_fastcallkeywords(PyObject *self, PyObject *args)
return _PyObject_FastCallKeywords(func, stack, nargs, kwnames);
}

static PyObject*
stack_pointer(PyObject *self, PyObject *args)
{
int v = 5;
return PyLong_FromVoidPtr(&v);
}


static PyMethodDef TestMethods[] = {
{"raise_exception", raise_exception, METH_VARARGS},
Expand Down Expand Up @@ -4485,6 +4492,7 @@ static PyMethodDef TestMethods[] = {
{"pyobject_fastcall", test_pyobject_fastcall, METH_VARARGS},
{"pyobject_fastcalldict", test_pyobject_fastcalldict, METH_VARARGS},
{"pyobject_fastcallkeywords", test_pyobject_fastcallkeywords, METH_VARARGS},
{"stack_pointer", stack_pointer, METH_NOARGS},
{NULL, NULL} /* sentinel */
};

Expand Down