Last active
August 29, 2015 14:23
-
-
Save hosackm/c17b1bfa6a5e67fb2d7f to your computer and use it in GitHub Desktop.
CFFI Intro Blog snippet 1
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
from cffi import FFI | |
ffi = FFI() | |
ffi.cdef(''' | |
typedef struct | |
{ | |
int x; | |
int y; | |
} point''') | |
p = ffi.new('point *') | |
p[0].x = 42 | |
p[0].y = 23 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment