mail[Wesnoth-commits] r44913 - in /trunk/src/lua: ldebug.c ldebug.h luaconf.h lvm.c print.c


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by guillaume . melquiond on July 30, 2010 - 10:03:
Author: silene
Date: Fri Jul 30 10:03:01 2010
New Revision: 44913

URL: http://svn.gna.org/viewcvs/wesnoth?rev=44913&view=rev
Log:
Forced C++ compilation.
Fixed conflicts on getline.

Modified:
    trunk/src/lua/ldebug.c
    trunk/src/lua/ldebug.h
    trunk/src/lua/luaconf.h
    trunk/src/lua/lvm.c
    trunk/src/lua/print.c

Modified: trunk/src/lua/ldebug.c
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/lua/ldebug.c?rev=44913&r1=44912&r2=44913&view=diff
==============================================================================
--- trunk/src/lua/ldebug.c (original)
+++ trunk/src/lua/ldebug.c Fri Jul 30 10:03:01 2010
@@ -46,7 +46,7 @@
   if (pc < 0)
     return -1;  /* only active lua functions have current-line information */
   else
-    return getline(ci_func(ci)->l.p, pc);
+    return lua_getline(ci_func(ci)->l.p, pc);
 }
 
 

Modified: trunk/src/lua/ldebug.h
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/lua/ldebug.h?rev=44913&r1=44912&r2=44913&view=diff
==============================================================================
--- trunk/src/lua/ldebug.h (original)
+++ trunk/src/lua/ldebug.h Fri Jul 30 10:03:01 2010
@@ -13,7 +13,7 @@
 
 #define pcRel(pc, p)   (cast(int, (pc) - (p)->code) - 1)
 
-#define getline(f,pc)  (((f)->lineinfo) ? (f)->lineinfo[pc] : 0)
+#define lua_getline(f,pc)      (((f)->lineinfo) ? (f)->lineinfo[pc] : 0)
 
 #define resethookcount(L)      (L->hookcount = L->basehookcount)
 

Modified: trunk/src/lua/luaconf.h
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/lua/luaconf.h?rev=44913&r1=44912&r2=44913&view=diff
==============================================================================
--- trunk/src/lua/luaconf.h (original)
+++ trunk/src/lua/luaconf.h Fri Jul 30 10:03:01 2010
@@ -11,6 +11,9 @@
 #include <limits.h>
 #include <stddef.h>
 
+#if !defined(__cplusplus)
+#error "Exception support requires a C++ compiler."
+#endif
 
 /*
 ** ==================================================================

Modified: trunk/src/lua/lvm.c
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/lua/lvm.c?rev=44913&r1=44912&r2=44913&view=diff
==============================================================================
--- trunk/src/lua/lvm.c (original)
+++ trunk/src/lua/lvm.c Fri Jul 30 10:03:01 2010
@@ -68,10 +68,10 @@
   if (mask & LUA_MASKLINE) {
     Proto *p = ci_func(L->ci)->l.p;
     int npc = pcRel(pc, p);
-    int newline = getline(p, npc);
+    int newline = lua_getline(p, npc);
     /* call linehook when enter a new function, when jump back (loop),
        or when enter a new line */
-    if (npc == 0 || pc <= oldpc || newline != getline(p, pcRel(oldpc, p)))
+    if (npc == 0 || pc <= oldpc || newline != lua_getline(p, pcRel(oldpc, 
p)))
       luaD_callhook(L, LUA_HOOKLINE, newline);
   }
 }

Modified: trunk/src/lua/print.c
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/lua/print.c?rev=44913&r1=44912&r2=44913&view=diff
==============================================================================
--- trunk/src/lua/print.c (original)
+++ trunk/src/lua/print.c Fri Jul 30 10:03:01 2010
@@ -84,7 +84,7 @@
   int c=GETARG_C(i);
   int bx=GETARG_Bx(i);
   int sbx=GETARG_sBx(i);
-  int line=getline(f,pc);
+  int line=lua_getline(f,pc);
   printf("\t%d\t",pc+1);
   if (line>0) printf("[%d]\t",line); else printf("[-]\t");
   printf("%-9s\t",luaP_opnames[o]);




Related Messages


Powered by MHonArc, Updated Fri Jul 30 10:20:15 2010