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

lisp: make all lisp object inherit a common type.

File:
1 edited

Legend:

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

    r129 r482  
    1010#include "config.h"
    1111
    12 lisp_symbol *find_symbol(char *name)
     12LispSymbol *find_symbol(char *name)
    1313{
    14   lisp_symbol *p=lsym_root;
     14  LispSymbol *p=lsym_root;
    1515  while (p)
    1616  {
    17     int cmp=strcmp(name,((char *)((lisp_symbol *)cs->car)->name)+sizeof(lisp_string));
     17    int cmp=strcmp(name,((char *)((LispSymbol *)cs->car)->name)+sizeof(LispString));
    1818    if (cmp==0) return p;
    1919    else if (cmp<0) p=p->left;
     
    2525
    2626
    27 lisp_symbol *make_find_symbol(char *name)
     27LispSymbol *make_find_symbol(char *name)
    2828{
    29   lisp_symbol *p=lsym_root;
    30   lisp_symbol **parent=&lsym_root;
     29  LispSymbol *p=lsym_root;
     30  LispSymbol **parent=&lsym_root;
    3131  while (p)
    3232  {
    33     int cmp=strcmp(name,((char *)((lisp_symbol *)cs->car)->name)+sizeof(lisp_string));
     33    int cmp=strcmp(name,((char *)((LispSymbol *)cs->car)->name)+sizeof(LispString));
    3434    if (cmp==0) return p;
    3535    else if (cmp<0)
     
    4545  }
    4646
    47   p=malloc(sizeof(lisp_symbol));
     47  p=malloc(sizeof(LispSymbol));
    4848  p->type=L_SYMBOL;
    4949  p->name=new_lisp_string(name);
Note: See TracChangeset for help on using the changeset viewer.