*include stdio.h in a couple files for MinGW GCC 4.4.0
[supertux.git] / src / lisp / lisp.cpp
index 39313d2..7f275d6 100644 (file)
@@ -21,6 +21,8 @@
 
 #include "lisp.hpp"
 
+#include <stdio.h>
+
 namespace lisp
 {
 
@@ -31,22 +33,17 @@ Lisp::Lisp(LispType newtype)
 
 Lisp::~Lisp()
 {
-  if(type == TYPE_SYMBOL || type == TYPE_STRING)
-    delete[] v.string;
-  if(type == TYPE_CONS) {
-    delete v.cons.cdr;
-    delete v.cons.car;
-  }
+  // resources should be on parser obstack, so no need to delete anything
 }
 
-Lisp*
+const Lisp*
 Lisp::get_lisp(const char* name) const
 {
   for(const Lisp* p = this; p != 0; p = p->get_cdr()) {
-    Lisp* child = p->get_car();
+    const Lisp* child = p->get_car();
     if(!child || child->get_type() != TYPE_CONS)
       continue;
-    Lisp* childname = child->get_car();
+    const Lisp* childname = child->get_car();
     if(!childname)
       continue;
     std::string childName;