sodium_grabber.c 493 B

12345678910111213141516
  1. #include <Python.h>
  2. #include <sodium.h>
  3. static PyObject* grabber_init(PyObject* self, PyObject* args) {
  4. return Py_BuildValue("i", sodium_init());
  5. }
  6. PyMethodDef methods[] = {
  7. {"init", grabber_init, METH_VARARGS},
  8. {NULL, NULL},
  9. };
  10. void initsodium_grabber()
  11. {
  12. (void)Py_InitModule("sodium_grabber", methods);
  13. }