Created
March 15, 2020 10:50
-
-
Save laixintao/7f37c5ee0ae663f9e54c1efd5cbe1bdc 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
import ctypes | |
def deref(addr, typ): | |
return ctypes.cast(addr, ctypes.POINTER(typ)) | |
deref(id(3), ctypes.c_int)[6] = 2 |
Author
laixintao
commented
Mar 15, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment