}
+static char weakref_getweakrefcount__doc__[] =
+"getweakrefcount(object) -- return the number of weak references\n"
+"to 'object'.";
+
static PyObject *
weakref_getweakrefcount(PyObject *self, PyObject *args)
{
}
+static char weakref_getweakrefs__doc__[] =
+"getweakrefs(object) -- return a list of all weak reference objects\n"
+"that point to 'object'.";
+
static PyObject *
weakref_getweakrefs(PyObject *self, PyObject *args)
{
}
+static char weakref_ref__doc__[] =
+"new(object[, callback]) -- create a weak reference to 'object';\n"
+"when 'object' is finalized, 'callback' will be called and passed\n"
+"a reference to 'object'.";
+
static PyObject *
weakref_ref(PyObject *self, PyObject *args)
{
}
+static char weakref_proxy__doc__[] =
+"proxy(object[, callback]) -- create a proxy object that weakly\n"
+"references 'object'. 'callback', if given, is called with a\n"
+"reference to the proxy when it is about to be finalized.";
+
static PyObject *
weakref_proxy(PyObject *self, PyObject *args)
{
static PyMethodDef
weakref_functions[] = {
{"getweakrefcount", weakref_getweakrefcount, METH_VARARGS,
- "getweakrefcount(object) -- return the number of weak references\n"
- "to 'object'."},
+ weakref_getweakrefcount__doc__},
{"getweakrefs", weakref_getweakrefs, METH_VARARGS,
- "getweakrefs(object) -- return a list of all weak reference objects\n"
- "that point to 'object'."},
- {"proxy", weakref_proxy, METH_VARARGS,
- "proxy(object[, callback]) -- create a proxy object that weakly\n"
- "references 'object'. 'callback', if given, is called with a\n"
- "reference to 'object' when it is about to be finalized."},
+ weakref_getweakrefs__doc__},
+ {"proxy", weakref_proxy, METH_VARARGS,
+ weakref_proxy__doc__},
{"ref", weakref_ref, METH_VARARGS,
- "new(object[, callback]) -- create a weak reference to 'object';\n"
- "when 'object' is finalized, 'callback' will be called and passed\n"
- "a reference to 'object'."},
+ weakref_ref__doc__},
{NULL, NULL, 0, NULL}
};