Ignore:
Timestamp:
Apr 17, 2011, 10:28:16 AM (11 years ago)
Author:
Sam Hocevar
Message:

lisp: move all array-related functions to the LispArray? struct.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/lisp/lisp_gc.cpp

    r482 r483  
    8686static void *collect_array(void *x)
    8787{
    88   long s = ((LispArray *)x)->size;
    89   LispArray *a = new_lisp_1d_array(s, NULL);
    90   void **src, **dst;
    91   src = (void **)(((LispArray *)x)+1);
    92   dst = (void **)(a+1);
    93   for (int i = 0; i<s; i++)
    94     dst[i] = collect_object(src[i]);
    95 
    96   return a;
     88    long s = ((LispArray *)x)->size;
     89    LispArray *a = LispArray::Create(s, NULL);
     90    LispObject **src = ((LispArray *)x)->GetData();
     91    LispObject **dst = a->GetData();
     92    for (int i = 0; i < s; i++)
     93        dst[i] = (LispObject *)collect_object(src[i]);
     94
     95    return a;
    9796}
    9897
Note: See TracChangeset for help on using the changeset viewer.