-/* 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
#include "lua_private.hpp"
#include "lua_utils.hpp"
#include "src/surf/xml/platf.hpp"
-
+#include <lauxlib.h>
XBT_LOG_NEW_DEFAULT_CATEGORY(lua, "Lua Bindings");
-#include <lauxlib.h>
-
extern "C" int luaopen_simgrid(lua_State* L);
/* ********************************************************************************* */
*
* - 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;
*
* - Argument 1 (string): the text to print
*/
-static int info(lua_State* L) {
-
+static int info(lua_State* L)
+{
const char* str = luaL_checkstring(L, 1);
XBT_INFO("%s", str);
return 0;
}
-static int error(lua_State* L) {
-
+static int error(lua_State* L)
+{
const char* str = luaL_checkstring(L, 1);
XBT_ERROR("%s", str);
return 0;
}
-static int critical(lua_State* L) {
-
+static int critical(lua_State* L)
+{
const char* str = luaL_checkstring(L, 1);
XBT_CRITICAL("%s", str);
return 0;
* This function can be called from within lua via "simgrid.dump(table)". It will
* then dump the table via XBT_DEBUG
*/
-static int dump(lua_State* L) {
+static int dump(lua_State* L)
+{
int argc = lua_gettop(L);
for (int i = 1; i <= argc; i++) {