int LogBestBrain::setLogOnlyLast(lua_State* luaState) { bool onlyLast = luaL_checkbool(luaState, 1); setLogOnlyLast(onlyLast); return 0; }
/** * Create a new child object. Arguments: * 1 - callback function. * 2 - pid number (0 for any pid) * 3 - trace (either false - only activate the watcher when the process * terminates or true - additionally activate the watcher when the * process is stopped or continued). * * @see watcher_new() * * [+1, -0, ?] */ static int child_new(lua_State* L) { int pid = luaL_checkint(L, 2); int trace = luaL_checkbool(L, 3); ev_child* child; child = (ev_child*)watcher_new(L, sizeof(ev_child), CHILD_MT); ev_child_init(child, &child_cb, pid, trace); return 1; }
/// void SetOverlaysEnabled (bEnabled) // TODO ! tobool static int SetOverlaysEnabled (lua_State *L) { PROFILE checkudata_alive(L)->mpViewport->setOverlaysEnabled(luaL_checkbool(L,2)); return 0; }