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

lisp: implement LispList::GetLength?.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/lisp/lisp.h

    r489 r490  
    1111#define __LISP_HPP_
    1212
     13#include <cstdlib>
    1314#include <stdint.h>
    1415
     
    5657struct LispList : LispObject
    5758{
    58     void *cdr, *car;
     59    size_t GetLength();
     60
     61    LispObject *cdr, *car;
    5962};
    6063
     
    150153};
    151154
    152 static inline void *&CAR(void *x) { return ((LispList *)x)->car; }
    153 static inline void *&CDR(void *x) { return ((LispList *)x)->cdr; }
     155static inline LispObject *&CAR(void *x) { return ((LispList *)x)->car; }
     156static inline LispObject *&CDR(void *x) { return ((LispList *)x)->cdr; }
    154157static inline ltype item_type(void *x) { if (x) return *(ltype *)x; return L_CONS_CELL; }
    155158
     
    166169void *lisp_eq(void *n1, void *n2);
    167170void *lisp_equal(void *n1, void *n2);
    168 long list_length(void *i);
    169171void lprint(void *i);
    170172void *eval(void *prog);
Note: See TracChangeset for help on using the changeset viewer.