-/* Copyright (c) 2010-2019. The SimGrid Team.
+/* Copyright (c) 2010-2020. The SimGrid Team.
* All rights reserved. */
/* This program is free software; you can redistribute it and/or modify it
*
* - Argument 1 (string): the text to print
*/
-static int debug(lua_State* L) {
-
+static int debug(lua_State* L)
+{
const char* str = luaL_checkstring(L, 1);
XBT_DEBUG("%s", str);
return 0;
lua_pushvalue(L, -2); /* table key val key */
- XBT_DEBUG("%s", sglua_keyvalue_tostring(L, -1, -2));
+ XBT_DEBUG("%s", sglua_keyvalue_tostring(L, -1, -2).c_str());
}
lua_settop(L, argc); // Remove everything except the initial arguments