mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
CHM Input: Fix a regression in the previous release that broke processing of CHM files. Fixes #1796889 [Converting CHM to X (epub or pdf) no longer working. Input Error in chm.py?](https://bugs.launchpad.net/calibre/+bug/1796889)
This commit is contained in:
parent
42ba64953d
commit
d517a8eb4f
@ -1,11 +1,11 @@
|
||||
/* ----------------------------------------------------------------------------
|
||||
* This file was automatically generated by SWIG (http://www.swig.org).
|
||||
* Version 1.3.18
|
||||
*
|
||||
* This file is not intended to be easily readable and contains a number of
|
||||
*
|
||||
* This file is not intended to be easily readable and contains a number of
|
||||
* coding conventions designed to improve portability and efficiency. Do not make
|
||||
* changes to this file unless you know what you are doing--modify the SWIG
|
||||
* interface file instead.
|
||||
* changes to this file unless you know what you are doing--modify the SWIG
|
||||
* interface file instead.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
#define SWIGPYTHON
|
||||
@ -22,7 +22,7 @@
|
||||
* Author : David Beazley (beazley@cs.uchicago.edu)
|
||||
*
|
||||
* Copyright (c) 1999-2000, The University of Chicago
|
||||
*
|
||||
*
|
||||
* This file may be freely redistributed without license or fee provided
|
||||
* this copyright message remains intact.
|
||||
************************************************************************/
|
||||
@ -66,10 +66,10 @@ typedef void *(*swig_converter_func)(void *);
|
||||
typedef struct swig_type_info *(*swig_dycast_func)(void **);
|
||||
|
||||
typedef struct swig_type_info {
|
||||
const char *name;
|
||||
const char *name;
|
||||
swig_converter_func converter;
|
||||
const char *str;
|
||||
void *clientdata;
|
||||
void *clientdata;
|
||||
swig_dycast_func dcast;
|
||||
struct swig_type_info *next;
|
||||
struct swig_type_info *prev;
|
||||
@ -99,7 +99,7 @@ SWIG_TypeRegister(swig_type_info *ti)
|
||||
while (tc) {
|
||||
if (strcmp(tc->name, ti->name) == 0) {
|
||||
/* Already exists in the table. Just add additional types to the list */
|
||||
if (tc->clientdata) ti->clientdata = tc->clientdata;
|
||||
if (tc->clientdata) ti->clientdata = tc->clientdata;
|
||||
head = tc;
|
||||
next = tc->next;
|
||||
goto l1;
|
||||
@ -130,7 +130,7 @@ SWIG_TypeRegister(swig_type_info *ti)
|
||||
}
|
||||
|
||||
/* Check the typename */
|
||||
SWIGRUNTIME(swig_type_info *)
|
||||
SWIGRUNTIME(swig_type_info *)
|
||||
SWIG_TypeCheck(char *c, swig_type_info *ty)
|
||||
{
|
||||
swig_type_info *s;
|
||||
@ -157,8 +157,8 @@ SWIG_TypeCheck(char *c, swig_type_info *ty)
|
||||
}
|
||||
|
||||
/* Cast a pointer up an inheritance hierarchy */
|
||||
SWIGRUNTIME(void *)
|
||||
SWIG_TypeCast(swig_type_info *ty, void *ptr)
|
||||
SWIGRUNTIME(void *)
|
||||
SWIG_TypeCast(swig_type_info *ty, void *ptr)
|
||||
{
|
||||
if ((!ty) || (!ty->converter)) return ptr;
|
||||
return (*ty->converter)(ptr);
|
||||
@ -248,7 +248,7 @@ SWIGEXPORT(void) SWIG_InstallConstants(PyObject *d, swig_const_info
|
||||
* global variable support code.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
typedef struct swig_globalvar {
|
||||
typedef struct swig_globalvar {
|
||||
char *name; /* Name of global variable */
|
||||
PyObject *(*get_attr)(void); /* Return the current value */
|
||||
int (*set_attr)(PyObject *); /* Set the value */
|
||||
@ -306,17 +306,17 @@ swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
|
||||
}
|
||||
|
||||
statichere PyTypeObject varlinktype = {
|
||||
PyObject_HEAD_INIT(0)
|
||||
PyObject_HEAD_INIT(0)
|
||||
0,
|
||||
(char *)"swigvarlink", /* Type name */
|
||||
sizeof(swig_varlinkobject), /* Basic size */
|
||||
0, /* Itemsize */
|
||||
0, /* Deallocator */
|
||||
0, /* Deallocator */
|
||||
(printfunc) swig_varlink_print, /* Print */
|
||||
(getattrfunc) swig_varlink_getattr, /* get attr */
|
||||
(setattrfunc) swig_varlink_setattr, /* Set attr */
|
||||
0, /* tp_compare */
|
||||
(reprfunc) swig_varlink_repr, /* tp_repr */
|
||||
(reprfunc) swig_varlink_repr, /* tp_repr */
|
||||
0, /* tp_as_number */
|
||||
0, /* tp_as_mapping*/
|
||||
0, /* tp_hash */
|
||||
@ -376,7 +376,7 @@ SWIG_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {
|
||||
Py_DECREF(obj);
|
||||
goto type_error;
|
||||
}
|
||||
}
|
||||
}
|
||||
*ptr = PyCObject_AsVoidPtr(obj);
|
||||
c = (char *) PyCObject_GetDesc(obj);
|
||||
if (newref) Py_DECREF(obj);
|
||||
@ -393,7 +393,7 @@ SWIG_ConvertPtr(PyObject *obj, void **ptr, swig_type_info *ty, int flags) {
|
||||
Py_DECREF(obj);
|
||||
goto type_error;
|
||||
}
|
||||
}
|
||||
}
|
||||
c = PyString_AsString(obj);
|
||||
/* Pointer values must start with leading underscore */
|
||||
if (*c != '_') {
|
||||
@ -540,11 +540,11 @@ SWIG_InstallConstants(PyObject *d, swig_const_info constants[]) {
|
||||
|
||||
/* -------- TYPES TABLE (BEGIN) -------- */
|
||||
|
||||
#define SWIGTYPE_p_chmUnitInfo swig_types[0]
|
||||
#define SWIGTYPE_p_unsigned_char swig_types[1]
|
||||
#define SWIGTYPE_p_char swig_types[2]
|
||||
#define SWIGTYPE_CHM_ENUMERATOR swig_types[3]
|
||||
#define SWIGTYPE_p_chmFile swig_types[4]
|
||||
#define SWIGTYPE_p_chmUnitInfo swig_types[0]
|
||||
#define SWIGTYPE_p_unsigned_char swig_types[1]
|
||||
#define SWIGTYPE_p_char swig_types[2]
|
||||
#define SWIGTYPE_CHM_ENUMERATOR swig_types[3]
|
||||
#define SWIGTYPE_p_chmFile swig_types[4]
|
||||
static swig_type_info *swig_types[6];
|
||||
|
||||
/* -------- TYPES TABLE (END) -------- */
|
||||
@ -595,8 +595,8 @@ my_set_callback(PyObject *dummy, PyObject *arg)
|
||||
return result;
|
||||
}
|
||||
|
||||
int dummy_enumerator (struct chmFile *h,
|
||||
struct chmUnitInfo *ui,
|
||||
int dummy_enumerator (struct chmFile *h,
|
||||
struct chmUnitInfo *ui,
|
||||
void *context) {
|
||||
PyObject *arglist;
|
||||
PyObject *result;
|
||||
@ -614,10 +614,10 @@ int dummy_enumerator (struct chmFile *h,
|
||||
result = PyEval_CallObject(my_callback, arglist);
|
||||
Py_DECREF(arglist);
|
||||
Py_DECREF(result);
|
||||
|
||||
|
||||
Py_DECREF(py_h);
|
||||
Py_DECREF(py_ui);
|
||||
|
||||
|
||||
if (result == NULL) {
|
||||
return 0; /* Pass error back */
|
||||
} else {
|
||||
@ -632,23 +632,23 @@ static PyObject* t_output_helper(PyObject* target, PyObject* o) {
|
||||
PyObject* o2;
|
||||
PyObject* o3;
|
||||
|
||||
if (!target) {
|
||||
if (!target) {
|
||||
target = o;
|
||||
} else if (target == Py_None) {
|
||||
} else if (target == Py_None) {
|
||||
Py_DECREF(Py_None);
|
||||
target = o;
|
||||
} else {
|
||||
} else {
|
||||
if (!PyTuple_Check(target)) {
|
||||
o2 = target;
|
||||
target = PyTuple_New(1);
|
||||
PyTuple_SetItem(target, 0, o2);
|
||||
}
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
o3 = PyTuple_New(1);
|
||||
PyTuple_SetItem(o3, 0, o);
|
||||
|
||||
o2 = target;
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
target = PySequence_Concat(o2, o3);
|
||||
Py_DECREF(o2);
|
||||
Py_DECREF(o3);
|
||||
}
|
||||
return target;
|
||||
@ -660,16 +660,13 @@ extern "C" {
|
||||
static PyObject *_wrap_chmUnitInfo_start_set(PyObject *self, PyObject *args) {
|
||||
PyObject *resultobj;
|
||||
struct chmUnitInfo *arg1 = (struct chmUnitInfo *) 0 ;
|
||||
LONGUINT64 arg2 ;
|
||||
unsigned long long arg2 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)"OO:chmUnitInfo_start_set",&obj0,&obj1)) goto fail;
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)"OK:chmUnitInfo_start_set",&obj0,&arg2)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_chmUnitInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
arg2 = (LONGUINT64) PyLong_AsUnsignedLongLong(obj1);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
if (arg1) (arg1)->start = arg2;
|
||||
|
||||
|
||||
Py_INCREF(Py_None); resultobj = Py_None;
|
||||
return resultobj;
|
||||
fail:
|
||||
@ -682,11 +679,11 @@ static PyObject *_wrap_chmUnitInfo_start_get(PyObject *self, PyObject *args) {
|
||||
struct chmUnitInfo *arg1 = (struct chmUnitInfo *) 0 ;
|
||||
LONGUINT64 result;
|
||||
PyObject * obj0 = 0 ;
|
||||
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)"O:chmUnitInfo_start_get",&obj0)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_chmUnitInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
result = (LONGUINT64) ((arg1)->start);
|
||||
|
||||
|
||||
resultobj = PyLong_FromUnsignedLongLong(result);
|
||||
return resultobj;
|
||||
fail:
|
||||
@ -697,16 +694,13 @@ static PyObject *_wrap_chmUnitInfo_start_get(PyObject *self, PyObject *args) {
|
||||
static PyObject *_wrap_chmUnitInfo_length_set(PyObject *self, PyObject *args) {
|
||||
PyObject *resultobj;
|
||||
struct chmUnitInfo *arg1 = (struct chmUnitInfo *) 0 ;
|
||||
LONGUINT64 arg2 ;
|
||||
unsigned long long arg2 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)"OO:chmUnitInfo_length_set",&obj0,&obj1)) goto fail;
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)"OO:chmUnitInfo_length_set",&obj0,&arg2)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_chmUnitInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
arg2 = (LONGUINT64) PyLong_AsUnsignedLongLong(obj1);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
if (arg1) (arg1)->length = arg2;
|
||||
|
||||
|
||||
Py_INCREF(Py_None); resultobj = Py_None;
|
||||
return resultobj;
|
||||
fail:
|
||||
@ -719,11 +713,11 @@ static PyObject *_wrap_chmUnitInfo_length_get(PyObject *self, PyObject *args) {
|
||||
struct chmUnitInfo *arg1 = (struct chmUnitInfo *) 0 ;
|
||||
LONGUINT64 result;
|
||||
PyObject * obj0 = 0 ;
|
||||
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)"O:chmUnitInfo_length_get",&obj0)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_chmUnitInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
result = (LONGUINT64) ((arg1)->length);
|
||||
|
||||
|
||||
resultobj = PyLong_FromUnsignedLongLong(result);
|
||||
return resultobj;
|
||||
fail:
|
||||
@ -736,11 +730,11 @@ static PyObject *_wrap_chmUnitInfo_space_set(PyObject *self, PyObject *args) {
|
||||
struct chmUnitInfo *arg1 = (struct chmUnitInfo *) 0 ;
|
||||
int arg2 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)"Oi:chmUnitInfo_space_set",&obj0,&arg2)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_chmUnitInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
if (arg1) (arg1)->space = arg2;
|
||||
|
||||
|
||||
Py_INCREF(Py_None); resultobj = Py_None;
|
||||
return resultobj;
|
||||
fail:
|
||||
@ -753,11 +747,11 @@ static PyObject *_wrap_chmUnitInfo_space_get(PyObject *self, PyObject *args) {
|
||||
struct chmUnitInfo *arg1 = (struct chmUnitInfo *) 0 ;
|
||||
int result;
|
||||
PyObject * obj0 = 0 ;
|
||||
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)"O:chmUnitInfo_space_get",&obj0)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_chmUnitInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
result = (int) ((arg1)->space);
|
||||
|
||||
|
||||
resultobj = PyInt_FromLong((long)result);
|
||||
return resultobj;
|
||||
fail:
|
||||
@ -770,7 +764,7 @@ static PyObject *_wrap_chmUnitInfo_path_set(PyObject *self, PyObject *args) {
|
||||
struct chmUnitInfo *arg1 = (struct chmUnitInfo *) 0 ;
|
||||
char *arg2 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)"Os:chmUnitInfo_path_set",&obj0,&arg2)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_chmUnitInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
{
|
||||
@ -789,11 +783,11 @@ static PyObject *_wrap_chmUnitInfo_path_get(PyObject *self, PyObject *args) {
|
||||
struct chmUnitInfo *arg1 = (struct chmUnitInfo *) 0 ;
|
||||
char *result;
|
||||
PyObject * obj0 = 0 ;
|
||||
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)"O:chmUnitInfo_path_get",&obj0)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_chmUnitInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
result = (char *)(char *) ((arg1)->path);
|
||||
|
||||
|
||||
resultobj = PyString_FromString(result);
|
||||
return resultobj;
|
||||
fail:
|
||||
@ -804,10 +798,10 @@ static PyObject *_wrap_chmUnitInfo_path_get(PyObject *self, PyObject *args) {
|
||||
static PyObject *_wrap_new_chmUnitInfo(PyObject *self, PyObject *args) {
|
||||
PyObject *resultobj;
|
||||
struct chmUnitInfo *result;
|
||||
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)":new_chmUnitInfo")) goto fail;
|
||||
result = (struct chmUnitInfo *)(struct chmUnitInfo *) calloc(1, sizeof(struct chmUnitInfo));
|
||||
|
||||
|
||||
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_chmUnitInfo, 1);
|
||||
return resultobj;
|
||||
fail:
|
||||
@ -819,11 +813,11 @@ static PyObject *_wrap_delete_chmUnitInfo(PyObject *self, PyObject *args) {
|
||||
PyObject *resultobj;
|
||||
struct chmUnitInfo *arg1 = (struct chmUnitInfo *) 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)"O:delete_chmUnitInfo",&obj0)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_chmUnitInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
free((char *) arg1);
|
||||
|
||||
|
||||
Py_INCREF(Py_None); resultobj = Py_None;
|
||||
return resultobj;
|
||||
fail:
|
||||
@ -842,10 +836,10 @@ static PyObject *_wrap_chm_open(PyObject *self, PyObject *args) {
|
||||
PyObject *resultobj;
|
||||
char *arg1 ;
|
||||
struct chmFile *result;
|
||||
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)"s:chm_open",&arg1)) goto fail;
|
||||
result = (struct chmFile *)chm_open((char const *)arg1);
|
||||
|
||||
|
||||
resultobj = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_chmFile, 0);
|
||||
return resultobj;
|
||||
fail:
|
||||
@ -857,11 +851,11 @@ static PyObject *_wrap_chm_close(PyObject *self, PyObject *args) {
|
||||
PyObject *resultobj;
|
||||
struct chmFile *arg1 = (struct chmFile *) 0 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)"O:chm_close",&obj0)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_chmFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
chm_close(arg1);
|
||||
|
||||
|
||||
Py_INCREF(Py_None); resultobj = Py_None;
|
||||
return resultobj;
|
||||
fail:
|
||||
@ -875,11 +869,11 @@ static PyObject *_wrap_chm_set_param(PyObject *self, PyObject *args) {
|
||||
int arg2 ;
|
||||
int arg3 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)"Oii:chm_set_param",&obj0,&arg2,&arg3)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_chmFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
chm_set_param(arg1,arg2,arg3);
|
||||
|
||||
|
||||
Py_INCREF(Py_None); resultobj = Py_None;
|
||||
return resultobj;
|
||||
fail:
|
||||
@ -895,14 +889,14 @@ static PyObject *_wrap_chm_resolve_object(PyObject *self, PyObject *args) {
|
||||
int result;
|
||||
struct chmUnitInfo *temp3 = (struct chmUnitInfo *) calloc(1, sizeof(struct chmUnitInfo)) ;
|
||||
PyObject * obj0 = 0 ;
|
||||
|
||||
|
||||
{
|
||||
arg3 = temp3;
|
||||
}
|
||||
if(!PyArg_ParseTuple(args,(char *)"Os:chm_resolve_object",&obj0,&arg2)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_chmFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
result = (int)chm_resolve_object(arg1,(char const *)arg2,arg3);
|
||||
|
||||
|
||||
resultobj = PyInt_FromLong((long)result);
|
||||
{
|
||||
PyObject *o, *o2, *o3;
|
||||
@ -934,44 +928,38 @@ static PyObject *_wrap_chm_retrieve_object(PyObject *self, PyObject *args) {
|
||||
struct chmFile *arg1 = (struct chmFile *) 0 ;
|
||||
struct chmUnitInfo *arg2 = (struct chmUnitInfo *) 0 ;
|
||||
unsigned char *arg3 = (unsigned char *) 0 ;
|
||||
LONGUINT64 arg4 ;
|
||||
LONGINT64 arg5 ;
|
||||
unsigned long long arg4 ;
|
||||
long long arg5 ;
|
||||
LONGINT64 result;
|
||||
unsigned char temp3 ;
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj1 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
PyObject * obj3 = 0 ;
|
||||
|
||||
|
||||
arg3 = &temp3;
|
||||
if(!PyArg_ParseTuple(args,(char *)"OOOO:chm_retrieve_object",&obj0,&obj1,&obj2,&obj3)) goto fail;
|
||||
if(!PyArg_ParseTuple(args,(char *)"OOKL:chm_retrieve_object",&obj0,&obj1,&arg4,&arg5)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_chmFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
if ((SWIG_ConvertPtr(obj1,(void **) &arg2, SWIGTYPE_p_chmUnitInfo,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
arg4 = (LONGUINT64) PyLong_AsUnsignedLongLong(obj2);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
arg5 = (LONGINT64) PyLong_AsLongLong(obj3);
|
||||
if (PyErr_Occurred()) SWIG_fail;
|
||||
{
|
||||
/* nasty hack */
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
arg3 = (unsigned char *) malloc(arg5);
|
||||
|
||||
|
||||
if (arg3 == NULL) SWIG_fail;
|
||||
}
|
||||
result = (LONGINT64)chm_retrieve_object(arg1,arg2,arg3,arg4,arg5);
|
||||
|
||||
|
||||
resultobj = PyLong_FromLongLong(result);
|
||||
{
|
||||
PyObject *o;
|
||||
o = PyString_FromStringAndSize((const char *)arg3, arg5);
|
||||
resultobj = t_output_helper(resultobj,o);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
free(arg3);
|
||||
|
||||
|
||||
}
|
||||
return resultobj;
|
||||
fail:
|
||||
@ -989,7 +977,7 @@ static PyObject *_wrap_chm_enumerate(PyObject *self, PyObject *args) {
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj2 = 0 ;
|
||||
PyObject * obj3 = 0 ;
|
||||
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)"OiOO:chm_enumerate",&obj0,&arg2,&obj2,&obj3)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_chmFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
{
|
||||
@ -1000,7 +988,7 @@ static PyObject *_wrap_chm_enumerate(PyObject *self, PyObject *args) {
|
||||
if (!(arg4 = PyCObject_FromVoidPtr(obj3, NULL))) goto fail;
|
||||
}
|
||||
result = (int)chm_enumerate(arg1,arg2,arg3,arg4);
|
||||
|
||||
|
||||
resultobj = PyInt_FromLong((long)result);
|
||||
return resultobj;
|
||||
fail:
|
||||
@ -1019,7 +1007,7 @@ static PyObject *_wrap_chm_enumerate_dir(PyObject *self, PyObject *args) {
|
||||
PyObject * obj0 = 0 ;
|
||||
PyObject * obj3 = 0 ;
|
||||
PyObject * obj4 = 0 ;
|
||||
|
||||
|
||||
if(!PyArg_ParseTuple(args,(char *)"OsiOO:chm_enumerate_dir",&obj0,&arg2,&arg3,&obj3,&obj4)) goto fail;
|
||||
if ((SWIG_ConvertPtr(obj0,(void **) &arg1, SWIGTYPE_p_chmFile,SWIG_POINTER_EXCEPTION | 0 )) == -1) SWIG_fail;
|
||||
{
|
||||
@ -1030,7 +1018,7 @@ static PyObject *_wrap_chm_enumerate_dir(PyObject *self, PyObject *args) {
|
||||
if (!(arg5 = PyCObject_FromVoidPtr(obj4, NULL))) goto fail;
|
||||
}
|
||||
result = (int)chm_enumerate_dir(arg1,(char const *)arg2,arg3,arg4,arg5);
|
||||
|
||||
|
||||
resultobj = PyInt_FromLong((long)result);
|
||||
return resultobj;
|
||||
fail:
|
||||
@ -1070,11 +1058,11 @@ static swig_type_info _swigt__CHM_ENUMERATOR[] = {{"_CHM_ENUMERATOR", 0, "CHM_EN
|
||||
static swig_type_info _swigt__p_chmFile[] = {{"_p_chmFile", 0, "struct chmFile *", 0},{"_p_chmFile"},{0}};
|
||||
|
||||
static swig_type_info *swig_types_initial[] = {
|
||||
_swigt__p_chmUnitInfo,
|
||||
_swigt__p_unsigned_char,
|
||||
_swigt__p_char,
|
||||
_swigt__CHM_ENUMERATOR,
|
||||
_swigt__p_chmFile,
|
||||
_swigt__p_chmUnitInfo,
|
||||
_swigt__p_unsigned_char,
|
||||
_swigt__p_char,
|
||||
_swigt__CHM_ENUMERATOR,
|
||||
_swigt__p_chmFile,
|
||||
0
|
||||
};
|
||||
|
||||
@ -1107,14 +1095,14 @@ static swig_const_info swig_const_table[] = {
|
||||
extern "C"
|
||||
#endif
|
||||
CALIBRE_MODINIT_FUNC SWIG_init(void) {
|
||||
static PyObject *SWIG_globals = 0;
|
||||
static PyObject *SWIG_globals = 0;
|
||||
static int typeinit = 0;
|
||||
PyObject *m, *d;
|
||||
int i;
|
||||
if (!SWIG_globals) SWIG_globals = SWIG_newvarlink();
|
||||
m = Py_InitModule((char *) SWIG_name, SwigMethods);
|
||||
d = PyModule_GetDict(m);
|
||||
|
||||
|
||||
if (!typeinit) {
|
||||
for (i = 0; swig_types_initial[i]; i++) {
|
||||
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
|
||||
@ -1122,6 +1110,5 @@ CALIBRE_MODINIT_FUNC SWIG_init(void) {
|
||||
typeinit = 1;
|
||||
}
|
||||
SWIG_InstallConstants(d,swig_const_table);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user