Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

More places to use variable arrays

  • Loading branch information...
commit 75596a4497731b1d51c3254b3d9bf94c5cc317e7 1 parent 388265a
Dirkjan Bussink dbussink authored

Showing 1 changed file with 3 additions and 3 deletions. Show diff stats Hide diff stats

  1. +3 3 vm/builtin/nativefunction.cpp
6 vm/builtin/nativefunction.cpp
@@ -744,8 +744,8 @@ namespace rubinius {
744 744 // Because we call back into ruby to do conversions.
745 745 RootBuffer vrf(state->vm()->root_buffers(), args.arguments(), args.total());
746 746
747   - void** values = ALLOCA_N(void*, ffi_data->arg_count);
748   - void** heap_allocations = ALLOCA_N(void*, ffi_data->arg_count);
  747 + void* values[ffi_data->arg_count];
  748 + void* heap_allocations[ffi_data->arg_count];
749 749 size_t i;
750 750
751 751 for(i = 0; i < ffi_data->arg_count; i++) {
@@ -904,7 +904,7 @@ namespace rubinius {
904 904 int size;
905 905 size = so->byte_size();
906 906
907   - char* data = ALLOCA_N(char, size + 1);
  907 + char data[size + 1];
908 908 memcpy(data, so->byte_address(), size);
909 909 data[size] = 0;
910 910 *tmp = data;

0 comments on commit 75596a4

Please sign in to comment.
Something went wrong with that request. Please try again.