summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/_weakref.c.h
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/clinic/_weakref.c.h
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/clinic/_weakref.c.h')
-rw-r--r--Modules/clinic/_weakref.c.h31
1 files changed, 31 insertions, 0 deletions
diff --git a/Modules/clinic/_weakref.c.h b/Modules/clinic/_weakref.c.h
new file mode 100644
index 0000000..87c701c
--- /dev/null
+++ b/Modules/clinic/_weakref.c.h
@@ -0,0 +1,31 @@
+/*[clinic input]
+preserve
+[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;
+}
+/*[clinic end generated code: output=4da9aade63eed77f input=a9049054013a1b77]*/