*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
/*
* This file contains functions that aid users to debug their lua scripts; for instance,
* tables can be easily output and values are represented in a human-readable way. (For instance,
/*
* This file contains functions that aid users to debug their lua scripts; for instance,
* tables can be easily output and values are represented in a human-readable way. (For instance,
snprintf(buff, 64, "%.3f", lua_tonumber(L, index));
break;
snprintf(buff, 64, "%.3f", lua_tonumber(L, index));
break;
//gets the next pair from the table
while (lua_next(L, -1)) { /* table key val */
// we need to copy here, as a cast from "Number" to "String"
//gets the next pair from the table
while (lua_next(L, -1)) { /* table key val */
// we need to copy here, as a cast from "Number" to "String"
XBT_DEBUG("Checking the task's metatable: expected %p, found %p", correct_mt, actual_mt);
sglua_stack_dump(L, "my_checkudata: ");
XBT_DEBUG("Checking the task's metatable: expected %p, found %p", correct_mt, actual_mt);
sglua_stack_dump(L, "my_checkudata: ");
- if (p == nullptr || !lua_getmetatable(L, ud) || !lua_rawequal(L, -1, -2))
+ if (p == nullptr || not lua_getmetatable(L, ud) || not lua_rawequal(L, -1, -2))