diff options
author | Georg Brandl <georg@python.org> | 2008-05-20 08:40:43 +0000 |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2008-05-20 08:40:43 +0000 |
commit | 5a5517a98e7559998185d846d8454d610d0449c3 (patch) | |
tree | ccee5ac330b50e15236a4b85a15579f9d5f36dad /Objects/weakrefobject.c | |
parent | eb65e09954d014e83c1cea10ce73aa70bde469e6 (diff) | |
download | cpython-5a5517a98e7559998185d846d8454d610d0449c3.tar.gz |
#2592: delegate nb_index and the floor/truediv slots in weakref.proxy.
Diffstat (limited to 'Objects/weakrefobject.c')
-rw-r--r-- | Objects/weakrefobject.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c index 0a87b53c04..1aee5a5530 100644 --- a/Objects/weakrefobject.c +++ b/Objects/weakrefobject.c @@ -473,6 +473,8 @@ WRAP_BINARY(proxy_add, PyNumber_Add) WRAP_BINARY(proxy_sub, PyNumber_Subtract) WRAP_BINARY(proxy_mul, PyNumber_Multiply) WRAP_BINARY(proxy_div, PyNumber_Divide) +WRAP_BINARY(proxy_floor_div, PyNumber_FloorDivide) +WRAP_BINARY(proxy_true_div, PyNumber_TrueDivide) WRAP_BINARY(proxy_mod, PyNumber_Remainder) WRAP_BINARY(proxy_divmod, PyNumber_Divmod) WRAP_TERNARY(proxy_pow, PyNumber_Power) @@ -492,6 +494,8 @@ WRAP_BINARY(proxy_iadd, PyNumber_InPlaceAdd) WRAP_BINARY(proxy_isub, PyNumber_InPlaceSubtract) WRAP_BINARY(proxy_imul, PyNumber_InPlaceMultiply) WRAP_BINARY(proxy_idiv, PyNumber_InPlaceDivide) +WRAP_BINARY(proxy_ifloor_div, PyNumber_InPlaceFloorDivide) +WRAP_BINARY(proxy_itrue_div, PyNumber_InPlaceTrueDivide) WRAP_BINARY(proxy_imod, PyNumber_InPlaceRemainder) WRAP_TERNARY(proxy_ipow, PyNumber_InPlacePower) WRAP_BINARY(proxy_ilshift, PyNumber_InPlaceLshift) @@ -499,6 +503,7 @@ WRAP_BINARY(proxy_irshift, PyNumber_InPlaceRshift) WRAP_BINARY(proxy_iand, PyNumber_InPlaceAnd) WRAP_BINARY(proxy_ixor, PyNumber_InPlaceXor) WRAP_BINARY(proxy_ior, PyNumber_InPlaceOr) +WRAP_UNARY(proxy_index, PyNumber_Index) static int proxy_nonzero(PyWeakReference *proxy) @@ -623,6 +628,11 @@ static PyNumberMethods proxy_as_number = { proxy_iand, /*nb_inplace_and*/ proxy_ixor, /*nb_inplace_xor*/ proxy_ior, /*nb_inplace_or*/ + proxy_floor_div, /*nb_floor_divide*/ + proxy_true_div, /*nb_true_divide*/ + proxy_ifloor_div, /*nb_inplace_floor_divide*/ + proxy_itrue_div, /*nb_inplace_true_divide*/ + proxy_index, /*nb_index*/ }; static PySequenceMethods proxy_as_sequence = { |