1
1
/* ----------------------------------------------------------------------------
2
2
* This file was automatically generated by SWIG (http://www.swig.org).
5
5
* This file is not intended to be easily readable and contains a number of
6
6
* coding conventions designed to improve portability and efficiency. Do not make
18
18
/* template workaround for compilers that cannot correctly implement the C++ standard */
19
19
#ifndef SWIGTEMPLATEDISAMBIGUATOR
20
# if defined(__SUNPRO_CC)
21
# if (__SUNPRO_CC <= 0x560)
22
# define SWIGTEMPLATEDISAMBIGUATOR template
24
# define SWIGTEMPLATEDISAMBIGUATOR
20
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
21
# define SWIGTEMPLATEDISAMBIGUATOR template
22
# elif defined(__HP_aCC)
23
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
24
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
25
# define SWIGTEMPLATEDISAMBIGUATOR template
27
# define SWIGTEMPLATEDISAMBIGUATOR
27
# define SWIGTEMPLATEDISAMBIGUATOR
107
113
# define _CRT_SECURE_NO_DEPRECATE
116
/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
117
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
118
# define _SCL_SECURE_NO_DEPRECATE
111
123
/* Python.h has to appear first */
112
124
#include <Python.h>
121
133
/* This should only be incremented when either the layout of swig_type_info changes,
122
134
or for whatever reason, the runtime changes incompatibly */
123
#define SWIG_RUNTIME_VERSION "3"
135
#define SWIG_RUNTIME_VERSION "4"
125
137
/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
126
138
#ifdef SWIG_TYPE_TABLE
156
168
/* Flags for pointer conversions */
157
169
#define SWIG_POINTER_DISOWN 0x1
170
#define SWIG_CAST_NEW_MEMORY 0x2
159
172
/* Flags for new pointer objects */
160
173
#define SWIG_POINTER_OWN 0x1
298
typedef void *(*swig_converter_func)(void *);
311
typedef void *(*swig_converter_func)(void *, int *);
299
312
typedef struct swig_type_info *(*swig_dycast_func)(void **);
301
/* Structure to store inforomation on one type */
314
/* Structure to store information on one type */
302
315
typedef struct swig_type_info {
303
316
const char *name; /* mangled name of this type */
304
317
const char *str; /* human readable name of this type */
425
438
Cast a pointer up an inheritance hierarchy
427
440
SWIGRUNTIMEINLINE void *
428
SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
429
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
441
SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
442
return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
1090
1103
/* Unpack the argument tuple */
1093
SWIG_Python_UnpackTuple(PyObject *args, const char *name, int min, int max, PyObject **objs)
1106
SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1096
1109
if (!min && !max) {
1099
1112
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1100
name, (min == max ? "" : "at least "), min);
1113
name, (min == max ? "" : "at least "), (int)min);
1105
1118
PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1108
register int l = PyTuple_GET_SIZE(args);
1121
register Py_ssize_t l = PyTuple_GET_SIZE(args);
1110
1123
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1111
name, (min == max ? "" : "at least "), min, l);
1124
name, (min == max ? "" : "at least "), (int)min, (int)l);
1113
1126
} else if (l > max) {
1114
1127
PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1115
name, (min == max ? "" : "at most "), max, l);
1128
name, (min == max ? "" : "at most "), (int)max, (int)l);
1118
1131
register int i;
1411
1424
PySwigObject *sobj = (PySwigObject *) v;
1412
1425
PyObject *next = sobj->next;
1426
if (sobj->own == SWIG_POINTER_OWN) {
1414
1427
swig_type_info *ty = sobj->ty;
1415
1428
PySwigClientData *data = ty ? (PySwigClientData *) ty->clientdata : 0;
1416
1429
PyObject *destroy = data ? data->destroy : 0;
1428
1441
res = ((*meth)(mself, v));
1430
1443
Py_XDECREF(res);
1445
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1432
1447
const char *name = SWIG_TypePrettyName(ty);
1433
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1434
printf("swig/python detected a memory leak of type '%s', no destructor found.\n", name);
1448
printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1438
1452
Py_XDECREF(next);
1439
1453
PyObject_DEL(v);
1591
1605
(unaryfunc)0, /*nb_float*/
1592
1606
(unaryfunc)PySwigObject_oct, /*nb_oct*/
1593
1607
(unaryfunc)PySwigObject_hex, /*nb_hex*/
1594
#if PY_VERSION_HEX >= 0x02020000
1595
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1596
#elif PY_VERSION_HEX >= 0x02000000
1608
#if PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
1609
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1610
#elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
1611
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1612
#elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
1597
1613
0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1971
1989
sobj = (PySwigObject *)sobj->next;
1973
if (ptr) *ptr = SWIG_TypeCast(tc,vptr);
1993
*ptr = SWIG_TypeCast(tc,vptr,&newmemory);
1994
if (newmemory == SWIG_CAST_NEW_MEMORY) {
1997
*own = *own | SWIG_CAST_NEW_MEMORY;
2047
2074
swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2048
if (!tc) return SWIG_ERROR;
2049
*ptr = SWIG_TypeCast(tc,vptr);
2077
*ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2078
assert(!newmemory); /* newmemory handling not yet implemented */
2576
2607
int alloc2 = 0 ;
2577
2608
PyObject * obj0 = 0 ;
2578
2609
PyObject * obj1 = 0 ;
2580
2612
if (!PyArg_ParseTuple(args,(char *)"OO:ecryptfs_passphrase_blob",&obj0,&obj1)) SWIG_fail;
2581
2613
res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
2590
2622
arg2 = (char *)(buf2);
2591
2623
result = ecryptfs_passphrase_blob(arg1,arg2);
2593
resultobj = PyString_FromStringAndSize((char *)(&result)->data,(&result)->size);
2625
resultobj = PyString_FromStringAndSize((&result)->data,(&result)->size);
2595
2627
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2596
2628
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2605
2637
SWIGINTERN PyObject *_wrap_ecryptfs_passphrase_sig_from_blob(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
2606
2638
PyObject *resultobj = 0;
2607
2639
char *arg1 = (char *) 0 ;
2610
2641
char *buf1 = 0 ;
2611
2642
int alloc1 = 0 ;
2612
2643
PyObject * obj0 = 0 ;
2614
2646
if (!PyArg_ParseTuple(args,(char *)"O:ecryptfs_passphrase_sig_from_blob",&obj0)) SWIG_fail;
2615
2647
res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
2619
2651
arg1 = (char *)(buf1);
2620
2652
result = ecryptfs_passphrase_sig_from_blob(arg1);
2622
resultobj = PyString_FromStringAndSize((char *)(&result)->data,(&result)->size);
2654
resultobj = PyString_FromStringAndSize((&result)->data,(&result)->size);
2624
2656
if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
2625
2657
return resultobj;
2633
2665
PyObject *resultobj = 0;
2634
2666
char *arg1 = (char *) 0 ;
2635
2667
char *arg2 = (char *) 0 ;
2674
PyObject * obj0 = 0 ;
2675
PyObject * obj1 = 0 ;
2643
PyObject * obj0 = 0 ;
2644
PyObject * obj1 = 0 ;
2646
2678
if (!PyArg_ParseTuple(args,(char *)"OO:ecryptfs_add_blob_to_keyring",&obj0,&obj1)) SWIG_fail;
2647
2679
res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
2792
2827
module_head->next = &swig_module;
2830
/* When multiple interpeters are used, a module could have already been initialized in
2831
a different interpreter, but not yet have a pointer in this interpreter.
2832
In this case, we do not want to continue adding types... everything should be
2834
if (init == 0) return;
2795
2836
/* Now work on filling in swig_module.types */
2796
2837
#ifdef SWIGRUNTIME_DEBUG
2797
2838
printf("SWIG_InitializeModule: size %d\n", swig_module.size);