File tree Expand file tree Collapse file tree 1 file changed +12
-8
lines changed
Modules/_ctypes/libffi_msvc Expand file tree Collapse file tree 1 file changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -220,14 +220,18 @@ ffi_call(/*@dependent@*/ ffi_cif *cif,
220220 break ;
221221#else
222222 case FFI_SYSV :
223- /* If a single argument takes more than 8 bytes,
224- then a copy is passed by reference. */
225- for (unsigned i = 0 ; i < cif -> nargs ; i ++ ) {
226- size_t z = cif -> arg_types [i ]-> size ;
227- if (z > 8 ) {
228- void * temp = alloca (z );
229- memcpy (temp , avalue [i ], z );
230- avalue [i ] = temp ;
223+ /* use a local scope for the 'i' variable */
224+ {
225+ unsigned i ;
226+ /* If a single argument takes more than 8 bytes,
227+ then a copy is passed by reference. */
228+ for (i = 0 ; i < cif -> nargs ; i ++ ) {
229+ size_t z = cif -> arg_types [i ]-> size ;
230+ if (z > 8 ) {
231+ void * temp = alloca (z );
232+ memcpy (temp , avalue [i ], z );
233+ avalue [i ] = temp ;
234+ }
231235 }
232236 }
233237 /*@-usedef@*/
You can’t perform that action at this time.
0 commit comments