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

lisp: implement LispString::Create.

File:
1 edited

Legend:

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

    r486 r488  
    7575struct LispString : LispObject
    7676{
     77    static LispString *Create(char const *string);
     78    static LispString *Create(char const *string, int length);
     79    static LispString *Create(int length);
     80
     81    char *GetString();
     82
     83    char str[1];
    7784};
    7885
     
    153160void *lpointer_value(void *lpointer);
    154161int32_t lnumber_value(void *lnumber);
    155 char *lstring_value(void *lstring);
    156162unsigned short lcharacter_value(void *c);
    157163long lfixed_point_value(void *c);
     
    184190LispPointer *new_lisp_pointer(void *addr);
    185191LispChar *new_lisp_character(uint16_t ch);
    186 LispString *new_lisp_string(char const *string);
    187 LispString *new_lisp_string(char const *string, int length);
    188 LispString *new_lisp_string(int length);
    189192LispFixedPoint *new_lisp_fixed_point(int32_t x);
    190193LispObjectVar *new_lisp_object_var(int16_t number);
     
    230233// FIXME: get rid of this later
    231234static inline void *symbol_value(void *sym) { return ((LispSymbol *)sym)->GetValue(); }
    232 
    233 
    234 
    235 #endif
     235static inline char *lstring_value(void *str) { return ((LispString *)str)->GetString(); }
     236
     237
     238
     239#endif
Note: See TracChangeset for help on using the changeset viewer.