]> git.mxchange.org Git - simgear.git/commitdiff
Nasal is C code, not C++
authorFrederic Bouvier <fredfgfs01@free.fr>
Sat, 28 Apr 2012 22:17:38 +0000 (00:17 +0200)
committerFrederic Bouvier <fredfgfs01@free.fr>
Sat, 28 Apr 2012 22:17:38 +0000 (00:17 +0200)
simgear/nasal/misc.c

index 1c3a6195564d50eafd86c5ce5df49173123846bc..dae0bfe48feae8fe8ea1379677f87a591b9d4da3 100644 (file)
@@ -121,11 +121,12 @@ naRef naNewFunc(struct Context* c, naRef code)
 
 naRef naNewGhost(naContext c, naGhostType* type, void* ptr)
 {
+    naRef ghost;
     // ensure 'simple' ghost users don't see garbage for these fields
     type->get_member = 0;
     type->set_member = 0;
     
-    naRef ghost = naNew(c, T_GHOST);
+    ghost = naNew(c, T_GHOST);
     PTR(ghost).ghost->gtype = type;
     PTR(ghost).ghost->ptr = ptr;
     return ghost;