File: load_module.h

package info (click to toggle)
python-pkcs11 0.9.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 932 kB
  • sloc: python: 4,067; ansic: 2,764; makefile: 24
file content (21 lines) | stat: -rw-r--r-- 421 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#define PY_SSIZE_T_CLEAN
#include <Python.h>

#ifdef _WIN32
#include "Windows.h"
typedef HINSTANCE LIB_HANDLE;
#else
#include <dlfcn.h>
typedef void *LIB_HANDLE;
#endif

#ifndef P11_HANDLE
typedef struct P11_HANDLE {
    LIB_HANDLE lib_handle;
    void * get_function_list_ptr;
} P11_HANDLE;
#endif

static PyObject* p11_error();
static P11_HANDLE* p11_open(PyObject *path_str);
static int p11_close(P11_HANDLE* handle);