summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2003-07-14 21:46:23 (GMT)
committerFred Drake <fdrake@acm.org>2003-07-14 21:46:23 (GMT)
commitfe89cc186cc0a0d31f63ee0f174b394f2538c5a8 (patch)
tree83e90f04aa52771add86e699b0246fc7b3aa5e67 /Objects
parentf425b1ec420b95ce4d6bb6dc35472ad9652110dc (diff)
downloadcpython-fe89cc186cc0a0d31f63ee0f174b394f2538c5a8.zip
cpython-fe89cc186cc0a0d31f63ee0f174b394f2538c5a8.tar.gz
cpython-fe89cc186cc0a0d31f63ee0f174b394f2538c5a8.tar.bz2
Remove proxy_print(), since that caused an inconsistency between
"print repr(proxy(a))" and "proxy(a)" at an interactive prompt. Closes SF bug #722763.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/weakrefobject.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c
index f5afb53..f5be759 100644
--- a/Objects/weakrefobject.c
+++ b/Objects/weakrefobject.c
@@ -264,14 +264,6 @@ WRAP_BINARY(proxy_getattr, PyObject_GetAttr)
WRAP_UNARY(proxy_str, PyObject_Str)
WRAP_TERNARY(proxy_call, PyEval_CallObjectWithKeywords)
-static int
-proxy_print(PyWeakReference *proxy, FILE *fp, int flags)
-{
- if (!proxy_checkref(proxy))
- return -1;
- return PyObject_Print(PyWeakref_GET_OBJECT(proxy), fp, flags);
-}
-
static PyObject *
proxy_repr(PyWeakReference *proxy)
{
@@ -479,7 +471,7 @@ _PyWeakref_ProxyType = {
0,
/* methods */
(destructor)weakref_dealloc, /* tp_dealloc */
- (printfunc)proxy_print, /* tp_print */
+ 0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
proxy_compare, /* tp_compare */
@@ -514,7 +506,7 @@ _PyWeakref_CallableProxyType = {
0,
/* methods */
(destructor)weakref_dealloc, /* tp_dealloc */
- (printfunc)proxy_print, /* tp_print */
+ 0, /* tp_print */
0, /* tp_getattr */
0, /* tp_setattr */
proxy_compare, /* tp_compare */