-
Notifications
You must be signed in to change notification settings - Fork 1
/
_DMDomain.c
121 lines (95 loc) · 3.39 KB
/
_DMDomain.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
/* This file was generated by PyBindGen 0.15.0 */
#define PY_SSIZE_T_CLEAN
#include <Python.h>
#include <stddef.h>
#if PY_VERSION_HEX < 0x020400F0
#define PyEval_ThreadsInitialized() 1
#define Py_CLEAR(op) \
do { \
if (op) { \
PyObject *tmp = (PyObject *)(op); \
(op) = NULL; \
Py_DECREF(tmp); \
} \
} while (0)
#define Py_VISIT(op) \
do { \
if (op) { \
int vret = visit((PyObject *)(op), arg); \
if (vret) \
return vret; \
} \
} while (0)
#endif
#if PY_VERSION_HEX < 0x020500F0
typedef int Py_ssize_t;
# define PY_SSIZE_T_MAX INT_MAX
# define PY_SSIZE_T_MIN INT_MIN
typedef inquiry lenfunc;
typedef intargfunc ssizeargfunc;
typedef intobjargproc ssizeobjargproc;
#endif
#if __GNUC__ > 2
# define PYBINDGEN_UNUSED(param) param __attribute__((__unused__))
#elif __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
# define PYBINDGEN_UNUSED(param) __attribute__((__unused__)) param
#else
# define PYBINDGEN_UNUSED(param) param
#endif /* !__GNUC__ */
typedef enum _PyBindGenWrapperFlags {
PYBINDGEN_WRAPPER_FLAG_NONE = 0,
PYBINDGEN_WRAPPER_FLAG_OBJECT_NOT_OWNED = (1<<0),
} PyBindGenWrapperFlags;
#include "DMDomain.h"
/* --- module functions --- */
PyObject *
_wrap__DMDomainValidateDomainString(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs)
{
PyObject *py_retval;
BYTE *DomainStr;
BYTE DomainType;
BYTE DomainLen;
const char *keywords[] = {"DomainStr", "DomainType", "DomainLen", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "scc", (char **) keywords, &DomainStr, &DomainType, &DomainLen)) {
return NULL;
}
ValidateDomainString(DomainStr, DomainType, DomainLen);
Py_INCREF(Py_None);
py_retval = Py_None;
return py_retval;
}
PyObject * _wrap__DMDomainValidateDomainString(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
PyObject *
_wrap__DMDomainDMDomainMatch(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs)
{
PyObject *py_retval;
BYTE retval;
BYTE *ControlStr;
BYTE *MatchStr;
BYTE ControlLen;
const char *keywords[] = {"ControlStr", "MatchStr", "ControlLen", NULL};
if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char *) "ssc", (char **) keywords, &ControlStr, &MatchStr, &ControlLen)) {
return NULL;
}
retval = DMDomainMatch(ControlStr, MatchStr, ControlLen);
py_retval = Py_BuildValue((char *) "c", (int) retval);
return py_retval;
}
PyObject * _wrap__DMDomainDMDomainMatch(PyObject * PYBINDGEN_UNUSED(dummy), PyObject *args, PyObject *kwargs);
static PyMethodDef _DMDomain_functions[] = {
{(char *) "ValidateDomainString", (PyCFunction) _wrap__DMDomainValidateDomainString, METH_KEYWORDS|METH_VARARGS, NULL },
{(char *) "DMDomainMatch", (PyCFunction) _wrap__DMDomainDMDomainMatch, METH_KEYWORDS|METH_VARARGS, NULL },
{NULL, NULL, 0, NULL}
};
PyMODINIT_FUNC
#if defined(__GNUC__) && __GNUC__ >= 4
__attribute__ ((visibility("default")))
#endif
init_DMDomain(void)
{
PyObject *m;
m = Py_InitModule3((char *) "_DMDomain", _DMDomain_functions, NULL);
if (m == NULL) {
return;
}
}