Skip to content

Instantly share code, notes, and snippets.

@hosackm
Last active August 29, 2015 14:23
Show Gist options
  • Save hosackm/c17b1bfa6a5e67fb2d7f to your computer and use it in GitHub Desktop.
Save hosackm/c17b1bfa6a5e67fb2d7f to your computer and use it in GitHub Desktop.
CFFI Intro Blog snippet 1
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