spacepaste

  1.  
  2. >>> import cffi
  3. >>> ffi = cffi.FFI()
  4. >>> ffi.cdef("enum color {RED, GREEN, BLUE};")
  5. >>> lib = ffi.dlopen(None)
  6. >>> lib.RED
  7. 0
  8. >>> lib.GREEN
  9. 1
  10. >>>
  11.