Remove more cruft leftover from nb_coerce. Rename nb_coerce to

nb_reserved.
This commit is contained in:
Neil Schemenauer 2007-09-21 20:19:23 +00:00
parent 8ce81f767a
commit 16c7075164
15 changed files with 20 additions and 66 deletions

View file

@ -108,7 +108,7 @@ static PyNumberMethods bool_as_number = {
bool_and, /* nb_and */
bool_xor, /* nb_xor */
bool_or, /* nb_or */
0, /* nb_coerce */
0, /* nb_reserved */
0, /* nb_int */
0, /* nb_long */
0, /* nb_float */

View file

@ -963,7 +963,7 @@ static PyNumberMethods complex_as_number = {
0, /* nb_and */
0, /* nb_xor */
0, /* nb_or */
(coercion)0, /* nb_coerce */
0, /* nb_reserved */
complex_int, /* nb_int */
complex_long, /* nb_long */
complex_float, /* nb_float */

View file

@ -235,8 +235,7 @@ format_float(char *buf, size_t buflen, PyFloatObject *v, int precision)
}
/* Macro and helper that convert PyObject obj to a C double and store
the value in dbl; this replaces the functionality of the coercion
slot function. If conversion to double raises an exception, obj is
the value in dbl. If conversion to double raises an exception, obj is
set to NULL, and the function invoking this macro returns NULL. If
obj is not of float, int or long type, Py_NotImplemented is incref'ed,
stored in obj, and returned from the function invoking this macro.
@ -1069,7 +1068,7 @@ static PyNumberMethods float_as_number = {
0, /*nb_and*/
0, /*nb_xor*/
0, /*nb_or*/
(coercion)0, /*nb_coerce*/
0, /*nb_reserved*/
float_trunc, /*nb_int*/
float_trunc, /*nb_long*/
float_float, /*nb_float*/

View file

@ -3631,7 +3631,7 @@ static PyNumberMethods long_as_number = {
long_and, /*nb_and*/
long_xor, /*nb_xor*/
long_or, /*nb_or*/
0, /*nb_coerce*/
0, /*nb_reserved*/
long_long, /*nb_int*/
long_long, /*nb_long*/
long_float, /*nb_float*/

View file

@ -1881,7 +1881,7 @@ static PyNumberMethods set_as_number = {
(binaryfunc)set_and, /*nb_and*/
(binaryfunc)set_xor, /*nb_xor*/
(binaryfunc)set_or, /*nb_or*/
0, /*nb_coerce*/
0, /*nb_reserved*/
0, /*nb_int*/
0, /*nb_long*/
0, /*nb_float*/

View file

@ -589,7 +589,7 @@ static PyNumberMethods proxy_as_number = {
proxy_and, /*nb_and*/
proxy_xor, /*nb_xor*/
proxy_or, /*nb_or*/
0, /*nb_coerce*/
0, /*nb_reserved*/
proxy_int, /*nb_int*/
proxy_long, /*nb_long*/
proxy_float, /*nb_float*/