@@ -112,28 +112,28 @@ def test_int(self):
112
112
def test_float_binops (self ):
113
113
TestFloatBinop = CPyExtType ("TestFloatBinop" ,
114
114
"""
115
- PyObject* test_float (PyObject* self) {
115
+ PyObject* test_float_impl (PyObject* self) {
116
116
PyErr_SetString(PyExc_RuntimeError, "Should not call __float__");
117
117
return NULL;
118
118
}
119
- PyObject* test_add (PyObject* a, PyObject* b) {
119
+ PyObject* test_add_impl (PyObject* a, PyObject* b) {
120
120
return PyLong_FromLong(42);
121
121
}
122
- PyObject* test_sub (PyObject* a, PyObject* b) {
122
+ PyObject* test_sub_impl (PyObject* a, PyObject* b) {
123
123
return PyLong_FromLong(4242);
124
124
}
125
- PyObject* test_mul (PyObject* a, PyObject* b) {
125
+ PyObject* test_mul_impl (PyObject* a, PyObject* b) {
126
126
return PyLong_FromLong(424242);
127
127
}
128
- PyObject* test_pow (PyObject* a, PyObject* b, PyObject* c) {
128
+ PyObject* test_pow_impl (PyObject* a, PyObject* b, PyObject* c) {
129
129
return PyLong_FromLong(42424242);
130
130
}
131
131
""" ,
132
- nb_float = "test_float " ,
133
- nb_add = "test_add " ,
134
- nb_subtract = "test_sub " ,
135
- nb_multiply = "test_mul " ,
136
- nb_power = "test_pow "
132
+ nb_float = "test_float_impl " ,
133
+ nb_add = "test_add_impl " ,
134
+ nb_subtract = "test_sub_impl " ,
135
+ nb_multiply = "test_mul_impl " ,
136
+ nb_power = "test_pow_impl "
137
137
)
138
138
x = TestFloatBinop ()
139
139
assert 10.0 + x == 42
0 commit comments