* notify lvm to stop running the lua stack */
| 1258 | * notify lvm to stop running the lua stack |
| 1259 | */ |
| 1260 | void notify_lua_state_stop(lua_State *L) { |
| 1261 | int *pointer = get_lua_state_value(L, LUA_STATE_STOP_TO_RUN_IN_LVM_STATE_MAP_KEY).int_pointer_value; |
| 1262 | |
| 1263 | if (nullptr == pointer) { |
| 1264 | pointer = (int*)lua_malloc(L, sizeof(int)); |
| 1265 | *pointer = 1; |
| 1266 | GluaStateValue value; |
| 1267 | value.int_pointer_value = pointer; |
| 1268 | set_lua_state_value(L, LUA_STATE_STOP_TO_RUN_IN_LVM_STATE_MAP_KEY, value, LUA_STATE_VALUE_INT_POINTER); |
| 1269 | |
| 1270 | } else { |
| 1271 | *pointer = 1; |
| 1272 | } |
| 1273 | } |
| 1274 | |
| 1275 | /** |
| 1276 | * check whether the lua state notified stop before |
no test coverage detected