File: empty.py

package info (click to toggle)
python-cffi 2.0.0~b1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,796 kB
  • sloc: python: 28,456; ansic: 15,272; asm: 116; makefile: 97; sh: 14
file content (17 lines) | stat: -rw-r--r-- 317 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import cffi

ffi = cffi.FFI()

ffi.embedding_api("")

ffi.set_source("_empty_cffi", """
void initialize_my_empty_cffi(void) {
    if (cffi_start_python() != 0) {
        printf("oops, cffi_start_python() returned non-0\\n");
        abort();
    }
}
""")

fn = ffi.compile(verbose=True)
print('FILENAME: %s' % (fn,))