8000 gh-133395: add option for extension modules to specialize BINARY_OP/SUBSCR, apply to arrays by iritkatriel · Pull Request #133396 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-133395: add option for extension modules to specialize BINARY_OP/SUBSCR, apply to arrays #133396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
May 5, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
use Py_ARRAY_LENGTH
  • Loading branch information
iritkatriel committed May 5, 2025
commit b15ad6111b4d387bd63291929a7307ae3d516307
2 changes: 1 addition & 1 deletion Python/specialize.c
Original file line number Diff line number Diff line change
Expand Up @@ -2561,7 +2561,7 @@ binary_op_extended_specialization(PyObject *lhs, PyObject *rhs, int oparg,
_PyBinaryOpSpecializationDescr **descr)
{
typedef _PyBinaryOpSpecializationDescr descr_type;
size_t size = sizeof(binaryop_extend_builtins)/sizeof(descr_type);
size_t size = Py_ARRAY_LENGTH(binaryop_extend_builtins);
for (size_t i = 0; i < size; i++) {
descr_type *d = (descr_type *)&binaryop_extend_builtins[i];
assert(d != NULL);
Expand Down
0