Commits

Maciej Fijalkowski  committed 9bb6eb2

missing files

  • Participants
  • Parent commits 4a904f2

Comments (0)

Files changed (2)

File testing/snippets/basic_verify/setup.py

+
+from distutils.core import setup
+import snip_basic_verify
+
+setup(
+    packages=['snip_basic_verify'],
+    ext_modules=[snip_basic_verify.ffi.verifier.get_extension()])

File testing/snippets/basic_verify/snip_basic_verify/__init__.py

+
+from cffi import FFI
+
+ffi = FFI()
+ffi.cdef("""     // some declarations from the man page
+    struct passwd {
+        char *pw_name;
+        ...;
+    };
+    struct passwd *getpwuid(int uid);
+""")
+C = ffi.verify("""   // passed to the real C compiler
+#include <sys/types.h>
+#include <pwd.h>
+""", libraries=[])   # or a list of libraries to link with