Commit aa289a5
authored
PyEval_Call* APIs are not documented and they doesn't respect PY_SSIZE_T_CLEAN.
So add comment block which recommends PyObject_Call* APIs to ceval.h.
This commit also changes PyEval_CallMethod and PyEval_CallFunction
implementation same to PyObject_CallMethod and PyObject_CallFunction
to reduce future maintenance cost. Optimization to avoid temporary
tuple are copied too.
PyEval_CallFunction(callable, "i", (int)i) now calls callable(i) instead of
raising TypeError. But accepting this edge case is backward compatible.
1 parent 7e2a54c commit aa289a5
2 files changed
+30
-33
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
10 | 16 | | |
11 | 17 | | |
12 | 18 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
940 | 940 | | |
941 | 941 | | |
942 | 942 | | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
943 | 946 | | |
944 | 947 | | |
945 | 948 | | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
| 949 | + | |
| 950 | + | |
957 | 951 | | |
958 | | - | |
959 | | - | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
960 | 955 | | |
961 | | - | |
| 956 | + | |
962 | 957 | | |
963 | 958 | | |
964 | 959 | | |
| |||
1015 | 1010 | | |
1016 | 1011 | | |
1017 | 1012 | | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
1018 | 1016 | | |
1019 | 1017 | | |
1020 | 1018 | | |
1021 | | - | |
1022 | | - | |
1023 | | - | |
1024 | | - | |
1025 | | - | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
1029 | | - | |
1030 | | - | |
| 1019 | + | |
| 1020 | + | |
1031 | 1021 | | |
1032 | | - | |
1033 | | - | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
1034 | 1025 | | |
1035 | | - | |
1036 | | - | |
| 1026 | + | |
| 1027 | + | |
1037 | 1028 | | |
1038 | | - | |
1039 | 1029 | | |
1040 | | - | |
1041 | | - | |
1042 | | - | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
1043 | 1033 | | |
1044 | | - | |
| 1034 | + | |
| 1035 | + | |
1045 | 1036 | | |
1046 | 1037 | | |
1047 | 1038 | | |
| |||
0 commit comments