diff options
| author | Fuwn <[email protected]> | 2022-03-13 16:37:20 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-03-13 16:37:20 -0700 |
| commit | 69e7feefacff213c490b4c5575d4846ad9937e27 (patch) | |
| tree | 80b56931ffe8402af50fad89bcf9744c29c582e5 /examples | |
| parent | chore(meta): more meta fix (diff) | |
| download | archived-senpy-ffi-69e7feefacff213c490b4c5575d4846ad9937e27.tar.xz archived-senpy-ffi-69e7feefacff213c490b4c5575d4846ad9937e27.zip | |
refactor(examples): python cdef struct
Diffstat (limited to 'examples')
| -rw-r--r-- | examples/ffi.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/ffi.py b/examples/ffi.py index 19cc1ac..1b2b798 100644 --- a/examples/ffi.py +++ b/examples/ffi.py @@ -7,16 +7,16 @@ extension: str = {"darwin": ".dylib", "win32": ".dll"}.get(sys.platform, ".so") ffi = FFI() ffi.cdef( """ - typedef struct { char *language; char *image; } random_t; + struct Random { char *language; char *image; }; char **language(const char *); char **languages(void); - random_t *random_new(void); - void random_populate(random_t *); - void random_free(random_t *); - char *random_get(const random_t *, const char *); + struct Random *random_new(void); + void random_populate(struct Random *); + void random_free(struct Random *); + char *random_get(const struct Random *, const char *); int status(void); """ |