-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test callbacks from a precompiled module
Issue #34
- Loading branch information
Showing
3 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
__precompile__() | ||
|
||
module TestModuleFunction | ||
|
||
export set_state1, get_state | ||
|
||
state = 0 | ||
|
||
function set_state1() | ||
global state | ||
state = 1 | ||
return | ||
end | ||
|
||
function set_state2() | ||
global state | ||
if(state == 1) | ||
state = 2 | ||
end | ||
return | ||
end | ||
|
||
function get_state() | ||
return state | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters