Created
June 19, 2017 04:12
-
-
Save kungfooman/9099be87226a7ef7706e2f6470b7f468 to your computer and use it in GitHub Desktop.
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
type keyboard_s | |
forward::Int32 | |
backward::Int32 | |
left::Int32 | |
right::Int32 | |
jump::Int32 | |
end | |
address = ccall(:malloc, (Int64), (Int64, ), sizeof(keyboard_s)) | |
ptr = Ptr{keyboard_s}(address) | |
thekeyboard = unsafe_load(ptr) | |
thekeyboard.forward = 1 # this has no effect on the real memory address :( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment