@@ -418,11 +418,6 @@ test_bool_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
418
418
if (nargs < 3) {
419
419
goto skip_optional;
420
420
}
421
- if (PyFloat_Check(args[2])) {
422
- PyErr_SetString(PyExc_TypeError,
423
- "integer argument expected, got float" );
424
- goto exit;
425
- }
426
421
c = _PyLong_AsInt(args[2]);
427
422
if (c == -1 && PyErr_Occurred()) {
428
423
goto exit;
@@ -436,7 +431,7 @@ exit:
436
431
437
432
static PyObject *
438
433
test_bool_converter_impl(PyObject *module, int a, int b, int c)
439
- /*[clinic end generated code: output=25f20963894256a1 input=939854fa9f248c60]*/
434
+ /*[clinic end generated code: output=b5ec6409d942e0f9 input=939854fa9f248c60]*/
440
435
441
436
442
437
/*[clinic input]
@@ -729,11 +724,6 @@ test_unsigned_char_converter(PyObject *module, PyObject *const *args, Py_ssize_t
729
724
if (nargs < 1) {
730
725
goto skip_optional;
731
726
}
732
- if (PyFloat_Check(args[0])) {
733
- PyErr_SetString(PyExc_TypeError,
734
- "integer argument expected, got float" );
735
- goto exit;
736
- }
737
727
{
738
728
long ival = PyLong_AsLong(args[0]);
739
729
if (ival == -1 && PyErr_Occurred()) {
@@ -756,11 +746,6 @@ test_unsigned_char_converter(PyObject *module, PyObject *const *args, Py_ssize_t
756
746
if (nargs < 2) {
757
747
goto skip_optional;
758
748
}
759
- if (PyFloat_Check(args[1])) {
760
- PyErr_SetString(PyExc_TypeError,
761
- "integer argument expected, got float" );
762
- goto exit;
763
- }
764
749
{
765
750
long ival = PyLong_AsLong(args[1]);
766
751
if (ival == -1 && PyErr_Occurred()) {
@@ -783,14 +768,9 @@ test_unsigned_char_converter(PyObject *module, PyObject *const *args, Py_ssize_t
783
768
if (nargs < 3) {
784
769
goto skip_optional;
785
770
}
786
- if (PyFloat_Check(args[2])) {
787
- PyErr_SetString(PyExc_TypeError,
788
- "integer argument expected, got float" );
789
- goto exit;
790
- }
791
771
{
792
- long ival = PyLong_AsUnsignedLongMask(args[2]);
793
- if (ival == -1 && PyErr_Occurred()) {
772
+ unsigned long ival = PyLong_AsUnsignedLongMask(args[2]);
773
+ if (ival == (unsigned long) -1 && PyErr_Occurred()) {
794
774
goto exit;
795
775
}
796
776
else {
@@ -807,7 +787,7 @@ exit:
807
787
static PyObject *
808
788
test_unsigned_char_converter_impl(PyObject *module, unsigned char a,
809
789
unsigned char b, unsigned char c)
810
- /*[clinic end generated code: output=ebf905c5c9414762 input=021414060993e289]*/
790
+ /*[clinic end generated code: output=c0a6ab3144481466 input=021414060993e289]*/
811
791
812
792
813
793
/*[clinic input]
@@ -841,11 +821,6 @@ test_short_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
841
821
if (nargs < 1) {
842
822
goto skip_optional;
843
823
}
844
- if (PyFloat_Check(args[0])) {
845
- PyErr_SetString(PyExc_TypeError,
846
- "integer argument expected, got float" );
847
- goto exit;
848
- }
849
824
{
850
825
long ival = PyLong_AsLong(args[0]);
851
826
if (ival == -1 && PyErr_Occurred()) {
@@ -874,7 +849,7 @@ exit:
874
849
875
850
static PyObject *
876
851
test_short_converter_impl(PyObject *module, short a)
877
- /*[clinic end generated code: output=86fe1a1496a7ff20 input=6a8a7a509a498ff4]*/
852
+ /*[clinic end generated code: output=3ccda4bd08b6e4b4 input=6a8a7a509a498ff4]*/
878
853
879
854
880
855
/*[clinic input]
@@ -925,11 +900,6 @@ test_unsigned_short_converter(PyObject *module, PyObject *const *args, Py_ssize_
925
900
if (nargs < 3) {
926
901
goto skip_optional;
927
902
}
928
- if (PyFloat_Check(args[2])) {
929
- PyErr_SetString(PyExc_TypeError,
930
- "integer argument expected, got float" );
931
- goto exit;
932
- }
933
903
c = (unsigned short)PyLong_AsUnsignedLongMask(args[2]);
934
904
if (c == (unsigned short)-1 && PyErr_Occurred()) {
935
905
goto exit;
@@ -944,7 +914,7 @@ exit:
944
914
static PyObject *
945
915
test_unsigned_short_converter_impl(PyObject *module, unsigned short a,
946
916
unsigned short b, unsigned short c)
947
- /*[clinic end generated code: output=3779fe104319e3ae input=cdfd8eff3d9176b4]*/
917
+ /*[clinic end generated code: output=576b5ce48424f351 input=cdfd8eff3d9176b4]*/
948
918
949
919
950
920
/*[clinic input]
@@ -984,23 +954,13 @@ test_int_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
984
954
if (nargs < 1) {
985
955
goto skip_optional;
986
956
}
987
- if (PyFloat_Check(args[0])) {
988
- PyErr_SetString(PyExc_TypeError,
989
- "integer argument expected, got float" );
990
- goto exit;
991
- }
992
957
a = _PyLong_AsInt(args[0]);
993
958
if (a == -1 && PyErr_Occurred()) {
994
959
goto exit;
995
960
}
996
961
if (nargs < 2) {
997
962
goto skip_optional;
998
963
}
999
- if (PyFloat_Check(args[1])) {
1000
- PyErr_SetString(PyExc_TypeError,
1001
- "integer argument expected, got float" );
1002
- goto exit;
1003
- }
1004
964
b = _PyLong_AsInt(args[1]);
1005
965
if (b == -1 && PyErr_Occurred()) {
1006
966
goto exit;
@@ -1023,11 +983,6 @@ test_int_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1023
983
if (nargs < 4) {
1024
984
goto skip_optional;
1025
985
}
1026
- if (PyFloat_Check(args[3])) {
1027
- PyErr_SetString(PyExc_TypeError,
1028
- "integer argument expected, got float" );
1029
- goto exit;
1030
- }
1031
986
d = _PyLong_AsInt(args[3]);
1032
987
if (d == -1 && PyErr_Occurred()) {
1033
988
goto exit;
@@ -1041,7 +996,7 @@ exit:
1041
996
1042
997
static PyObject *
1043
998
test_int_converter_impl(PyObject *module, int a, int b, int c, myenum d)
1044
- /*[clinic end generated code: output=10a2e48a34af5d7a input=d20541fc1ca0553e]*/
999
+ /*[clinic end generated code: output=8a1a7b02ebe9eeac input=d20541fc1ca0553e]*/
1045
1000
1046
1001
1047
1002
/*[clinic input]
@@ -1092,11 +1047,6 @@ test_unsigned_int_converter(PyObject *module, PyObject *const *args, Py_ssize_t
1092
1047
if (nargs < 3) {
1093
1048
goto skip_optional;
1094
1049
}
1095
- if (PyFloat_Check(args[2])) {
1096
- PyErr_SetString(PyExc_TypeError,
1097
- "integer argument expected, got float" );
1098
- goto exit;
1099
- }
1100
1050
c = (unsigned int)PyLong_AsUnsignedLongMask(args[2]);
1101
1051
if (c == (unsigned int)-1 && PyErr_Occurred()) {
1102
1052
goto exit;
@@ -1111,7 +1061,7 @@ exit:
1111
1061
static PyObject *
1112
1062
test_unsigned_int_converter_impl(PyObject *module, unsigned int a,
1113
1063
unsigned int b, unsigned int c)
1114
- /*[clinic end generated code: output=189176ce67c7d2e7 input=5533534828b62fc0]*/
1064
+ /*[clinic end generated code: output=4f53904bfa1a0250 input=5533534828b62fc0]*/
1115
1065
1116
1066
1117
1067
/*[clinic input]
@@ -1145,11 +1095,6 @@ test_long_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
1145
1095
if (nargs < 1) {
1146
1096
goto skip_optional;
1147
1097
}
1148
- if (PyFloat_Check(args[0])) {
1149
- PyErr_SetString(PyExc_TypeError,
1150
- "integer argument expected, got float" );
1151
- goto exit;
1152
- }
1153
1098
a = PyLong_AsLong(args[0]);
1154
1099
if (a == -1 && PyErr_Occurred()) {
1155
1100
goto exit;
@@ -1163,7 +1108,7 @@ exit:
1163
1108
1164
1109
static PyObject *
1165
1110
test_long_converter_impl(PyObject *module, long a)
1166
- /*[clinic end generated code: output=44cd8823f59d116b input=d2179e3c9cdcde89]*/
1111
+ /*[clinic end generated code: output=e5e7883fddcf4218 input=d2179e3c9cdcde89]*/
1167
1112
1168
1113
1169
1114
/*[clinic input]
@@ -1263,11 +1208,6 @@ test_long_long_converter(PyObject *module, PyObject *const *args, Py_ssize_t nar
1263
1208
if (nargs < 1) {
1264
1209
goto skip_optional;
1265
1210
}
1266
- if (PyFloat_Check(args[0])) {
1267
- PyErr_SetString(PyExc_TypeError,
1268
- "integer argument expected, got float" );
1269
- goto exit;
1270
- }
1271
1211
a = PyLong_AsLongLong(args[0]);
1272
1212
if (a == -1 && PyErr_Occurred()) {
1273
1213
goto exit;
@@ -1281,7 +1221,7 @@ exit:
1281
1221
1282
1222
static PyObject *
1283
1223
test_long_long_converter_impl(PyObject *module, long long a)
1284
- /*[clinic end generated code: output=7143b585d7e433e8 input=d5fc81577ff4dd02]*/
1224
+ /*[clinic end generated code: output=0488ac9e8c1d77bb input=d5fc81577ff4dd02]*/
1285
1225
1286
1226
1287
1227
/*[clinic input]
@@ -1390,11 +1330,6 @@ test_Py_ssize_t_converter(PyObject *module, PyObject *const *args, Py_ssize_t na
1390
1330
if (nargs < 1) {
1391
1331
goto skip_optional;
1392
1332
}
1393
- if (PyFloat_Check(args[0])) {
1394
- PyErr_SetString(PyExc_TypeError,
1395
- "integer argument expected, got float" );
1396
- goto exit;
1397
- }
1398
1333
{
1399
1334
Py_ssize_t ival = -1;
1400
1335
PyObject *iobj = PyNumber_Index(args[0]);
@@ -1410,11 +1345,6 @@ test_Py_ssize_t_converter(PyObject *module, PyObject *const *args, Py_ssize_t na
1410
1345
if (nargs < 2) {
1411
1346
goto skip_optional;
1412
1347
}
1413
- if (PyFloat_Check(args[1])) {
1414
- PyErr_SetString(PyExc_TypeError,
1415
- "integer argument expected, got float" );
1416
- goto exit;
1417
- }
1418
1348
{
1419
1349
Py_ssize_t ival = -1;
1420
1350
PyObject *iobj = PyNumber_Index(args[1]);
@@ -1443,7 +1373,7 @@ exit:
1443
1373
static PyObject *
1444
1374
test_Py_ssize_t_converter_impl(PyObject *module, Py_ssize_t a, Py_ssize_t b,
1445
1375
Py_ssize_t c)
1446
- /*[clinic end generated code: output=a46d2aaf40c10398 input=3855f184bb3f299d]*/
1376
+ /*[clinic end generated code: output=ea781bb7169b3436 input=3855f184bb3f299d]*/
1447
1377
1448
1378
1449
1379
/*[clinic input]
0 commit comments