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

lisp: populate LispSymbol? with symbol-related methods.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/dev.cpp

    r481 r484  
    4242char const *symbol_str(char const *name)
    4343{
    44   void *sym=make_find_symbol(name);
    45   if (symbol_value(sym) && item_type(symbol_value(sym))==L_STRING)
    46     return lstring_value(symbol_value(sym));
     44  LispSymbol *sym = LispSymbol::FindOrCreate(name);
     45  if (sym->GetValue() && item_type(sym->GetValue())==L_STRING)
     46    return lstring_value(sym->GetValue());
    4747
    4848
     
    6767
    6868  // check again to see if the symbol is there
    69   sym=make_find_symbol(name);
    70   if (symbol_value(sym) && item_type(symbol_value(sym))==L_STRING)
    71     return lstring_value(symbol_value(sym));
     69  sym = LispSymbol::FindOrCreate(name);
     70  if (sym->GetValue() && item_type(sym->GetValue())==L_STRING)
     71    return lstring_value(sym->GetValue());
    7272
    7373
    7474  // check to see if there is a missing symbol definition
    75   sym=make_find_symbol("missing_sym");
    76   if (symbol_value(sym) && item_type(symbol_value(sym))==L_STRING)
    77     return lstring_value(symbol_value(sym));
     75  sym = LispSymbol::FindOrCreate("missing_sym");
     76  if (sym->GetValue() && item_type(sym->GetValue())==L_STRING)
     77    return lstring_value(sym->GetValue());
    7878
    7979  // last resort, return english string
Note: See TracChangeset for help on using the changeset viewer.