summaryrefslogtreecommitdiffstats
path: root/Objects/classobject.c
diff options
context:
space:
mode:
Diffstat (limited to 'Objects/classobject.c')
-rw-r--r--Objects/classobject.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 514869c..9026968 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -714,6 +714,12 @@ instance_coerce(pv, pw)
return 0;
}
+UNARY(instance_int, "__int__")
+UNARY(instance_long, "__long__")
+UNARY(instance_float, "__float__")
+UNARY(instance_oct, "__oct__")
+UNARY(instance_hex, "__hex__")
+
static number_methods instance_as_number = {
instance_add, /*nb_add*/
instance_sub, /*nb_subtract*/
@@ -733,6 +739,11 @@ static number_methods instance_as_number = {
instance_xor, /*nb_xor*/
instance_or, /*nb_or*/
instance_coerce, /*nb_coerce*/
+ instance_int, /*nb_int*/
+ instance_long, /*nb_long*/
+ instance_float, /*nb_float*/
+ instance_oct, /*nb_oct*/
+ instance_hex, /*nb_hex*/
};
typeobject Instancetype = {