Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
tracing might be disable, protecting lua bindings
authorschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 13 Dec 2010 16:45:37 +0000 (16:45 +0000)
committerschnorr <schnorr@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Mon, 13 Dec 2010 16:45:37 +0000 (16:45 +0000)
details:
- before this commit, if lua is on and tracing is off then compile error

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9222 48e7efb5-ca39-0410-a469-dd3cf9ba447f

src/bindings/lua/simgrid_lua.c

index 96b2747..744e24e 100644 (file)
@@ -412,25 +412,33 @@ static int gras_generate(lua_State * L)
  **********************************/
 static int trace_start(lua_State *L)
 {
+#ifdef HAVE_TRACING
   TRACE_start();
+#endif
   return 1;
 }
 
 static int trace_category(lua_State * L)
 {
+#ifdef HAVE_TRACING
   TRACE_category(luaL_checkstring(L, 1));
+#endif
   return 1;
 }
 
 static int trace_set_task_category(lua_State *L)
 {
+#ifdef HAVE_TRACING
   TRACE_msg_set_task_category(checkTask(L, -2), luaL_checkstring(L, -1));
+#endif
   return 1;
 }
 
 static int trace_end(lua_State *L)
 {
+#ifdef HAVE_TRACING
   TRACE_end();
+#endif
   return 1;
 }
 //***********Register Methods *******************************************//