this repo has no description

Always initialize smalL_array in C-API trampolines

This should hopefully be elided by the compiler and not be a perf
regression.

authored by bernsteinbear.com and committed by

Max Bernstein 2b00ef4f b139686f

+3 -3
+3 -3
ext/Internal/capi-trampolines.cpp
··· 463 463 Object self(&scope, thread->stackPeek(nargs - 1)); 464 464 word num_positional = nargs - 1; 465 465 466 - PyObject* small_array[kMaxStackArguments]; 466 + PyObject* small_array[kMaxStackArguments] = {}; 467 467 PyObject** args; 468 468 if (num_positional <= kMaxStackArguments) { 469 469 args = small_array; ··· 505 505 Object self(&scope, thread->stackPeek(nargs)); 506 506 word num_positional = nargs - 1; 507 507 508 - PyObject* small_array[kMaxStackArguments]; 508 + PyObject* small_array[kMaxStackArguments] = {}; 509 509 PyObject** args; 510 510 if (num_positional <= kMaxStackArguments) { 511 511 args = small_array; ··· 556 556 Object self(&scope, args_tuple.at(0)); 557 557 word num_positional = args_length - 1; 558 558 559 - PyObject* small_array[kMaxStackArguments]; 559 + PyObject* small_array[kMaxStackArguments] = {}; 560 560 PyObject** args; 561 561 if (num_positional <= kMaxStackArguments) { 562 562 args = small_array;