Staging
v0.5.1
https://github.com/python/cpython
Revision 5addf891ed45c41bcff81618c9fd975b79fcef36 authored by Terry Jan Reedy on 23 May 2015, 21:14:09 UTC, committed by Terry Jan Reedy on 23 May 2015, 21:14:09 UTC
2 parent s c779216 + 4cbb9e6
Raw File
Tip revision: 5addf891ed45c41bcff81618c9fd975b79fcef36 authored by Terry Jan Reedy on 23 May 2015, 21:14:09 UTC
Add Idle NEWS item.
Tip revision: 5addf89
_weakref.c.h
/*[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]*/
back to top