summaryrefslogtreecommitdiffstats
path: root/Modules/_weakref.c
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2015-04-03 20:53:51 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2015-04-03 20:53:51 (GMT)
commit1009bf18b38a8d36298575191dd8fdf43f8f9097 (patch)
tree18860fdef30c931dc2ea177059e96b69a49fa04f /Modules/_weakref.c
parent0759f84d6260bad1234b802212e73fdc5873d261 (diff)
downloadcpython-1009bf18b38a8d36298575191dd8fdf43f8f9097.zip
cpython-1009bf18b38a8d36298575191dd8fdf43f8f9097.tar.gz
cpython-1009bf18b38a8d36298575191dd8fdf43f8f9097.tar.bz2
Issue #23501: Argumen Clinic now generates code into separate files by default.
Diffstat (limited to 'Modules/_weakref.c')
-rw-r--r--Modules/_weakref.c31
1 files changed, 3 insertions, 28 deletions
diff --git a/Modules/_weakref.c b/Modules/_weakref.c
index da58931..7c99d7e 100644
--- a/Modules/_weakref.c
+++ b/Modules/_weakref.c
@@ -9,6 +9,8 @@ module _weakref
[clinic start generated code]*/
/*[clinic end generated code: output=da39a3ee5e6b4b0d input=ffec73b85846596d]*/
+#include "clinic/_weakref.c.h"
+
/*[clinic input]
_weakref.getweakrefcount -> Py_ssize_t
@@ -19,36 +21,9 @@ _weakref.getweakrefcount -> Py_ssize_t
Return the number of weak references to 'object'.
[clinic start generated code]*/
-PyDoc_STRVAR(_weakref_getweakrefcount__doc__,
-"getweakrefcount($module, object, /)\n"
-"--\n"
-"\n"
-"Return the number of weak references to \'object\'.");
-
-#define _WEAKREF_GETWEAKREFCOUNT_METHODDEF \
- {"getweakrefcount", (PyCFunction)_weakref_getweakrefcount, METH_O, _weakref_getweakrefcount__doc__},
-
-static Py_ssize_t
-_weakref_getweakrefcount_impl(PyModuleDef *module, PyObject *object);
-
-static PyObject *
-_weakref_getweakrefcount(PyModuleDef *module, PyObject *object)
-{
- PyObject *return_value = NULL;
- Py_ssize_t _return_value;
-
- _return_value = _weakref_getweakrefcount_impl(module, object);
- if ((_return_value == -1) && PyErr_Occurred())
- goto exit;
- return_value = PyLong_FromSsize_t(_return_value);
-
-exit:
- return return_value;
-}
-
static Py_ssize_t
_weakref_getweakrefcount_impl(PyModuleDef *module, PyObject *object)
-/*[clinic end generated code: output=032eedbfd7d69e10 input=cedb69711b6a2507]*/
+/*[clinic end generated code: output=6a6ad0b98285e468 input=cedb69711b6a2507]*/
{
PyWeakReference **list;