You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

8359 lines
277 KiB

  1. /* ----------------------------------------------------------------------------
  2. * This file was automatically generated by SWIG (http://www.swig.org).
  3. * Version 4.0.2
  4. *
  5. * This file is not intended to be easily readable and contains a number of
  6. * coding conventions designed to improve portability and efficiency. Do not make
  7. * changes to this file unless you know what you are doing--modify the SWIG
  8. * interface file instead.
  9. * ----------------------------------------------------------------------------- */
  10. #ifndef SWIGPYTHON
  11. #define SWIGPYTHON
  12. #endif
  13. #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
  14. /* -----------------------------------------------------------------------------
  15. * This section contains generic SWIG labels for method/variable
  16. * declarations/attributes, and other compiler dependent labels.
  17. * ----------------------------------------------------------------------------- */
  18. /* template workaround for compilers that cannot correctly implement the C++ standard */
  19. #ifndef 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
  26. # else
  27. # define SWIGTEMPLATEDISAMBIGUATOR
  28. # endif
  29. #endif
  30. /* inline attribute */
  31. #ifndef SWIGINLINE
  32. # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
  33. # define SWIGINLINE inline
  34. # else
  35. # define SWIGINLINE
  36. # endif
  37. #endif
  38. /* attribute recognised by some compilers to avoid 'unused' warnings */
  39. #ifndef SWIGUNUSED
  40. # if defined(__GNUC__)
  41. # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
  42. # define SWIGUNUSED __attribute__ ((__unused__))
  43. # else
  44. # define SWIGUNUSED
  45. # endif
  46. # elif defined(__ICC)
  47. # define SWIGUNUSED __attribute__ ((__unused__))
  48. # else
  49. # define SWIGUNUSED
  50. # endif
  51. #endif
  52. #ifndef SWIG_MSC_UNSUPPRESS_4505
  53. # if defined(_MSC_VER)
  54. # pragma warning(disable : 4505) /* unreferenced local function has been removed */
  55. # endif
  56. #endif
  57. #ifndef SWIGUNUSEDPARM
  58. # ifdef __cplusplus
  59. # define SWIGUNUSEDPARM(p)
  60. # else
  61. # define SWIGUNUSEDPARM(p) p SWIGUNUSED
  62. # endif
  63. #endif
  64. /* internal SWIG method */
  65. #ifndef SWIGINTERN
  66. # define SWIGINTERN static SWIGUNUSED
  67. #endif
  68. /* internal inline SWIG method */
  69. #ifndef SWIGINTERNINLINE
  70. # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
  71. #endif
  72. /* exporting methods */
  73. #if defined(__GNUC__)
  74. # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
  75. # ifndef GCC_HASCLASSVISIBILITY
  76. # define GCC_HASCLASSVISIBILITY
  77. # endif
  78. # endif
  79. #endif
  80. #ifndef SWIGEXPORT
  81. # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  82. # if defined(STATIC_LINKED)
  83. # define SWIGEXPORT
  84. # else
  85. # define SWIGEXPORT __declspec(dllexport)
  86. # endif
  87. # else
  88. # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
  89. # define SWIGEXPORT __attribute__ ((visibility("default")))
  90. # else
  91. # define SWIGEXPORT
  92. # endif
  93. # endif
  94. #endif
  95. /* calling conventions for Windows */
  96. #ifndef SWIGSTDCALL
  97. # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
  98. # define SWIGSTDCALL __stdcall
  99. # else
  100. # define SWIGSTDCALL
  101. # endif
  102. #endif
  103. /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
  104. #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
  105. # define _CRT_SECURE_NO_DEPRECATE
  106. #endif
  107. /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
  108. #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
  109. # define _SCL_SECURE_NO_DEPRECATE
  110. #endif
  111. /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
  112. #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
  113. # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
  114. #endif
  115. /* Intel's compiler complains if a variable which was never initialised is
  116. * cast to void, which is a common idiom which we use to indicate that we
  117. * are aware a variable isn't used. So we just silence that warning.
  118. * See: https://github.com/swig/swig/issues/192 for more discussion.
  119. */
  120. #ifdef __INTEL_COMPILER
  121. # pragma warning disable 592
  122. #endif
  123. #if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
  124. /* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
  125. # include <math.h>
  126. #endif
  127. #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
  128. /* Use debug wrappers with the Python release dll */
  129. # undef _DEBUG
  130. # include <Python.h>
  131. # define _DEBUG 1
  132. #else
  133. # include <Python.h>
  134. #endif
  135. /* -----------------------------------------------------------------------------
  136. * swigrun.swg
  137. *
  138. * This file contains generic C API SWIG runtime support for pointer
  139. * type checking.
  140. * ----------------------------------------------------------------------------- */
  141. /* This should only be incremented when either the layout of swig_type_info changes,
  142. or for whatever reason, the runtime changes incompatibly */
  143. #define SWIG_RUNTIME_VERSION "4"
  144. /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
  145. #ifdef SWIG_TYPE_TABLE
  146. # define SWIG_QUOTE_STRING(x) #x
  147. # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
  148. # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
  149. #else
  150. # define SWIG_TYPE_TABLE_NAME
  151. #endif
  152. /*
  153. You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  154. creating a static or dynamic library from the SWIG runtime code.
  155. In 99.9% of the cases, SWIG just needs to declare them as 'static'.
  156. But only do this if strictly necessary, ie, if you have problems
  157. with your compiler or suchlike.
  158. */
  159. #ifndef SWIGRUNTIME
  160. # define SWIGRUNTIME SWIGINTERN
  161. #endif
  162. #ifndef SWIGRUNTIMEINLINE
  163. # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
  164. #endif
  165. /* Generic buffer size */
  166. #ifndef SWIG_BUFFER_SIZE
  167. # define SWIG_BUFFER_SIZE 1024
  168. #endif
  169. /* Flags for pointer conversions */
  170. #define SWIG_POINTER_DISOWN 0x1
  171. #define SWIG_CAST_NEW_MEMORY 0x2
  172. #define SWIG_POINTER_NO_NULL 0x4
  173. /* Flags for new pointer objects */
  174. #define SWIG_POINTER_OWN 0x1
  175. /*
  176. Flags/methods for returning states.
  177. The SWIG conversion methods, as ConvertPtr, return an integer
  178. that tells if the conversion was successful or not. And if not,
  179. an error code can be returned (see swigerrors.swg for the codes).
  180. Use the following macros/flags to set or process the returning
  181. states.
  182. In old versions of SWIG, code such as the following was usually written:
  183. if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
  184. // success code
  185. } else {
  186. //fail code
  187. }
  188. Now you can be more explicit:
  189. int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
  190. if (SWIG_IsOK(res)) {
  191. // success code
  192. } else {
  193. // fail code
  194. }
  195. which is the same really, but now you can also do
  196. Type *ptr;
  197. int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
  198. if (SWIG_IsOK(res)) {
  199. // success code
  200. if (SWIG_IsNewObj(res) {
  201. ...
  202. delete *ptr;
  203. } else {
  204. ...
  205. }
  206. } else {
  207. // fail code
  208. }
  209. I.e., now SWIG_ConvertPtr can return new objects and you can
  210. identify the case and take care of the deallocation. Of course that
  211. also requires SWIG_ConvertPtr to return new result values, such as
  212. int SWIG_ConvertPtr(obj, ptr,...) {
  213. if (<obj is ok>) {
  214. if (<need new object>) {
  215. *ptr = <ptr to new allocated object>;
  216. return SWIG_NEWOBJ;
  217. } else {
  218. *ptr = <ptr to old object>;
  219. return SWIG_OLDOBJ;
  220. }
  221. } else {
  222. return SWIG_BADOBJ;
  223. }
  224. }
  225. Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
  226. more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
  227. SWIG errors code.
  228. Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
  229. allows to return the 'cast rank', for example, if you have this
  230. int food(double)
  231. int fooi(int);
  232. and you call
  233. food(1) // cast rank '1' (1 -> 1.0)
  234. fooi(1) // cast rank '0'
  235. just use the SWIG_AddCast()/SWIG_CheckState()
  236. */
  237. #define SWIG_OK (0)
  238. #define SWIG_ERROR (-1)
  239. #define SWIG_IsOK(r) (r >= 0)
  240. #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
  241. /* The CastRankLimit says how many bits are used for the cast rank */
  242. #define SWIG_CASTRANKLIMIT (1 << 8)
  243. /* The NewMask denotes the object was created (using new/malloc) */
  244. #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
  245. /* The TmpMask is for in/out typemaps that use temporal objects */
  246. #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
  247. /* Simple returning values */
  248. #define SWIG_BADOBJ (SWIG_ERROR)
  249. #define SWIG_OLDOBJ (SWIG_OK)
  250. #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
  251. #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
  252. /* Check, add and del mask methods */
  253. #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
  254. #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
  255. #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
  256. #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
  257. #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
  258. #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
  259. /* Cast-Rank Mode */
  260. #if defined(SWIG_CASTRANK_MODE)
  261. # ifndef SWIG_TypeRank
  262. # define SWIG_TypeRank unsigned long
  263. # endif
  264. # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
  265. # define SWIG_MAXCASTRANK (2)
  266. # endif
  267. # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
  268. # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
  269. SWIGINTERNINLINE int SWIG_AddCast(int r) {
  270. return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
  271. }
  272. SWIGINTERNINLINE int SWIG_CheckState(int r) {
  273. return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
  274. }
  275. #else /* no cast-rank mode */
  276. # define SWIG_AddCast(r) (r)
  277. # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
  278. #endif
  279. #include <string.h>
  280. #ifdef __cplusplus
  281. extern "C" {
  282. #endif
  283. typedef void *(*swig_converter_func)(void *, int *);
  284. typedef struct swig_type_info *(*swig_dycast_func)(void **);
  285. /* Structure to store information on one type */
  286. typedef struct swig_type_info {
  287. const char *name; /* mangled name of this type */
  288. const char *str; /* human readable name of this type */
  289. swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
  290. struct swig_cast_info *cast; /* linked list of types that can cast into this type */
  291. void *clientdata; /* language specific type data */
  292. int owndata; /* flag if the structure owns the clientdata */
  293. } swig_type_info;
  294. /* Structure to store a type and conversion function used for casting */
  295. typedef struct swig_cast_info {
  296. swig_type_info *type; /* pointer to type that is equivalent to this type */
  297. swig_converter_func converter; /* function to cast the void pointers */
  298. struct swig_cast_info *next; /* pointer to next cast in linked list */
  299. struct swig_cast_info *prev; /* pointer to the previous cast */
  300. } swig_cast_info;
  301. /* Structure used to store module information
  302. * Each module generates one structure like this, and the runtime collects
  303. * all of these structures and stores them in a circularly linked list.*/
  304. typedef struct swig_module_info {
  305. swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
  306. size_t size; /* Number of types in this module */
  307. struct swig_module_info *next; /* Pointer to next element in circularly linked list */
  308. swig_type_info **type_initial; /* Array of initially generated type structures */
  309. swig_cast_info **cast_initial; /* Array of initially generated casting structures */
  310. void *clientdata; /* Language specific module data */
  311. } swig_module_info;
  312. /*
  313. Compare two type names skipping the space characters, therefore
  314. "char*" == "char *" and "Class<int>" == "Class<int >", etc.
  315. Return 0 when the two name types are equivalent, as in
  316. strncmp, but skipping ' '.
  317. */
  318. SWIGRUNTIME int
  319. SWIG_TypeNameComp(const char *f1, const char *l1,
  320. const char *f2, const char *l2) {
  321. for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
  322. while ((*f1 == ' ') && (f1 != l1)) ++f1;
  323. while ((*f2 == ' ') && (f2 != l2)) ++f2;
  324. if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  325. }
  326. return (int)((l1 - f1) - (l2 - f2));
  327. }
  328. /*
  329. Check type equivalence in a name list like <name1>|<name2>|...
  330. Return 0 if equal, -1 if nb < tb, 1 if nb > tb
  331. */
  332. SWIGRUNTIME int
  333. SWIG_TypeCmp(const char *nb, const char *tb) {
  334. int equiv = 1;
  335. const char* te = tb + strlen(tb);
  336. const char* ne = nb;
  337. while (equiv != 0 && *ne) {
  338. for (nb = ne; *ne; ++ne) {
  339. if (*ne == '|') break;
  340. }
  341. equiv = SWIG_TypeNameComp(nb, ne, tb, te);
  342. if (*ne) ++ne;
  343. }
  344. return equiv;
  345. }
  346. /*
  347. Check type equivalence in a name list like <name1>|<name2>|...
  348. Return 0 if not equal, 1 if equal
  349. */
  350. SWIGRUNTIME int
  351. SWIG_TypeEquiv(const char *nb, const char *tb) {
  352. return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
  353. }
  354. /*
  355. Check the typename
  356. */
  357. SWIGRUNTIME swig_cast_info *
  358. SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  359. if (ty) {
  360. swig_cast_info *iter = ty->cast;
  361. while (iter) {
  362. if (strcmp(iter->type->name, c) == 0) {
  363. if (iter == ty->cast)
  364. return iter;
  365. /* Move iter to the top of the linked list */
  366. iter->prev->next = iter->next;
  367. if (iter->next)
  368. iter->next->prev = iter->prev;
  369. iter->next = ty->cast;
  370. iter->prev = 0;
  371. if (ty->cast) ty->cast->prev = iter;
  372. ty->cast = iter;
  373. return iter;
  374. }
  375. iter = iter->next;
  376. }
  377. }
  378. return 0;
  379. }
  380. /*
  381. Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
  382. */
  383. SWIGRUNTIME swig_cast_info *
  384. SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
  385. if (ty) {
  386. swig_cast_info *iter = ty->cast;
  387. while (iter) {
  388. if (iter->type == from) {
  389. if (iter == ty->cast)
  390. return iter;
  391. /* Move iter to the top of the linked list */
  392. iter->prev->next = iter->next;
  393. if (iter->next)
  394. iter->next->prev = iter->prev;
  395. iter->next = ty->cast;
  396. iter->prev = 0;
  397. if (ty->cast) ty->cast->prev = iter;
  398. ty->cast = iter;
  399. return iter;
  400. }
  401. iter = iter->next;
  402. }
  403. }
  404. return 0;
  405. }
  406. /*
  407. Cast a pointer up an inheritance hierarchy
  408. */
  409. SWIGRUNTIMEINLINE void *
  410. SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  411. return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
  412. }
  413. /*
  414. Dynamic pointer casting. Down an inheritance hierarchy
  415. */
  416. SWIGRUNTIME swig_type_info *
  417. SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  418. swig_type_info *lastty = ty;
  419. if (!ty || !ty->dcast) return ty;
  420. while (ty && (ty->dcast)) {
  421. ty = (*ty->dcast)(ptr);
  422. if (ty) lastty = ty;
  423. }
  424. return lastty;
  425. }
  426. /*
  427. Return the name associated with this type
  428. */
  429. SWIGRUNTIMEINLINE const char *
  430. SWIG_TypeName(const swig_type_info *ty) {
  431. return ty->name;
  432. }
  433. /*
  434. Return the pretty name associated with this type,
  435. that is an unmangled type name in a form presentable to the user.
  436. */
  437. SWIGRUNTIME const char *
  438. SWIG_TypePrettyName(const swig_type_info *type) {
  439. /* The "str" field contains the equivalent pretty names of the
  440. type, separated by vertical-bar characters. We choose
  441. to print the last name, as it is often (?) the most
  442. specific. */
  443. if (!type) return NULL;
  444. if (type->str != NULL) {
  445. const char *last_name = type->str;
  446. const char *s;
  447. for (s = type->str; *s; s++)
  448. if (*s == '|') last_name = s+1;
  449. return last_name;
  450. }
  451. else
  452. return type->name;
  453. }
  454. /*
  455. Set the clientdata field for a type
  456. */
  457. SWIGRUNTIME void
  458. SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  459. swig_cast_info *cast = ti->cast;
  460. /* if (ti->clientdata == clientdata) return; */
  461. ti->clientdata = clientdata;
  462. while (cast) {
  463. if (!cast->converter) {
  464. swig_type_info *tc = cast->type;
  465. if (!tc->clientdata) {
  466. SWIG_TypeClientData(tc, clientdata);
  467. }
  468. }
  469. cast = cast->next;
  470. }
  471. }
  472. SWIGRUNTIME void
  473. SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  474. SWIG_TypeClientData(ti, clientdata);
  475. ti->owndata = 1;
  476. }
  477. /*
  478. Search for a swig_type_info structure only by mangled name
  479. Search is a O(log #types)
  480. We start searching at module start, and finish searching when start == end.
  481. Note: if start == end at the beginning of the function, we go all the way around
  482. the circular list.
  483. */
  484. SWIGRUNTIME swig_type_info *
  485. SWIG_MangledTypeQueryModule(swig_module_info *start,
  486. swig_module_info *end,
  487. const char *name) {
  488. swig_module_info *iter = start;
  489. do {
  490. if (iter->size) {
  491. size_t l = 0;
  492. size_t r = iter->size - 1;
  493. do {
  494. /* since l+r >= 0, we can (>> 1) instead (/ 2) */
  495. size_t i = (l + r) >> 1;
  496. const char *iname = iter->types[i]->name;
  497. if (iname) {
  498. int compare = strcmp(name, iname);
  499. if (compare == 0) {
  500. return iter->types[i];
  501. } else if (compare < 0) {
  502. if (i) {
  503. r = i - 1;
  504. } else {
  505. break;
  506. }
  507. } else if (compare > 0) {
  508. l = i + 1;
  509. }
  510. } else {
  511. break; /* should never happen */
  512. }
  513. } while (l <= r);
  514. }
  515. iter = iter->next;
  516. } while (iter != end);
  517. return 0;
  518. }
  519. /*
  520. Search for a swig_type_info structure for either a mangled name or a human readable name.
  521. It first searches the mangled names of the types, which is a O(log #types)
  522. If a type is not found it then searches the human readable names, which is O(#types).
  523. We start searching at module start, and finish searching when start == end.
  524. Note: if start == end at the beginning of the function, we go all the way around
  525. the circular list.
  526. */
  527. SWIGRUNTIME swig_type_info *
  528. SWIG_TypeQueryModule(swig_module_info *start,
  529. swig_module_info *end,
  530. const char *name) {
  531. /* STEP 1: Search the name field using binary search */
  532. swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  533. if (ret) {
  534. return ret;
  535. } else {
  536. /* STEP 2: If the type hasn't been found, do a complete search
  537. of the str field (the human readable name) */
  538. swig_module_info *iter = start;
  539. do {
  540. size_t i = 0;
  541. for (; i < iter->size; ++i) {
  542. if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
  543. return iter->types[i];
  544. }
  545. iter = iter->next;
  546. } while (iter != end);
  547. }
  548. /* neither found a match */
  549. return 0;
  550. }
  551. /*
  552. Pack binary data into a string
  553. */
  554. SWIGRUNTIME char *
  555. SWIG_PackData(char *c, void *ptr, size_t sz) {
  556. static const char hex[17] = "0123456789abcdef";
  557. const unsigned char *u = (unsigned char *) ptr;
  558. const unsigned char *eu = u + sz;
  559. for (; u != eu; ++u) {
  560. unsigned char uu = *u;
  561. *(c++) = hex[(uu & 0xf0) >> 4];
  562. *(c++) = hex[uu & 0xf];
  563. }
  564. return c;
  565. }
  566. /*
  567. Unpack binary data from a string
  568. */
  569. SWIGRUNTIME const char *
  570. SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  571. unsigned char *u = (unsigned char *) ptr;
  572. const unsigned char *eu = u + sz;
  573. for (; u != eu; ++u) {
  574. char d = *(c++);
  575. unsigned char uu;
  576. if ((d >= '0') && (d <= '9'))
  577. uu = (unsigned char)((d - '0') << 4);
  578. else if ((d >= 'a') && (d <= 'f'))
  579. uu = (unsigned char)((d - ('a'-10)) << 4);
  580. else
  581. return (char *) 0;
  582. d = *(c++);
  583. if ((d >= '0') && (d <= '9'))
  584. uu |= (unsigned char)(d - '0');
  585. else if ((d >= 'a') && (d <= 'f'))
  586. uu |= (unsigned char)(d - ('a'-10));
  587. else
  588. return (char *) 0;
  589. *u = uu;
  590. }
  591. return c;
  592. }
  593. /*
  594. Pack 'void *' into a string buffer.
  595. */
  596. SWIGRUNTIME char *
  597. SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  598. char *r = buff;
  599. if ((2*sizeof(void *) + 2) > bsz) return 0;
  600. *(r++) = '_';
  601. r = SWIG_PackData(r,&ptr,sizeof(void *));
  602. if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  603. strcpy(r,name);
  604. return buff;
  605. }
  606. SWIGRUNTIME const char *
  607. SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  608. if (*c != '_') {
  609. if (strcmp(c,"NULL") == 0) {
  610. *ptr = (void *) 0;
  611. return name;
  612. } else {
  613. return 0;
  614. }
  615. }
  616. return SWIG_UnpackData(++c,ptr,sizeof(void *));
  617. }
  618. SWIGRUNTIME char *
  619. SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  620. char *r = buff;
  621. size_t lname = (name ? strlen(name) : 0);
  622. if ((2*sz + 2 + lname) > bsz) return 0;
  623. *(r++) = '_';
  624. r = SWIG_PackData(r,ptr,sz);
  625. if (lname) {
  626. strncpy(r,name,lname+1);
  627. } else {
  628. *r = 0;
  629. }
  630. return buff;
  631. }
  632. SWIGRUNTIME const char *
  633. SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  634. if (*c != '_') {
  635. if (strcmp(c,"NULL") == 0) {
  636. memset(ptr,0,sz);
  637. return name;
  638. } else {
  639. return 0;
  640. }
  641. }
  642. return SWIG_UnpackData(++c,ptr,sz);
  643. }
  644. #ifdef __cplusplus
  645. }
  646. #endif
  647. /* Errors in SWIG */
  648. #define SWIG_UnknownError -1
  649. #define SWIG_IOError -2
  650. #define SWIG_RuntimeError -3
  651. #define SWIG_IndexError -4
  652. #define SWIG_TypeError -5
  653. #define SWIG_DivisionByZero -6
  654. #define SWIG_OverflowError -7
  655. #define SWIG_SyntaxError -8
  656. #define SWIG_ValueError -9
  657. #define SWIG_SystemError -10
  658. #define SWIG_AttributeError -11
  659. #define SWIG_MemoryError -12
  660. #define SWIG_NullReferenceError -13
  661. /* Compatibility macros for Python 3 */
  662. #if PY_VERSION_HEX >= 0x03000000
  663. #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
  664. #define PyInt_Check(x) PyLong_Check(x)
  665. #define PyInt_AsLong(x) PyLong_AsLong(x)
  666. #define PyInt_FromLong(x) PyLong_FromLong(x)
  667. #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
  668. #define PyString_Check(name) PyBytes_Check(name)
  669. #define PyString_FromString(x) PyUnicode_FromString(x)
  670. #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
  671. #define PyString_AsString(str) PyBytes_AsString(str)
  672. #define PyString_Size(str) PyBytes_Size(str)
  673. #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
  674. #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
  675. #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
  676. #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
  677. #endif
  678. #ifndef Py_TYPE
  679. # define Py_TYPE(op) ((op)->ob_type)
  680. #endif
  681. /* SWIG APIs for compatibility of both Python 2 & 3 */
  682. #if PY_VERSION_HEX >= 0x03000000
  683. # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
  684. #else
  685. # define SWIG_Python_str_FromFormat PyString_FromFormat
  686. #endif
  687. /* Warning: This function will allocate a new string in Python 3,
  688. * so please call SWIG_Python_str_DelForPy3(x) to free the space.
  689. */
  690. SWIGINTERN char*
  691. SWIG_Python_str_AsChar(PyObject *str)
  692. {
  693. #if PY_VERSION_HEX >= 0x03030000
  694. return (char *)PyUnicode_AsUTF8(str);
  695. #elif PY_VERSION_HEX >= 0x03000000
  696. char *newstr = 0;
  697. str = PyUnicode_AsUTF8String(str);
  698. if (str) {
  699. char *cstr;
  700. Py_ssize_t len;
  701. if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) {
  702. newstr = (char *) malloc(len+1);
  703. if (newstr)
  704. memcpy(newstr, cstr, len+1);
  705. }
  706. Py_XDECREF(str);
  707. }
  708. return newstr;
  709. #else
  710. return PyString_AsString(str);
  711. #endif
  712. }
  713. #if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000
  714. # define SWIG_Python_str_DelForPy3(x)
  715. #else
  716. # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
  717. #endif
  718. SWIGINTERN PyObject*
  719. SWIG_Python_str_FromChar(const char *c)
  720. {
  721. #if PY_VERSION_HEX >= 0x03000000
  722. return PyUnicode_FromString(c);
  723. #else
  724. return PyString_FromString(c);
  725. #endif
  726. }
  727. #ifndef PyObject_DEL
  728. # define PyObject_DEL PyObject_Del
  729. #endif
  730. // SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user
  731. // interface files check for it.
  732. # define SWIGPY_USE_CAPSULE
  733. # define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
  734. #if PY_VERSION_HEX < 0x03020000
  735. #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
  736. #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
  737. #define Py_hash_t long
  738. #endif
  739. /* -----------------------------------------------------------------------------
  740. * error manipulation
  741. * ----------------------------------------------------------------------------- */
  742. SWIGRUNTIME PyObject*
  743. SWIG_Python_ErrorType(int code) {
  744. PyObject* type = 0;
  745. switch(code) {
  746. case SWIG_MemoryError:
  747. type = PyExc_MemoryError;
  748. break;
  749. case SWIG_IOError:
  750. type = PyExc_IOError;
  751. break;
  752. case SWIG_RuntimeError:
  753. type = PyExc_RuntimeError;
  754. break;
  755. case SWIG_IndexError:
  756. type = PyExc_IndexError;
  757. break;
  758. case SWIG_TypeError:
  759. type = PyExc_TypeError;
  760. break;
  761. case SWIG_DivisionByZero:
  762. type = PyExc_ZeroDivisionError;
  763. break;
  764. case SWIG_OverflowError:
  765. type = PyExc_OverflowError;
  766. break;
  767. case SWIG_SyntaxError:
  768. type = PyExc_SyntaxError;
  769. break;
  770. case SWIG_ValueError:
  771. type = PyExc_ValueError;
  772. break;
  773. case SWIG_SystemError:
  774. type = PyExc_SystemError;
  775. break;
  776. case SWIG_AttributeError:
  777. type = PyExc_AttributeError;
  778. break;
  779. default:
  780. type = PyExc_RuntimeError;
  781. }
  782. return type;
  783. }
  784. SWIGRUNTIME void
  785. SWIG_Python_AddErrorMsg(const char* mesg)
  786. {
  787. PyObject *type = 0;
  788. PyObject *value = 0;
  789. PyObject *traceback = 0;
  790. if (PyErr_Occurred())
  791. PyErr_Fetch(&type, &value, &traceback);
  792. if (value) {
  793. PyObject *old_str = PyObject_Str(value);
  794. const char *tmp = SWIG_Python_str_AsChar(old_str);
  795. PyErr_Clear();
  796. Py_XINCREF(type);
  797. if (tmp)
  798. PyErr_Format(type, "%s %s", tmp, mesg);
  799. else
  800. PyErr_Format(type, "%s", mesg);
  801. SWIG_Python_str_DelForPy3(tmp);
  802. Py_DECREF(old_str);
  803. Py_DECREF(value);
  804. } else {
  805. PyErr_SetString(PyExc_RuntimeError, mesg);
  806. }
  807. }
  808. SWIGRUNTIME int
  809. SWIG_Python_TypeErrorOccurred(PyObject *obj)
  810. {
  811. PyObject *error;
  812. if (obj)
  813. return 0;
  814. error = PyErr_Occurred();
  815. return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
  816. }
  817. SWIGRUNTIME void
  818. SWIG_Python_RaiseOrModifyTypeError(const char *message)
  819. {
  820. if (SWIG_Python_TypeErrorOccurred(NULL)) {
  821. /* Use existing TypeError to preserve stacktrace and enhance with given message */
  822. PyObject *newvalue;
  823. PyObject *type = NULL, *value = NULL, *traceback = NULL;
  824. PyErr_Fetch(&type, &value, &traceback);
  825. #if PY_VERSION_HEX >= 0x03000000
  826. newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message);
  827. #else
  828. newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message);
  829. #endif
  830. Py_XDECREF(value);
  831. PyErr_Restore(type, newvalue, traceback);
  832. } else {
  833. /* Raise TypeError using given message */
  834. PyErr_SetString(PyExc_TypeError, message);
  835. }
  836. }
  837. #if defined(SWIG_PYTHON_NO_THREADS)
  838. # if defined(SWIG_PYTHON_THREADS)
  839. # undef SWIG_PYTHON_THREADS
  840. # endif
  841. #endif
  842. #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
  843. # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
  844. # define SWIG_PYTHON_USE_GIL
  845. # endif
  846. # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
  847. # ifndef SWIG_PYTHON_INITIALIZE_THREADS
  848. # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
  849. # endif
  850. # ifdef __cplusplus /* C++ code */
  851. class SWIG_Python_Thread_Block {
  852. bool status;
  853. PyGILState_STATE state;
  854. public:
  855. void end() { if (status) { PyGILState_Release(state); status = false;} }
  856. SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
  857. ~SWIG_Python_Thread_Block() { end(); }
  858. };
  859. class SWIG_Python_Thread_Allow {
  860. bool status;
  861. PyThreadState *save;
  862. public:
  863. void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
  864. SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
  865. ~SWIG_Python_Thread_Allow() { end(); }
  866. };
  867. # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
  868. # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
  869. # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
  870. # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
  871. # else /* C code */
  872. # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
  873. # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
  874. # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
  875. # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
  876. # endif
  877. # else /* Old thread way, not implemented, user must provide it */
  878. # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
  879. # define SWIG_PYTHON_INITIALIZE_THREADS
  880. # endif
  881. # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
  882. # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
  883. # endif
  884. # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
  885. # define SWIG_PYTHON_THREAD_END_BLOCK
  886. # endif
  887. # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
  888. # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
  889. # endif
  890. # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
  891. # define SWIG_PYTHON_THREAD_END_ALLOW
  892. # endif
  893. # endif
  894. #else /* No thread support */
  895. # define SWIG_PYTHON_INITIALIZE_THREADS
  896. # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
  897. # define SWIG_PYTHON_THREAD_END_BLOCK
  898. # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
  899. # define SWIG_PYTHON_THREAD_END_ALLOW
  900. #endif
  901. /* -----------------------------------------------------------------------------
  902. * Python API portion that goes into the runtime
  903. * ----------------------------------------------------------------------------- */
  904. #ifdef __cplusplus
  905. extern "C" {
  906. #endif
  907. /* -----------------------------------------------------------------------------
  908. * Constant declarations
  909. * ----------------------------------------------------------------------------- */
  910. /* Constant Types */
  911. #define SWIG_PY_POINTER 4
  912. #define SWIG_PY_BINARY 5
  913. /* Constant information structure */
  914. typedef struct swig_const_info {
  915. int type;
  916. const char *name;
  917. long lvalue;
  918. double dvalue;
  919. void *pvalue;
  920. swig_type_info **ptype;
  921. } swig_const_info;
  922. #ifdef __cplusplus
  923. }
  924. #endif
  925. /* -----------------------------------------------------------------------------
  926. * pyrun.swg
  927. *
  928. * This file contains the runtime support for Python modules
  929. * and includes code for managing global variables and pointer
  930. * type checking.
  931. *
  932. * ----------------------------------------------------------------------------- */
  933. #if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */
  934. # error "This version of SWIG only supports Python >= 2.7"
  935. #endif
  936. #if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000
  937. # error "This version of SWIG only supports Python 3 >= 3.2"
  938. #endif
  939. /* Common SWIG API */
  940. /* for raw pointers */
  941. #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
  942. #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
  943. #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
  944. #ifdef SWIGPYTHON_BUILTIN
  945. #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
  946. #else
  947. #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
  948. #endif
  949. #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
  950. #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
  951. #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
  952. #define swig_owntype int
  953. /* for raw packed data */
  954. #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
  955. #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
  956. /* for class or struct pointers */
  957. #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
  958. #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
  959. /* for C or C++ function pointers */
  960. #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
  961. #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
  962. /* for C++ member pointers, ie, member methods */
  963. #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
  964. #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
  965. /* Runtime API */
  966. #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
  967. #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
  968. #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
  969. #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
  970. #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
  971. #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
  972. #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
  973. #define SWIG_fail goto fail
  974. /* Runtime API implementation */
  975. /* Error manipulation */
  976. SWIGINTERN void
  977. SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
  978. SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  979. PyErr_SetObject(errtype, obj);
  980. Py_DECREF(obj);
  981. SWIG_PYTHON_THREAD_END_BLOCK;
  982. }
  983. SWIGINTERN void
  984. SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
  985. SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  986. PyErr_SetString(errtype, msg);
  987. SWIG_PYTHON_THREAD_END_BLOCK;
  988. }
  989. #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
  990. /* Set a constant value */
  991. #if defined(SWIGPYTHON_BUILTIN)
  992. SWIGINTERN void
  993. SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
  994. PyObject *s = PyString_InternFromString(key);
  995. PyList_Append(seq, s);
  996. Py_DECREF(s);
  997. }
  998. SWIGINTERN void
  999. SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
  1000. PyDict_SetItemString(d, name, obj);
  1001. Py_DECREF(obj);
  1002. if (public_interface)
  1003. SwigPyBuiltin_AddPublicSymbol(public_interface, name);
  1004. }
  1005. #else
  1006. SWIGINTERN void
  1007. SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
  1008. PyDict_SetItemString(d, name, obj);
  1009. Py_DECREF(obj);
  1010. }
  1011. #endif
  1012. /* Append a value to the result obj */
  1013. SWIGINTERN PyObject*
  1014. SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
  1015. if (!result) {
  1016. result = obj;
  1017. } else if (result == Py_None) {
  1018. Py_DECREF(result);
  1019. result = obj;
  1020. } else {
  1021. if (!PyList_Check(result)) {
  1022. PyObject *o2 = result;
  1023. result = PyList_New(1);
  1024. PyList_SetItem(result, 0, o2);
  1025. }
  1026. PyList_Append(result,obj);
  1027. Py_DECREF(obj);
  1028. }
  1029. return result;
  1030. }
  1031. /* Unpack the argument tuple */
  1032. SWIGINTERN Py_ssize_t
  1033. SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
  1034. {
  1035. if (!args) {
  1036. if (!min && !max) {
  1037. return 1;
  1038. } else {
  1039. PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
  1040. name, (min == max ? "" : "at least "), (int)min);
  1041. return 0;
  1042. }
  1043. }
  1044. if (!PyTuple_Check(args)) {
  1045. if (min <= 1 && max >= 1) {
  1046. Py_ssize_t i;
  1047. objs[0] = args;
  1048. for (i = 1; i < max; ++i) {
  1049. objs[i] = 0;
  1050. }
  1051. return 2;
  1052. }
  1053. PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
  1054. return 0;
  1055. } else {
  1056. Py_ssize_t l = PyTuple_GET_SIZE(args);
  1057. if (l < min) {
  1058. PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
  1059. name, (min == max ? "" : "at least "), (int)min, (int)l);
  1060. return 0;
  1061. } else if (l > max) {
  1062. PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
  1063. name, (min == max ? "" : "at most "), (int)max, (int)l);
  1064. return 0;
  1065. } else {
  1066. Py_ssize_t i;
  1067. for (i = 0; i < l; ++i) {
  1068. objs[i] = PyTuple_GET_ITEM(args, i);
  1069. }
  1070. for (; l < max; ++l) {
  1071. objs[l] = 0;
  1072. }
  1073. return i + 1;
  1074. }
  1075. }
  1076. }
  1077. SWIGINTERN int
  1078. SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) {
  1079. int no_kwargs = 1;
  1080. if (kwargs) {
  1081. assert(PyDict_Check(kwargs));
  1082. if (PyDict_Size(kwargs) > 0) {
  1083. PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name);
  1084. no_kwargs = 0;
  1085. }
  1086. }
  1087. return no_kwargs;
  1088. }
  1089. /* A functor is a function object with one single object argument */
  1090. #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
  1091. /*
  1092. Helper for static pointer initialization for both C and C++ code, for example
  1093. static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
  1094. */
  1095. #ifdef __cplusplus
  1096. #define SWIG_STATIC_POINTER(var) var
  1097. #else
  1098. #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
  1099. #endif
  1100. /* -----------------------------------------------------------------------------
  1101. * Pointer declarations
  1102. * ----------------------------------------------------------------------------- */
  1103. /* Flags for new pointer objects */
  1104. #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
  1105. #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
  1106. #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
  1107. #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
  1108. #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
  1109. #ifdef __cplusplus
  1110. extern "C" {
  1111. #endif
  1112. /* The python void return value */
  1113. SWIGRUNTIMEINLINE PyObject *
  1114. SWIG_Py_Void(void)
  1115. {
  1116. PyObject *none = Py_None;
  1117. Py_INCREF(none);
  1118. return none;
  1119. }
  1120. /* SwigPyClientData */
  1121. typedef struct {
  1122. PyObject *klass;
  1123. PyObject *newraw;
  1124. PyObject *newargs;
  1125. PyObject *destroy;
  1126. int delargs;
  1127. int implicitconv;
  1128. PyTypeObject *pytype;
  1129. } SwigPyClientData;
  1130. SWIGRUNTIMEINLINE int
  1131. SWIG_Python_CheckImplicit(swig_type_info *ty)
  1132. {
  1133. SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
  1134. int fail = data ? data->implicitconv : 0;
  1135. if (fail)
  1136. PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
  1137. return fail;
  1138. }
  1139. SWIGRUNTIMEINLINE PyObject *
  1140. SWIG_Python_ExceptionType(swig_type_info *desc) {
  1141. SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
  1142. PyObject *klass = data ? data->klass : 0;
  1143. return (klass ? klass : PyExc_RuntimeError);
  1144. }
  1145. SWIGRUNTIME SwigPyClientData *
  1146. SwigPyClientData_New(PyObject* obj)
  1147. {
  1148. if (!obj) {
  1149. return 0;
  1150. } else {
  1151. SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
  1152. /* the klass element */
  1153. data->klass = obj;
  1154. Py_INCREF(data->klass);
  1155. /* the newraw method and newargs arguments used to create a new raw instance */
  1156. if (PyClass_Check(obj)) {
  1157. data->newraw = 0;
  1158. data->newargs = obj;
  1159. Py_INCREF(obj);
  1160. } else {
  1161. data->newraw = PyObject_GetAttrString(data->klass, "__new__");
  1162. if (data->newraw) {
  1163. Py_INCREF(data->newraw);
  1164. data->newargs = PyTuple_New(1);
  1165. PyTuple_SetItem(data->newargs, 0, obj);
  1166. } else {
  1167. data->newargs = obj;
  1168. }
  1169. Py_INCREF(data->newargs);
  1170. }
  1171. /* the destroy method, aka as the C++ delete method */
  1172. data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
  1173. if (PyErr_Occurred()) {
  1174. PyErr_Clear();
  1175. data->destroy = 0;
  1176. }
  1177. if (data->destroy) {
  1178. int flags;
  1179. Py_INCREF(data->destroy);
  1180. flags = PyCFunction_GET_FLAGS(data->destroy);
  1181. data->delargs = !(flags & (METH_O));
  1182. } else {
  1183. data->delargs = 0;
  1184. }
  1185. data->implicitconv = 0;
  1186. data->pytype = 0;
  1187. return data;
  1188. }
  1189. }
  1190. SWIGRUNTIME void
  1191. SwigPyClientData_Del(SwigPyClientData *data) {
  1192. Py_XDECREF(data->newraw);
  1193. Py_XDECREF(data->newargs);
  1194. Py_XDECREF(data->destroy);
  1195. }
  1196. /* =============== SwigPyObject =====================*/
  1197. typedef struct {
  1198. PyObject_HEAD
  1199. void *ptr;
  1200. swig_type_info *ty;
  1201. int own;
  1202. PyObject *next;
  1203. #ifdef SWIGPYTHON_BUILTIN
  1204. PyObject *dict;
  1205. #endif
  1206. } SwigPyObject;
  1207. #ifdef SWIGPYTHON_BUILTIN
  1208. SWIGRUNTIME PyObject *
  1209. SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
  1210. {
  1211. SwigPyObject *sobj = (SwigPyObject *)v;
  1212. if (!sobj->dict)
  1213. sobj->dict = PyDict_New();
  1214. Py_INCREF(sobj->dict);
  1215. return sobj->dict;
  1216. }
  1217. #endif
  1218. SWIGRUNTIME PyObject *
  1219. SwigPyObject_long(SwigPyObject *v)
  1220. {
  1221. return PyLong_FromVoidPtr(v->ptr);
  1222. }
  1223. SWIGRUNTIME PyObject *
  1224. SwigPyObject_format(const char* fmt, SwigPyObject *v)
  1225. {
  1226. PyObject *res = NULL;
  1227. PyObject *args = PyTuple_New(1);
  1228. if (args) {
  1229. if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
  1230. PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
  1231. if (ofmt) {
  1232. #if PY_VERSION_HEX >= 0x03000000
  1233. res = PyUnicode_Format(ofmt,args);
  1234. #else
  1235. res = PyString_Format(ofmt,args);
  1236. #endif
  1237. Py_DECREF(ofmt);
  1238. }
  1239. Py_DECREF(args);
  1240. }
  1241. }
  1242. return res;
  1243. }
  1244. SWIGRUNTIME PyObject *
  1245. SwigPyObject_oct(SwigPyObject *v)
  1246. {
  1247. return SwigPyObject_format("%o",v);
  1248. }
  1249. SWIGRUNTIME PyObject *
  1250. SwigPyObject_hex(SwigPyObject *v)
  1251. {
  1252. return SwigPyObject_format("%x",v);
  1253. }
  1254. SWIGRUNTIME PyObject *
  1255. SwigPyObject_repr(SwigPyObject *v)
  1256. {
  1257. const char *name = SWIG_TypePrettyName(v->ty);
  1258. PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
  1259. if (v->next) {
  1260. PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
  1261. # if PY_VERSION_HEX >= 0x03000000
  1262. PyObject *joined = PyUnicode_Concat(repr, nrep);
  1263. Py_DecRef(repr);
  1264. Py_DecRef(nrep);
  1265. repr = joined;
  1266. # else
  1267. PyString_ConcatAndDel(&repr,nrep);
  1268. # endif
  1269. }
  1270. return repr;
  1271. }
  1272. /* We need a version taking two PyObject* parameters so it's a valid
  1273. * PyCFunction to use in swigobject_methods[]. */
  1274. SWIGRUNTIME PyObject *
  1275. SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
  1276. {
  1277. return SwigPyObject_repr((SwigPyObject*)v);
  1278. }
  1279. SWIGRUNTIME int
  1280. SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
  1281. {
  1282. void *i = v->ptr;
  1283. void *j = w->ptr;
  1284. return (i < j) ? -1 : ((i > j) ? 1 : 0);
  1285. }
  1286. /* Added for Python 3.x, would it also be useful for Python 2.x? */
  1287. SWIGRUNTIME PyObject*
  1288. SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
  1289. {
  1290. PyObject* res;
  1291. if( op != Py_EQ && op != Py_NE ) {
  1292. Py_INCREF(Py_NotImplemented);
  1293. return Py_NotImplemented;
  1294. }
  1295. res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
  1296. return res;
  1297. }
  1298. SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
  1299. #ifdef SWIGPYTHON_BUILTIN
  1300. static swig_type_info *SwigPyObject_stype = 0;
  1301. SWIGRUNTIME PyTypeObject*
  1302. SwigPyObject_type(void) {
  1303. SwigPyClientData *cd;
  1304. assert(SwigPyObject_stype);
  1305. cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  1306. assert(cd);
  1307. assert(cd->pytype);
  1308. return cd->pytype;
  1309. }
  1310. #else
  1311. SWIGRUNTIME PyTypeObject*
  1312. SwigPyObject_type(void) {
  1313. static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
  1314. return type;
  1315. }
  1316. #endif
  1317. SWIGRUNTIMEINLINE int
  1318. SwigPyObject_Check(PyObject *op) {
  1319. #ifdef SWIGPYTHON_BUILTIN
  1320. PyTypeObject *target_tp = SwigPyObject_type();
  1321. if (PyType_IsSubtype(op->ob_type, target_tp))
  1322. return 1;
  1323. return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
  1324. #else
  1325. return (Py_TYPE(op) == SwigPyObject_type())
  1326. || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
  1327. #endif
  1328. }
  1329. SWIGRUNTIME PyObject *
  1330. SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
  1331. SWIGRUNTIME void
  1332. SwigPyObject_dealloc(PyObject *v)
  1333. {
  1334. SwigPyObject *sobj = (SwigPyObject *) v;
  1335. PyObject *next = sobj->next;
  1336. if (sobj->own == SWIG_POINTER_OWN) {
  1337. swig_type_info *ty = sobj->ty;
  1338. SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
  1339. PyObject *destroy = data ? data->destroy : 0;
  1340. if (destroy) {
  1341. /* destroy is always a VARARGS method */
  1342. PyObject *res;
  1343. /* PyObject_CallFunction() has the potential to silently drop
  1344. the active exception. In cases of unnamed temporary
  1345. variable or where we just finished iterating over a generator
  1346. StopIteration will be active right now, and this needs to
  1347. remain true upon return from SwigPyObject_dealloc. So save
  1348. and restore. */
  1349. PyObject *type = NULL, *value = NULL, *traceback = NULL;
  1350. PyErr_Fetch(&type, &value, &traceback);
  1351. if (data->delargs) {
  1352. /* we need to create a temporary object to carry the destroy operation */
  1353. PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
  1354. res = SWIG_Python_CallFunctor(destroy, tmp);
  1355. Py_DECREF(tmp);
  1356. } else {
  1357. PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
  1358. PyObject *mself = PyCFunction_GET_SELF(destroy);
  1359. res = ((*meth)(mself, v));
  1360. }
  1361. if (!res)
  1362. PyErr_WriteUnraisable(destroy);
  1363. PyErr_Restore(type, value, traceback);
  1364. Py_XDECREF(res);
  1365. }
  1366. #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
  1367. else {
  1368. const char *name = SWIG_TypePrettyName(ty);
  1369. printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
  1370. }
  1371. #endif
  1372. }
  1373. Py_XDECREF(next);
  1374. PyObject_DEL(v);
  1375. }
  1376. SWIGRUNTIME PyObject*
  1377. SwigPyObject_append(PyObject* v, PyObject* next)
  1378. {
  1379. SwigPyObject *sobj = (SwigPyObject *) v;
  1380. if (!SwigPyObject_Check(next)) {
  1381. PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
  1382. return NULL;
  1383. }
  1384. sobj->next = next;
  1385. Py_INCREF(next);
  1386. return SWIG_Py_Void();
  1387. }
  1388. SWIGRUNTIME PyObject*
  1389. SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  1390. {
  1391. SwigPyObject *sobj = (SwigPyObject *) v;
  1392. if (sobj->next) {
  1393. Py_INCREF(sobj->next);
  1394. return sobj->next;
  1395. } else {
  1396. return SWIG_Py_Void();
  1397. }
  1398. }
  1399. SWIGINTERN PyObject*
  1400. SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  1401. {
  1402. SwigPyObject *sobj = (SwigPyObject *)v;
  1403. sobj->own = 0;
  1404. return SWIG_Py_Void();
  1405. }
  1406. SWIGINTERN PyObject*
  1407. SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
  1408. {
  1409. SwigPyObject *sobj = (SwigPyObject *)v;
  1410. sobj->own = SWIG_POINTER_OWN;
  1411. return SWIG_Py_Void();
  1412. }
  1413. SWIGINTERN PyObject*
  1414. SwigPyObject_own(PyObject *v, PyObject *args)
  1415. {
  1416. PyObject *val = 0;
  1417. if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
  1418. return NULL;
  1419. } else {
  1420. SwigPyObject *sobj = (SwigPyObject *)v;
  1421. PyObject *obj = PyBool_FromLong(sobj->own);
  1422. if (val) {
  1423. if (PyObject_IsTrue(val)) {
  1424. SwigPyObject_acquire(v,args);
  1425. } else {
  1426. SwigPyObject_disown(v,args);
  1427. }
  1428. }
  1429. return obj;
  1430. }
  1431. }
  1432. static PyMethodDef
  1433. swigobject_methods[] = {
  1434. {"disown", SwigPyObject_disown, METH_NOARGS, "releases ownership of the pointer"},
  1435. {"acquire", SwigPyObject_acquire, METH_NOARGS, "acquires ownership of the pointer"},
  1436. {"own", SwigPyObject_own, METH_VARARGS, "returns/sets ownership of the pointer"},
  1437. {"append", SwigPyObject_append, METH_O, "appends another 'this' object"},
  1438. {"next", SwigPyObject_next, METH_NOARGS, "returns the next 'this' object"},
  1439. {"__repr__",SwigPyObject_repr2, METH_NOARGS, "returns object representation"},
  1440. {0, 0, 0, 0}
  1441. };
  1442. SWIGRUNTIME PyTypeObject*
  1443. SwigPyObject_TypeOnce(void) {
  1444. static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
  1445. static PyNumberMethods SwigPyObject_as_number = {
  1446. (binaryfunc)0, /*nb_add*/
  1447. (binaryfunc)0, /*nb_subtract*/
  1448. (binaryfunc)0, /*nb_multiply*/
  1449. /* nb_divide removed in Python 3 */
  1450. #if PY_VERSION_HEX < 0x03000000
  1451. (binaryfunc)0, /*nb_divide*/
  1452. #endif
  1453. (binaryfunc)0, /*nb_remainder*/
  1454. (binaryfunc)0, /*nb_divmod*/
  1455. (ternaryfunc)0,/*nb_power*/
  1456. (unaryfunc)0, /*nb_negative*/
  1457. (unaryfunc)0, /*nb_positive*/
  1458. (unaryfunc)0, /*nb_absolute*/
  1459. (inquiry)0, /*nb_nonzero*/
  1460. 0, /*nb_invert*/
  1461. 0, /*nb_lshift*/
  1462. 0, /*nb_rshift*/
  1463. 0, /*nb_and*/
  1464. 0, /*nb_xor*/
  1465. 0, /*nb_or*/
  1466. #if PY_VERSION_HEX < 0x03000000
  1467. 0, /*nb_coerce*/
  1468. #endif
  1469. (unaryfunc)SwigPyObject_long, /*nb_int*/
  1470. #if PY_VERSION_HEX < 0x03000000
  1471. (unaryfunc)SwigPyObject_long, /*nb_long*/
  1472. #else
  1473. 0, /*nb_reserved*/
  1474. #endif
  1475. (unaryfunc)0, /*nb_float*/
  1476. #if PY_VERSION_HEX < 0x03000000
  1477. (unaryfunc)SwigPyObject_oct, /*nb_oct*/
  1478. (unaryfunc)SwigPyObject_hex, /*nb_hex*/
  1479. #endif
  1480. #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
  1481. 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
  1482. #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
  1483. 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
  1484. #else
  1485. 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
  1486. #endif
  1487. };
  1488. static PyTypeObject swigpyobject_type;
  1489. static int type_init = 0;
  1490. if (!type_init) {
  1491. const PyTypeObject tmp = {
  1492. #if PY_VERSION_HEX >= 0x03000000
  1493. PyVarObject_HEAD_INIT(NULL, 0)
  1494. #else
  1495. PyObject_HEAD_INIT(NULL)
  1496. 0, /* ob_size */
  1497. #endif
  1498. "SwigPyObject", /* tp_name */
  1499. sizeof(SwigPyObject), /* tp_basicsize */
  1500. 0, /* tp_itemsize */
  1501. (destructor)SwigPyObject_dealloc, /* tp_dealloc */
  1502. 0, /* tp_print */
  1503. (getattrfunc)0, /* tp_getattr */
  1504. (setattrfunc)0, /* tp_setattr */
  1505. #if PY_VERSION_HEX >= 0x03000000
  1506. 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
  1507. #else
  1508. (cmpfunc)SwigPyObject_compare, /* tp_compare */
  1509. #endif
  1510. (reprfunc)SwigPyObject_repr, /* tp_repr */
  1511. &SwigPyObject_as_number, /* tp_as_number */
  1512. 0, /* tp_as_sequence */
  1513. 0, /* tp_as_mapping */
  1514. (hashfunc)0, /* tp_hash */
  1515. (ternaryfunc)0, /* tp_call */
  1516. 0, /* tp_str */
  1517. PyObject_GenericGetAttr, /* tp_getattro */
  1518. 0, /* tp_setattro */
  1519. 0, /* tp_as_buffer */
  1520. Py_TPFLAGS_DEFAULT, /* tp_flags */
  1521. swigobject_doc, /* tp_doc */
  1522. 0, /* tp_traverse */
  1523. 0, /* tp_clear */
  1524. (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
  1525. 0, /* tp_weaklistoffset */
  1526. 0, /* tp_iter */
  1527. 0, /* tp_iternext */
  1528. swigobject_methods, /* tp_methods */
  1529. 0, /* tp_members */
  1530. 0, /* tp_getset */
  1531. 0, /* tp_base */
  1532. 0, /* tp_dict */
  1533. 0, /* tp_descr_get */
  1534. 0, /* tp_descr_set */
  1535. 0, /* tp_dictoffset */
  1536. 0, /* tp_init */
  1537. 0, /* tp_alloc */
  1538. 0, /* tp_new */
  1539. 0, /* tp_free */
  1540. 0, /* tp_is_gc */
  1541. 0, /* tp_bases */
  1542. 0, /* tp_mro */
  1543. 0, /* tp_cache */
  1544. 0, /* tp_subclasses */
  1545. 0, /* tp_weaklist */
  1546. 0, /* tp_del */
  1547. 0, /* tp_version_tag */
  1548. #if PY_VERSION_HEX >= 0x03040000
  1549. 0, /* tp_finalize */
  1550. #endif
  1551. #if PY_VERSION_HEX >= 0x03080000
  1552. 0, /* tp_vectorcall */
  1553. #endif
  1554. #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
  1555. 0, /* tp_print */
  1556. #endif
  1557. #ifdef COUNT_ALLOCS
  1558. 0, /* tp_allocs */
  1559. 0, /* tp_frees */
  1560. 0, /* tp_maxalloc */
  1561. 0, /* tp_prev */
  1562. 0 /* tp_next */
  1563. #endif
  1564. };
  1565. swigpyobject_type = tmp;
  1566. type_init = 1;
  1567. if (PyType_Ready(&swigpyobject_type) < 0)
  1568. return NULL;
  1569. }
  1570. return &swigpyobject_type;
  1571. }
  1572. SWIGRUNTIME PyObject *
  1573. SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
  1574. {
  1575. SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
  1576. if (sobj) {
  1577. sobj->ptr = ptr;
  1578. sobj->ty = ty;
  1579. sobj->own = own;
  1580. sobj->next = 0;
  1581. }
  1582. return (PyObject *)sobj;
  1583. }
  1584. /* -----------------------------------------------------------------------------
  1585. * Implements a simple Swig Packed type, and use it instead of string
  1586. * ----------------------------------------------------------------------------- */
  1587. typedef struct {
  1588. PyObject_HEAD
  1589. void *pack;
  1590. swig_type_info *ty;
  1591. size_t size;
  1592. } SwigPyPacked;
  1593. SWIGRUNTIME PyObject *
  1594. SwigPyPacked_repr(SwigPyPacked *v)
  1595. {
  1596. char result[SWIG_BUFFER_SIZE];
  1597. if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
  1598. return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
  1599. } else {
  1600. return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
  1601. }
  1602. }
  1603. SWIGRUNTIME PyObject *
  1604. SwigPyPacked_str(SwigPyPacked *v)
  1605. {
  1606. char result[SWIG_BUFFER_SIZE];
  1607. if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
  1608. return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
  1609. } else {
  1610. return SWIG_Python_str_FromChar(v->ty->name);
  1611. }
  1612. }
  1613. SWIGRUNTIME int
  1614. SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
  1615. {
  1616. size_t i = v->size;
  1617. size_t j = w->size;
  1618. int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
  1619. return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size);
  1620. }
  1621. SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
  1622. SWIGRUNTIME PyTypeObject*
  1623. SwigPyPacked_type(void) {
  1624. static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
  1625. return type;
  1626. }
  1627. SWIGRUNTIMEINLINE int
  1628. SwigPyPacked_Check(PyObject *op) {
  1629. return ((op)->ob_type == SwigPyPacked_TypeOnce())
  1630. || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
  1631. }
  1632. SWIGRUNTIME void
  1633. SwigPyPacked_dealloc(PyObject *v)
  1634. {
  1635. if (SwigPyPacked_Check(v)) {
  1636. SwigPyPacked *sobj = (SwigPyPacked *) v;
  1637. free(sobj->pack);
  1638. }
  1639. PyObject_DEL(v);
  1640. }
  1641. SWIGRUNTIME PyTypeObject*
  1642. SwigPyPacked_TypeOnce(void) {
  1643. static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
  1644. static PyTypeObject swigpypacked_type;
  1645. static int type_init = 0;
  1646. if (!type_init) {
  1647. const PyTypeObject tmp = {
  1648. #if PY_VERSION_HEX>=0x03000000
  1649. PyVarObject_HEAD_INIT(NULL, 0)
  1650. #else
  1651. PyObject_HEAD_INIT(NULL)
  1652. 0, /* ob_size */
  1653. #endif
  1654. "SwigPyPacked", /* tp_name */
  1655. sizeof(SwigPyPacked), /* tp_basicsize */
  1656. 0, /* tp_itemsize */
  1657. (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
  1658. 0, /* tp_print */
  1659. (getattrfunc)0, /* tp_getattr */
  1660. (setattrfunc)0, /* tp_setattr */
  1661. #if PY_VERSION_HEX>=0x03000000
  1662. 0, /* tp_reserved in 3.0.1 */
  1663. #else
  1664. (cmpfunc)SwigPyPacked_compare, /* tp_compare */
  1665. #endif
  1666. (reprfunc)SwigPyPacked_repr, /* tp_repr */
  1667. 0, /* tp_as_number */
  1668. 0, /* tp_as_sequence */
  1669. 0, /* tp_as_mapping */
  1670. (hashfunc)0, /* tp_hash */
  1671. (ternaryfunc)0, /* tp_call */
  1672. (reprfunc)SwigPyPacked_str, /* tp_str */
  1673. PyObject_GenericGetAttr, /* tp_getattro */
  1674. 0, /* tp_setattro */
  1675. 0, /* tp_as_buffer */
  1676. Py_TPFLAGS_DEFAULT, /* tp_flags */
  1677. swigpacked_doc, /* tp_doc */
  1678. 0, /* tp_traverse */
  1679. 0, /* tp_clear */
  1680. 0, /* tp_richcompare */
  1681. 0, /* tp_weaklistoffset */
  1682. 0, /* tp_iter */
  1683. 0, /* tp_iternext */
  1684. 0, /* tp_methods */
  1685. 0, /* tp_members */
  1686. 0, /* tp_getset */
  1687. 0, /* tp_base */
  1688. 0, /* tp_dict */
  1689. 0, /* tp_descr_get */
  1690. 0, /* tp_descr_set */
  1691. 0, /* tp_dictoffset */
  1692. 0, /* tp_init */
  1693. 0, /* tp_alloc */
  1694. 0, /* tp_new */
  1695. 0, /* tp_free */
  1696. 0, /* tp_is_gc */
  1697. 0, /* tp_bases */
  1698. 0, /* tp_mro */
  1699. 0, /* tp_cache */
  1700. 0, /* tp_subclasses */
  1701. 0, /* tp_weaklist */
  1702. 0, /* tp_del */
  1703. 0, /* tp_version_tag */
  1704. #if PY_VERSION_HEX >= 0x03040000
  1705. 0, /* tp_finalize */
  1706. #endif
  1707. #if PY_VERSION_HEX >= 0x03080000
  1708. 0, /* tp_vectorcall */
  1709. #endif
  1710. #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
  1711. 0, /* tp_print */
  1712. #endif
  1713. #ifdef COUNT_ALLOCS
  1714. 0, /* tp_allocs */
  1715. 0, /* tp_frees */
  1716. 0, /* tp_maxalloc */
  1717. 0, /* tp_prev */
  1718. 0 /* tp_next */
  1719. #endif
  1720. };
  1721. swigpypacked_type = tmp;
  1722. type_init = 1;
  1723. if (PyType_Ready(&swigpypacked_type) < 0)
  1724. return NULL;
  1725. }
  1726. return &swigpypacked_type;
  1727. }
  1728. SWIGRUNTIME PyObject *
  1729. SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
  1730. {
  1731. SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
  1732. if (sobj) {
  1733. void *pack = malloc(size);
  1734. if (pack) {
  1735. memcpy(pack, ptr, size);
  1736. sobj->pack = pack;
  1737. sobj->ty = ty;
  1738. sobj->size = size;
  1739. } else {
  1740. PyObject_DEL((PyObject *) sobj);
  1741. sobj = 0;
  1742. }
  1743. }
  1744. return (PyObject *) sobj;
  1745. }
  1746. SWIGRUNTIME swig_type_info *
  1747. SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
  1748. {
  1749. if (SwigPyPacked_Check(obj)) {
  1750. SwigPyPacked *sobj = (SwigPyPacked *)obj;
  1751. if (sobj->size != size) return 0;
  1752. memcpy(ptr, sobj->pack, size);
  1753. return sobj->ty;
  1754. } else {
  1755. return 0;
  1756. }
  1757. }
  1758. /* -----------------------------------------------------------------------------
  1759. * pointers/data manipulation
  1760. * ----------------------------------------------------------------------------- */
  1761. static PyObject *Swig_This_global = NULL;
  1762. SWIGRUNTIME PyObject *
  1763. SWIG_This(void)
  1764. {
  1765. if (Swig_This_global == NULL)
  1766. Swig_This_global = SWIG_Python_str_FromChar("this");
  1767. return Swig_This_global;
  1768. }
  1769. /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
  1770. /* TODO: I don't know how to implement the fast getset in Python 3 right now */
  1771. #if PY_VERSION_HEX>=0x03000000
  1772. #define SWIG_PYTHON_SLOW_GETSET_THIS
  1773. #endif
  1774. SWIGRUNTIME SwigPyObject *
  1775. SWIG_Python_GetSwigThis(PyObject *pyobj)
  1776. {
  1777. PyObject *obj;
  1778. if (SwigPyObject_Check(pyobj))
  1779. return (SwigPyObject *) pyobj;
  1780. #ifdef SWIGPYTHON_BUILTIN
  1781. (void)obj;
  1782. # ifdef PyWeakref_CheckProxy
  1783. if (PyWeakref_CheckProxy(pyobj)) {
  1784. pyobj = PyWeakref_GET_OBJECT(pyobj);
  1785. if (pyobj && SwigPyObject_Check(pyobj))
  1786. return (SwigPyObject*) pyobj;
  1787. }
  1788. # endif
  1789. return NULL;
  1790. #else
  1791. obj = 0;
  1792. #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  1793. if (PyInstance_Check(pyobj)) {
  1794. obj = _PyInstance_Lookup(pyobj, SWIG_This());
  1795. } else {
  1796. PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
  1797. if (dictptr != NULL) {
  1798. PyObject *dict = *dictptr;
  1799. obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
  1800. } else {
  1801. #ifdef PyWeakref_CheckProxy
  1802. if (PyWeakref_CheckProxy(pyobj)) {
  1803. PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
  1804. return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
  1805. }
  1806. #endif
  1807. obj = PyObject_GetAttr(pyobj,SWIG_This());
  1808. if (obj) {
  1809. Py_DECREF(obj);
  1810. } else {
  1811. if (PyErr_Occurred()) PyErr_Clear();
  1812. return 0;
  1813. }
  1814. }
  1815. }
  1816. #else
  1817. obj = PyObject_GetAttr(pyobj,SWIG_This());
  1818. if (obj) {
  1819. Py_DECREF(obj);
  1820. } else {
  1821. if (PyErr_Occurred()) PyErr_Clear();
  1822. return 0;
  1823. }
  1824. #endif
  1825. if (obj && !SwigPyObject_Check(obj)) {
  1826. /* a PyObject is called 'this', try to get the 'real this'
  1827. SwigPyObject from it */
  1828. return SWIG_Python_GetSwigThis(obj);
  1829. }
  1830. return (SwigPyObject *)obj;
  1831. #endif
  1832. }
  1833. /* Acquire a pointer value */
  1834. SWIGRUNTIME int
  1835. SWIG_Python_AcquirePtr(PyObject *obj, int own) {
  1836. if (own == SWIG_POINTER_OWN) {
  1837. SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
  1838. if (sobj) {
  1839. int oldown = sobj->own;
  1840. sobj->own = own;
  1841. return oldown;
  1842. }
  1843. }
  1844. return 0;
  1845. }
  1846. /* Convert a pointer value */
  1847. SWIGRUNTIME int
  1848. SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
  1849. int res;
  1850. SwigPyObject *sobj;
  1851. int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
  1852. if (!obj)
  1853. return SWIG_ERROR;
  1854. if (obj == Py_None && !implicit_conv) {
  1855. if (ptr)
  1856. *ptr = 0;
  1857. return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
  1858. }
  1859. res = SWIG_ERROR;
  1860. sobj = SWIG_Python_GetSwigThis(obj);
  1861. if (own)
  1862. *own = 0;
  1863. while (sobj) {
  1864. void *vptr = sobj->ptr;
  1865. if (ty) {
  1866. swig_type_info *to = sobj->ty;
  1867. if (to == ty) {
  1868. /* no type cast needed */
  1869. if (ptr) *ptr = vptr;
  1870. break;
  1871. } else {
  1872. swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
  1873. if (!tc) {
  1874. sobj = (SwigPyObject *)sobj->next;
  1875. } else {
  1876. if (ptr) {
  1877. int newmemory = 0;
  1878. *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
  1879. if (newmemory == SWIG_CAST_NEW_MEMORY) {
  1880. assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
  1881. if (own)
  1882. *own = *own | SWIG_CAST_NEW_MEMORY;
  1883. }
  1884. }
  1885. break;
  1886. }
  1887. }
  1888. } else {
  1889. if (ptr) *ptr = vptr;
  1890. break;
  1891. }
  1892. }
  1893. if (sobj) {
  1894. if (own)
  1895. *own = *own | sobj->own;
  1896. if (flags & SWIG_POINTER_DISOWN) {
  1897. sobj->own = 0;
  1898. }
  1899. res = SWIG_OK;
  1900. } else {
  1901. if (implicit_conv) {
  1902. SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
  1903. if (data && !data->implicitconv) {
  1904. PyObject *klass = data->klass;
  1905. if (klass) {
  1906. PyObject *impconv;
  1907. data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
  1908. impconv = SWIG_Python_CallFunctor(klass, obj);
  1909. data->implicitconv = 0;
  1910. if (PyErr_Occurred()) {
  1911. PyErr_Clear();
  1912. impconv = 0;
  1913. }
  1914. if (impconv) {
  1915. SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
  1916. if (iobj) {
  1917. void *vptr;
  1918. res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
  1919. if (SWIG_IsOK(res)) {
  1920. if (ptr) {
  1921. *ptr = vptr;
  1922. /* transfer the ownership to 'ptr' */
  1923. iobj->own = 0;
  1924. res = SWIG_AddCast(res);
  1925. res = SWIG_AddNewMask(res);
  1926. } else {
  1927. res = SWIG_AddCast(res);
  1928. }
  1929. }
  1930. }
  1931. Py_DECREF(impconv);
  1932. }
  1933. }
  1934. }
  1935. if (!SWIG_IsOK(res) && obj == Py_None) {
  1936. if (ptr)
  1937. *ptr = 0;
  1938. if (PyErr_Occurred())
  1939. PyErr_Clear();
  1940. res = SWIG_OK;
  1941. }
  1942. }
  1943. }
  1944. return res;
  1945. }
  1946. /* Convert a function ptr value */
  1947. SWIGRUNTIME int
  1948. SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
  1949. if (!PyCFunction_Check(obj)) {
  1950. return SWIG_ConvertPtr(obj, ptr, ty, 0);
  1951. } else {
  1952. void *vptr = 0;
  1953. swig_cast_info *tc;
  1954. /* here we get the method pointer for callbacks */
  1955. const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
  1956. const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
  1957. if (desc)
  1958. desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
  1959. if (!desc)
  1960. return SWIG_ERROR;
  1961. tc = SWIG_TypeCheck(desc,ty);
  1962. if (tc) {
  1963. int newmemory = 0;
  1964. *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
  1965. assert(!newmemory); /* newmemory handling not yet implemented */
  1966. } else {
  1967. return SWIG_ERROR;
  1968. }
  1969. return SWIG_OK;
  1970. }
  1971. }
  1972. /* Convert a packed pointer value */
  1973. SWIGRUNTIME int
  1974. SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
  1975. swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
  1976. if (!to) return SWIG_ERROR;
  1977. if (ty) {
  1978. if (to != ty) {
  1979. /* check type cast? */
  1980. swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
  1981. if (!tc) return SWIG_ERROR;
  1982. }
  1983. }
  1984. return SWIG_OK;
  1985. }
  1986. /* -----------------------------------------------------------------------------
  1987. * Create a new pointer object
  1988. * ----------------------------------------------------------------------------- */
  1989. /*
  1990. Create a new instance object, without calling __init__, and set the
  1991. 'this' attribute.
  1992. */
  1993. SWIGRUNTIME PyObject*
  1994. SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
  1995. {
  1996. PyObject *inst = 0;
  1997. PyObject *newraw = data->newraw;
  1998. if (newraw) {
  1999. inst = PyObject_Call(newraw, data->newargs, NULL);
  2000. if (inst) {
  2001. #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  2002. PyObject **dictptr = _PyObject_GetDictPtr(inst);
  2003. if (dictptr != NULL) {
  2004. PyObject *dict = *dictptr;
  2005. if (dict == NULL) {
  2006. dict = PyDict_New();
  2007. *dictptr = dict;
  2008. PyDict_SetItem(dict, SWIG_This(), swig_this);
  2009. }
  2010. }
  2011. #else
  2012. if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
  2013. Py_DECREF(inst);
  2014. inst = 0;
  2015. }
  2016. #endif
  2017. }
  2018. } else {
  2019. #if PY_VERSION_HEX >= 0x03000000
  2020. PyObject *empty_args = PyTuple_New(0);
  2021. if (empty_args) {
  2022. PyObject *empty_kwargs = PyDict_New();
  2023. if (empty_kwargs) {
  2024. inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
  2025. Py_DECREF(empty_kwargs);
  2026. if (inst) {
  2027. if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
  2028. Py_DECREF(inst);
  2029. inst = 0;
  2030. } else {
  2031. Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
  2032. }
  2033. }
  2034. }
  2035. Py_DECREF(empty_args);
  2036. }
  2037. #else
  2038. PyObject *dict = PyDict_New();
  2039. if (dict) {
  2040. PyDict_SetItem(dict, SWIG_This(), swig_this);
  2041. inst = PyInstance_NewRaw(data->newargs, dict);
  2042. Py_DECREF(dict);
  2043. }
  2044. #endif
  2045. }
  2046. return inst;
  2047. }
  2048. SWIGRUNTIME int
  2049. SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
  2050. {
  2051. #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  2052. PyObject **dictptr = _PyObject_GetDictPtr(inst);
  2053. if (dictptr != NULL) {
  2054. PyObject *dict = *dictptr;
  2055. if (dict == NULL) {
  2056. dict = PyDict_New();
  2057. *dictptr = dict;
  2058. }
  2059. return PyDict_SetItem(dict, SWIG_This(), swig_this);
  2060. }
  2061. #endif
  2062. return PyObject_SetAttr(inst, SWIG_This(), swig_this);
  2063. }
  2064. SWIGINTERN PyObject *
  2065. SWIG_Python_InitShadowInstance(PyObject *args) {
  2066. PyObject *obj[2];
  2067. if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
  2068. return NULL;
  2069. } else {
  2070. SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
  2071. if (sthis) {
  2072. SwigPyObject_append((PyObject*) sthis, obj[1]);
  2073. } else {
  2074. if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0)
  2075. return NULL;
  2076. }
  2077. return SWIG_Py_Void();
  2078. }
  2079. }
  2080. /* Create a new pointer object */
  2081. SWIGRUNTIME PyObject *
  2082. SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
  2083. SwigPyClientData *clientdata;
  2084. PyObject * robj;
  2085. int own;
  2086. if (!ptr)
  2087. return SWIG_Py_Void();
  2088. clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
  2089. own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
  2090. if (clientdata && clientdata->pytype) {
  2091. SwigPyObject *newobj;
  2092. if (flags & SWIG_BUILTIN_TP_INIT) {
  2093. newobj = (SwigPyObject*) self;
  2094. if (newobj->ptr) {
  2095. PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
  2096. while (newobj->next)
  2097. newobj = (SwigPyObject *) newobj->next;
  2098. newobj->next = next_self;
  2099. newobj = (SwigPyObject *)next_self;
  2100. #ifdef SWIGPYTHON_BUILTIN
  2101. newobj->dict = 0;
  2102. #endif
  2103. }
  2104. } else {
  2105. newobj = PyObject_New(SwigPyObject, clientdata->pytype);
  2106. #ifdef SWIGPYTHON_BUILTIN
  2107. newobj->dict = 0;
  2108. #endif
  2109. }
  2110. if (newobj) {
  2111. newobj->ptr = ptr;
  2112. newobj->ty = type;
  2113. newobj->own = own;
  2114. newobj->next = 0;
  2115. return (PyObject*) newobj;
  2116. }
  2117. return SWIG_Py_Void();
  2118. }
  2119. assert(!(flags & SWIG_BUILTIN_TP_INIT));
  2120. robj = SwigPyObject_New(ptr, type, own);
  2121. if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
  2122. PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
  2123. Py_DECREF(robj);
  2124. robj = inst;
  2125. }
  2126. return robj;
  2127. }
  2128. /* Create a new packed object */
  2129. SWIGRUNTIMEINLINE PyObject *
  2130. SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
  2131. return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
  2132. }
  2133. /* -----------------------------------------------------------------------------*
  2134. * Get type list
  2135. * -----------------------------------------------------------------------------*/
  2136. #ifdef SWIG_LINK_RUNTIME
  2137. void *SWIG_ReturnGlobalTypeList(void *);
  2138. #endif
  2139. SWIGRUNTIME swig_module_info *
  2140. SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
  2141. static void *type_pointer = (void *)0;
  2142. /* first check if module already created */
  2143. if (!type_pointer) {
  2144. #ifdef SWIG_LINK_RUNTIME
  2145. type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
  2146. #else
  2147. type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
  2148. if (PyErr_Occurred()) {
  2149. PyErr_Clear();
  2150. type_pointer = (void *)0;
  2151. }
  2152. #endif
  2153. }
  2154. return (swig_module_info *) type_pointer;
  2155. }
  2156. SWIGRUNTIME void
  2157. SWIG_Python_DestroyModule(PyObject *obj)
  2158. {
  2159. swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
  2160. swig_type_info **types = swig_module->types;
  2161. size_t i;
  2162. for (i =0; i < swig_module->size; ++i) {
  2163. swig_type_info *ty = types[i];
  2164. if (ty->owndata) {
  2165. SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
  2166. if (data) SwigPyClientData_Del(data);
  2167. }
  2168. }
  2169. Py_DECREF(SWIG_This());
  2170. Swig_This_global = NULL;
  2171. }
  2172. SWIGRUNTIME void
  2173. SWIG_Python_SetModule(swig_module_info *swig_module) {
  2174. #if PY_VERSION_HEX >= 0x03000000
  2175. /* Add a dummy module object into sys.modules */
  2176. PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
  2177. #else
  2178. static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
  2179. PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
  2180. #endif
  2181. PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
  2182. if (pointer && module) {
  2183. PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
  2184. } else {
  2185. Py_XDECREF(pointer);
  2186. }
  2187. }
  2188. /* The python cached type query */
  2189. SWIGRUNTIME PyObject *
  2190. SWIG_Python_TypeCache(void) {
  2191. static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
  2192. return cache;
  2193. }
  2194. SWIGRUNTIME swig_type_info *
  2195. SWIG_Python_TypeQuery(const char *type)
  2196. {
  2197. PyObject *cache = SWIG_Python_TypeCache();
  2198. PyObject *key = SWIG_Python_str_FromChar(type);
  2199. PyObject *obj = PyDict_GetItem(cache, key);
  2200. swig_type_info *descriptor;
  2201. if (obj) {
  2202. descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
  2203. } else {
  2204. swig_module_info *swig_module = SWIG_GetModule(0);
  2205. descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
  2206. if (descriptor) {
  2207. obj = PyCapsule_New((void*) descriptor, NULL, NULL);
  2208. PyDict_SetItem(cache, key, obj);
  2209. Py_DECREF(obj);
  2210. }
  2211. }
  2212. Py_DECREF(key);
  2213. return descriptor;
  2214. }
  2215. /*
  2216. For backward compatibility only
  2217. */
  2218. #define SWIG_POINTER_EXCEPTION 0
  2219. #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
  2220. #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
  2221. SWIGRUNTIME int
  2222. SWIG_Python_AddErrMesg(const char* mesg, int infront)
  2223. {
  2224. if (PyErr_Occurred()) {
  2225. PyObject *type = 0;
  2226. PyObject *value = 0;
  2227. PyObject *traceback = 0;
  2228. PyErr_Fetch(&type, &value, &traceback);
  2229. if (value) {
  2230. PyObject *old_str = PyObject_Str(value);
  2231. const char *tmp = SWIG_Python_str_AsChar(old_str);
  2232. const char *errmesg = tmp ? tmp : "Invalid error message";
  2233. Py_XINCREF(type);
  2234. PyErr_Clear();
  2235. if (infront) {
  2236. PyErr_Format(type, "%s %s", mesg, errmesg);
  2237. } else {
  2238. PyErr_Format(type, "%s %s", errmesg, mesg);
  2239. }
  2240. SWIG_Python_str_DelForPy3(tmp);
  2241. Py_DECREF(old_str);
  2242. }
  2243. return 1;
  2244. } else {
  2245. return 0;
  2246. }
  2247. }
  2248. SWIGRUNTIME int
  2249. SWIG_Python_ArgFail(int argnum)
  2250. {
  2251. if (PyErr_Occurred()) {
  2252. /* add information about failing argument */
  2253. char mesg[256];
  2254. PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
  2255. return SWIG_Python_AddErrMesg(mesg, 1);
  2256. } else {
  2257. return 0;
  2258. }
  2259. }
  2260. SWIGRUNTIMEINLINE const char *
  2261. SwigPyObject_GetDesc(PyObject *self)
  2262. {
  2263. SwigPyObject *v = (SwigPyObject *)self;
  2264. swig_type_info *ty = v ? v->ty : 0;
  2265. return ty ? ty->str : "";
  2266. }
  2267. SWIGRUNTIME void
  2268. SWIG_Python_TypeError(const char *type, PyObject *obj)
  2269. {
  2270. if (type) {
  2271. #if defined(SWIG_COBJECT_TYPES)
  2272. if (obj && SwigPyObject_Check(obj)) {
  2273. const char *otype = (const char *) SwigPyObject_GetDesc(obj);
  2274. if (otype) {
  2275. PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
  2276. type, otype);
  2277. return;
  2278. }
  2279. } else
  2280. #endif
  2281. {
  2282. const char *otype = (obj ? obj->ob_type->tp_name : 0);
  2283. if (otype) {
  2284. PyObject *str = PyObject_Str(obj);
  2285. const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
  2286. if (cstr) {
  2287. PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
  2288. type, otype, cstr);
  2289. SWIG_Python_str_DelForPy3(cstr);
  2290. } else {
  2291. PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
  2292. type, otype);
  2293. }
  2294. Py_XDECREF(str);
  2295. return;
  2296. }
  2297. }
  2298. PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
  2299. } else {
  2300. PyErr_Format(PyExc_TypeError, "unexpected type is received");
  2301. }
  2302. }
  2303. /* Convert a pointer value, signal an exception on a type mismatch */
  2304. SWIGRUNTIME void *
  2305. SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
  2306. void *result;
  2307. if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
  2308. PyErr_Clear();
  2309. #if SWIG_POINTER_EXCEPTION
  2310. if (flags) {
  2311. SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
  2312. SWIG_Python_ArgFail(argnum);
  2313. }
  2314. #endif
  2315. }
  2316. return result;
  2317. }
  2318. #ifdef SWIGPYTHON_BUILTIN
  2319. SWIGRUNTIME int
  2320. SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
  2321. PyTypeObject *tp = obj->ob_type;
  2322. PyObject *descr;
  2323. PyObject *encoded_name;
  2324. descrsetfunc f;
  2325. int res = -1;
  2326. # ifdef Py_USING_UNICODE
  2327. if (PyString_Check(name)) {
  2328. name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
  2329. if (!name)
  2330. return -1;
  2331. } else if (!PyUnicode_Check(name))
  2332. # else
  2333. if (!PyString_Check(name))
  2334. # endif
  2335. {
  2336. PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
  2337. return -1;
  2338. } else {
  2339. Py_INCREF(name);
  2340. }
  2341. if (!tp->tp_dict) {
  2342. if (PyType_Ready(tp) < 0)
  2343. goto done;
  2344. }
  2345. descr = _PyType_Lookup(tp, name);
  2346. f = NULL;
  2347. if (descr != NULL)
  2348. f = descr->ob_type->tp_descr_set;
  2349. if (!f) {
  2350. if (PyString_Check(name)) {
  2351. encoded_name = name;
  2352. Py_INCREF(name);
  2353. } else {
  2354. encoded_name = PyUnicode_AsUTF8String(name);
  2355. if (!encoded_name)
  2356. return -1;
  2357. }
  2358. PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
  2359. Py_DECREF(encoded_name);
  2360. } else {
  2361. res = f(descr, obj, value);
  2362. }
  2363. done:
  2364. Py_DECREF(name);
  2365. return res;
  2366. }
  2367. #endif
  2368. #ifdef __cplusplus
  2369. }
  2370. #endif
  2371. #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
  2372. #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
  2373. #ifdef __cplusplus
  2374. extern "C" {
  2375. #endif
  2376. /* Method creation and docstring support functions */
  2377. SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name);
  2378. SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
  2379. SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
  2380. #ifdef __cplusplus
  2381. }
  2382. #endif
  2383. /* -------- TYPES TABLE (BEGIN) -------- */
  2384. #define SWIGTYPE_p_archive swig_types[0]
  2385. #define SWIGTYPE_p_archive_close_callback swig_types[1]
  2386. #define SWIGTYPE_p_archive_entry swig_types[2]
  2387. #define SWIGTYPE_p_archive_open_callback swig_types[3]
  2388. #define SWIGTYPE_p_archive_write_callback swig_types[4]
  2389. #define SWIGTYPE_p_char swig_types[5]
  2390. #define SWIGTYPE_p_int64_t swig_types[6]
  2391. #define SWIGTYPE_p_size_t swig_types[7]
  2392. #define SWIGTYPE_p_stat swig_types[8]
  2393. #define SWIGTYPE_p_time_t swig_types[9]
  2394. #define SWIGTYPE_p_unsigned_short swig_types[10]
  2395. #define SWIGTYPE_p_wchar_t swig_types[11]
  2396. static swig_type_info *swig_types[13];
  2397. static swig_module_info swig_module = {swig_types, 12, 0, 0, 0, 0};
  2398. #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
  2399. #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
  2400. /* -------- TYPES TABLE (END) -------- */
  2401. #ifdef SWIG_TypeQuery
  2402. # undef SWIG_TypeQuery
  2403. #endif
  2404. #define SWIG_TypeQuery SWIG_Python_TypeQuery
  2405. /*-----------------------------------------------
  2406. @(target):= __libarchive.so
  2407. ------------------------------------------------*/
  2408. #if PY_VERSION_HEX >= 0x03000000
  2409. # define SWIG_init PyInit___libarchive
  2410. #else
  2411. # define SWIG_init init__libarchive
  2412. #endif
  2413. #define SWIG_name "__libarchive"
  2414. #define SWIGVERSION 0x040002
  2415. #define SWIG_VERSION SWIGVERSION
  2416. #define SWIG_as_voidptr(a) (void *)((const void *)(a))
  2417. #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
  2418. #include <archive.h>
  2419. #include <archive_entry.h>
  2420. SWIGINTERNINLINE PyObject*
  2421. SWIG_From_int (int value)
  2422. {
  2423. return PyInt_FromLong((long) value);
  2424. }
  2425. SWIGINTERN swig_type_info*
  2426. SWIG_pchar_descriptor(void)
  2427. {
  2428. static int init = 0;
  2429. static swig_type_info* info = 0;
  2430. if (!init) {
  2431. info = SWIG_TypeQuery("_p_char");
  2432. init = 1;
  2433. }
  2434. return info;
  2435. }
  2436. SWIGINTERN int
  2437. SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
  2438. {
  2439. #if PY_VERSION_HEX>=0x03000000
  2440. #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
  2441. if (PyBytes_Check(obj))
  2442. #else
  2443. if (PyUnicode_Check(obj))
  2444. #endif
  2445. #else
  2446. if (PyString_Check(obj))
  2447. #endif
  2448. {
  2449. char *cstr; Py_ssize_t len;
  2450. int ret = SWIG_OK;
  2451. #if PY_VERSION_HEX>=0x03000000
  2452. #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
  2453. if (!alloc && cptr) {
  2454. /* We can't allow converting without allocation, since the internal
  2455. representation of string in Python 3 is UCS-2/UCS-4 but we require
  2456. a UTF-8 representation.
  2457. TODO(bhy) More detailed explanation */
  2458. return SWIG_RuntimeError;
  2459. }
  2460. obj = PyUnicode_AsUTF8String(obj);
  2461. if (!obj)
  2462. return SWIG_TypeError;
  2463. if (alloc)
  2464. *alloc = SWIG_NEWOBJ;
  2465. #endif
  2466. if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
  2467. return SWIG_TypeError;
  2468. #else
  2469. if (PyString_AsStringAndSize(obj, &cstr, &len) == -1)
  2470. return SWIG_TypeError;
  2471. #endif
  2472. if (cptr) {
  2473. if (alloc) {
  2474. if (*alloc == SWIG_NEWOBJ) {
  2475. *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
  2476. *alloc = SWIG_NEWOBJ;
  2477. } else {
  2478. *cptr = cstr;
  2479. *alloc = SWIG_OLDOBJ;
  2480. }
  2481. } else {
  2482. #if PY_VERSION_HEX>=0x03000000
  2483. #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
  2484. *cptr = PyBytes_AsString(obj);
  2485. #else
  2486. assert(0); /* Should never reach here with Unicode strings in Python 3 */
  2487. #endif
  2488. #else
  2489. *cptr = SWIG_Python_str_AsChar(obj);
  2490. if (!*cptr)
  2491. ret = SWIG_TypeError;
  2492. #endif
  2493. }
  2494. }
  2495. if (psize) *psize = len + 1;
  2496. #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
  2497. Py_XDECREF(obj);
  2498. #endif
  2499. return ret;
  2500. } else {
  2501. #if defined(SWIG_PYTHON_2_UNICODE)
  2502. #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
  2503. #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
  2504. #endif
  2505. #if PY_VERSION_HEX<0x03000000
  2506. if (PyUnicode_Check(obj)) {
  2507. char *cstr; Py_ssize_t len;
  2508. if (!alloc && cptr) {
  2509. return SWIG_RuntimeError;
  2510. }
  2511. obj = PyUnicode_AsUTF8String(obj);
  2512. if (!obj)
  2513. return SWIG_TypeError;
  2514. if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
  2515. if (cptr) {
  2516. if (alloc) *alloc = SWIG_NEWOBJ;
  2517. *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
  2518. }
  2519. if (psize) *psize = len + 1;
  2520. Py_XDECREF(obj);
  2521. return SWIG_OK;
  2522. } else {
  2523. Py_XDECREF(obj);
  2524. }
  2525. }
  2526. #endif
  2527. #endif
  2528. swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
  2529. if (pchar_descriptor) {
  2530. void* vptr = 0;
  2531. if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
  2532. if (cptr) *cptr = (char *) vptr;
  2533. if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
  2534. if (alloc) *alloc = SWIG_OLDOBJ;
  2535. return SWIG_OK;
  2536. }
  2537. }
  2538. }
  2539. return SWIG_TypeError;
  2540. }
  2541. SWIGINTERN int
  2542. SWIG_AsVal_double (PyObject *obj, double *val)
  2543. {
  2544. int res = SWIG_TypeError;
  2545. if (PyFloat_Check(obj)) {
  2546. if (val) *val = PyFloat_AsDouble(obj);
  2547. return SWIG_OK;
  2548. #if PY_VERSION_HEX < 0x03000000
  2549. } else if (PyInt_Check(obj)) {
  2550. if (val) *val = (double) PyInt_AsLong(obj);
  2551. return SWIG_OK;
  2552. #endif
  2553. } else if (PyLong_Check(obj)) {
  2554. double v = PyLong_AsDouble(obj);
  2555. if (!PyErr_Occurred()) {
  2556. if (val) *val = v;
  2557. return SWIG_OK;
  2558. } else {
  2559. PyErr_Clear();
  2560. }
  2561. }
  2562. #ifdef SWIG_PYTHON_CAST_MODE
  2563. {
  2564. int dispatch = 0;
  2565. double d = PyFloat_AsDouble(obj);
  2566. if (!PyErr_Occurred()) {
  2567. if (val) *val = d;
  2568. return SWIG_AddCast(SWIG_OK);
  2569. } else {
  2570. PyErr_Clear();
  2571. }
  2572. if (!dispatch) {
  2573. long v = PyLong_AsLong(obj);
  2574. if (!PyErr_Occurred()) {
  2575. if (val) *val = v;
  2576. return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
  2577. } else {
  2578. PyErr_Clear();
  2579. }
  2580. }
  2581. }
  2582. #endif
  2583. return res;
  2584. }
  2585. #include <float.h>
  2586. #include <math.h>
  2587. SWIGINTERNINLINE int
  2588. SWIG_CanCastAsInteger(double *d, double min, double max) {
  2589. double x = *d;
  2590. if ((min <= x && x <= max)) {
  2591. double fx = floor(x);
  2592. double cx = ceil(x);
  2593. double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
  2594. if ((errno == EDOM) || (errno == ERANGE)) {
  2595. errno = 0;
  2596. } else {
  2597. double summ, reps, diff;
  2598. if (rd < x) {
  2599. diff = x - rd;
  2600. } else if (rd > x) {
  2601. diff = rd - x;
  2602. } else {
  2603. return 1;
  2604. }
  2605. summ = rd + x;
  2606. reps = diff/summ;
  2607. if (reps < 8*DBL_EPSILON) {
  2608. *d = rd;
  2609. return 1;
  2610. }
  2611. }
  2612. }
  2613. return 0;
  2614. }
  2615. SWIGINTERN int
  2616. SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
  2617. {
  2618. #if PY_VERSION_HEX < 0x03000000
  2619. if (PyInt_Check(obj)) {
  2620. long v = PyInt_AsLong(obj);
  2621. if (v >= 0) {
  2622. if (val) *val = v;
  2623. return SWIG_OK;
  2624. } else {
  2625. return SWIG_OverflowError;
  2626. }
  2627. } else
  2628. #endif
  2629. if (PyLong_Check(obj)) {
  2630. unsigned long v = PyLong_AsUnsignedLong(obj);
  2631. if (!PyErr_Occurred()) {
  2632. if (val) *val = v;
  2633. return SWIG_OK;
  2634. } else {
  2635. PyErr_Clear();
  2636. return SWIG_OverflowError;
  2637. }
  2638. }
  2639. #ifdef SWIG_PYTHON_CAST_MODE
  2640. {
  2641. int dispatch = 0;
  2642. unsigned long v = PyLong_AsUnsignedLong(obj);
  2643. if (!PyErr_Occurred()) {
  2644. if (val) *val = v;
  2645. return SWIG_AddCast(SWIG_OK);
  2646. } else {
  2647. PyErr_Clear();
  2648. }
  2649. if (!dispatch) {
  2650. double d;
  2651. int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
  2652. if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
  2653. if (val) *val = (unsigned long)(d);
  2654. return res;
  2655. }
  2656. }
  2657. }
  2658. #endif
  2659. return SWIG_TypeError;
  2660. }
  2661. #include <limits.h>
  2662. #if !defined(SWIG_NO_LLONG_MAX)
  2663. # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
  2664. # define LLONG_MAX __LONG_LONG_MAX__
  2665. # define LLONG_MIN (-LLONG_MAX - 1LL)
  2666. # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
  2667. # endif
  2668. #endif
  2669. #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
  2670. # define SWIG_LONG_LONG_AVAILABLE
  2671. #endif
  2672. #ifdef SWIG_LONG_LONG_AVAILABLE
  2673. SWIGINTERN int
  2674. SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
  2675. {
  2676. int res = SWIG_TypeError;
  2677. if (PyLong_Check(obj)) {
  2678. unsigned long long v = PyLong_AsUnsignedLongLong(obj);
  2679. if (!PyErr_Occurred()) {
  2680. if (val) *val = v;
  2681. return SWIG_OK;
  2682. } else {
  2683. PyErr_Clear();
  2684. res = SWIG_OverflowError;
  2685. }
  2686. } else {
  2687. unsigned long v;
  2688. res = SWIG_AsVal_unsigned_SS_long (obj,&v);
  2689. if (SWIG_IsOK(res)) {
  2690. if (val) *val = v;
  2691. return res;
  2692. }
  2693. }
  2694. #ifdef SWIG_PYTHON_CAST_MODE
  2695. {
  2696. const double mant_max = 1LL << DBL_MANT_DIG;
  2697. double d;
  2698. res = SWIG_AsVal_double (obj,&d);
  2699. if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max))
  2700. return SWIG_OverflowError;
  2701. if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
  2702. if (val) *val = (unsigned long long)(d);
  2703. return SWIG_AddCast(res);
  2704. }
  2705. res = SWIG_TypeError;
  2706. }
  2707. #endif
  2708. return res;
  2709. }
  2710. #endif
  2711. SWIGINTERNINLINE int
  2712. SWIG_AsVal_size_t (PyObject * obj, size_t *val)
  2713. {
  2714. int res = SWIG_TypeError;
  2715. #ifdef SWIG_LONG_LONG_AVAILABLE
  2716. if (sizeof(size_t) <= sizeof(unsigned long)) {
  2717. #endif
  2718. unsigned long v;
  2719. res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
  2720. if (SWIG_IsOK(res) && val) *val = (size_t)(v);
  2721. #ifdef SWIG_LONG_LONG_AVAILABLE
  2722. } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
  2723. unsigned long long v;
  2724. res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
  2725. if (SWIG_IsOK(res) && val) *val = (size_t)(v);
  2726. }
  2727. #endif
  2728. return res;
  2729. }
  2730. SWIGINTERN int
  2731. SWIG_AsVal_long (PyObject *obj, long* val)
  2732. {
  2733. #if PY_VERSION_HEX < 0x03000000
  2734. if (PyInt_Check(obj)) {
  2735. if (val) *val = PyInt_AsLong(obj);
  2736. return SWIG_OK;
  2737. } else
  2738. #endif
  2739. if (PyLong_Check(obj)) {
  2740. long v = PyLong_AsLong(obj);
  2741. if (!PyErr_Occurred()) {
  2742. if (val) *val = v;
  2743. return SWIG_OK;
  2744. } else {
  2745. PyErr_Clear();
  2746. return SWIG_OverflowError;
  2747. }
  2748. }
  2749. #ifdef SWIG_PYTHON_CAST_MODE
  2750. {
  2751. int dispatch = 0;
  2752. long v = PyInt_AsLong(obj);
  2753. if (!PyErr_Occurred()) {
  2754. if (val) *val = v;
  2755. return SWIG_AddCast(SWIG_OK);
  2756. } else {
  2757. PyErr_Clear();
  2758. }
  2759. if (!dispatch) {
  2760. double d;
  2761. int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
  2762. if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
  2763. if (val) *val = (long)(d);
  2764. return res;
  2765. }
  2766. }
  2767. }
  2768. #endif
  2769. return SWIG_TypeError;
  2770. }
  2771. SWIGINTERN int
  2772. SWIG_AsVal_int (PyObject * obj, int *val)
  2773. {
  2774. long v;
  2775. int res = SWIG_AsVal_long (obj, &v);
  2776. if (SWIG_IsOK(res)) {
  2777. if ((v < INT_MIN || v > INT_MAX)) {
  2778. return SWIG_OverflowError;
  2779. } else {
  2780. if (val) *val = (int)(v);
  2781. }
  2782. }
  2783. return res;
  2784. }
  2785. SWIGINTERNINLINE PyObject *
  2786. SWIG_FromCharPtrAndSize(const char* carray, size_t size)
  2787. {
  2788. if (carray) {
  2789. if (size > INT_MAX) {
  2790. swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
  2791. return pchar_descriptor ?
  2792. SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
  2793. } else {
  2794. #if PY_VERSION_HEX >= 0x03000000
  2795. #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
  2796. return PyBytes_FromStringAndSize(carray, (Py_ssize_t)(size));
  2797. #else
  2798. return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size), "surrogateescape");
  2799. #endif
  2800. #else
  2801. return PyString_FromStringAndSize(carray, (Py_ssize_t)(size));
  2802. #endif
  2803. }
  2804. } else {
  2805. return SWIG_Py_Void();
  2806. }
  2807. }
  2808. SWIGINTERNINLINE PyObject *
  2809. SWIG_FromCharPtr(const char *cptr)
  2810. {
  2811. return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
  2812. }
  2813. #define SWIG_From_long PyInt_FromLong
  2814. SWIGINTERNINLINE PyObject*
  2815. SWIG_From_unsigned_SS_long (unsigned long value)
  2816. {
  2817. return (value > LONG_MAX) ?
  2818. PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value));
  2819. }
  2820. SWIGINTERNINLINE PyObject *
  2821. SWIG_From_unsigned_SS_short (unsigned short value)
  2822. {
  2823. return SWIG_From_unsigned_SS_long (value);
  2824. }
  2825. SWIGINTERN int
  2826. SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
  2827. {
  2828. unsigned long v;
  2829. int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
  2830. if (SWIG_IsOK(res)) {
  2831. if ((v > UINT_MAX)) {
  2832. return SWIG_OverflowError;
  2833. } else {
  2834. if (val) *val = (unsigned int)(v);
  2835. }
  2836. }
  2837. return res;
  2838. }
  2839. SWIGINTERN int
  2840. SWIG_AsVal_unsigned_SS_short (PyObject * obj, unsigned short *val)
  2841. {
  2842. unsigned long v;
  2843. int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
  2844. if (SWIG_IsOK(res)) {
  2845. if ((v > USHRT_MAX)) {
  2846. return SWIG_OverflowError;
  2847. } else {
  2848. if (val) *val = (unsigned short)(v);
  2849. }
  2850. }
  2851. return res;
  2852. }
  2853. PyObject *archive_read_data_into_str(struct archive *archive, int len) {
  2854. PyObject *str = NULL;
  2855. if (!(str = PyUnicode_FromStringAndSize(NULL, len))) {
  2856. PyErr_SetString(PyExc_MemoryError, "could not allocate string.");
  2857. return NULL;
  2858. }
  2859. if (len != archive_read_data(archive, PyString_AS_STRING(str), len)) {
  2860. PyErr_SetString(PyExc_RuntimeError, "could not read requested data.");
  2861. return NULL;
  2862. }
  2863. return str;
  2864. }
  2865. PyObject *archive_write_data_from_str(struct archive *archive, PyObject *str) {
  2866. int len = PyString_Size(str);
  2867. if (!archive_write_data(archive, PyString_AS_STRING(str), len)) {
  2868. PyErr_SetString(PyExc_RuntimeError, "could not write requested data.");
  2869. return NULL;
  2870. }
  2871. return PyInt_FromLong(len);
  2872. }
  2873. #ifdef __cplusplus
  2874. extern "C" {
  2875. #endif
  2876. SWIGINTERN PyObject *_wrap_archive_read_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  2877. PyObject *resultobj = 0;
  2878. struct archive *result = 0 ;
  2879. if (!SWIG_Python_UnpackTuple(args, "archive_read_new", 0, 0, 0)) SWIG_fail;
  2880. result = (struct archive *)archive_read_new();
  2881. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_archive, 0 | 0 );
  2882. return resultobj;
  2883. fail:
  2884. return NULL;
  2885. }
  2886. SWIGINTERN PyObject *_wrap_archive_read_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  2887. PyObject *resultobj = 0;
  2888. struct archive *arg1 = (struct archive *) 0 ;
  2889. void *argp1 = 0 ;
  2890. int res1 = 0 ;
  2891. PyObject *swig_obj[1] ;
  2892. int result;
  2893. if (!args) SWIG_fail;
  2894. swig_obj[0] = args;
  2895. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  2896. if (!SWIG_IsOK(res1)) {
  2897. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_free" "', argument " "1"" of type '" "struct archive *""'");
  2898. }
  2899. arg1 = (struct archive *)(argp1);
  2900. result = (int)archive_read_free(arg1);
  2901. resultobj = SWIG_From_int((int)(result));
  2902. return resultobj;
  2903. fail:
  2904. return NULL;
  2905. }
  2906. SWIGINTERN PyObject *_wrap_archive_read_open_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  2907. PyObject *resultobj = 0;
  2908. struct archive *arg1 = (struct archive *) 0 ;
  2909. char *arg2 = (char *) 0 ;
  2910. size_t arg3 ;
  2911. void *argp1 = 0 ;
  2912. int res1 = 0 ;
  2913. int res2 ;
  2914. char *buf2 = 0 ;
  2915. int alloc2 = 0 ;
  2916. size_t val3 ;
  2917. int ecode3 = 0 ;
  2918. PyObject *swig_obj[3] ;
  2919. int result;
  2920. if (!SWIG_Python_UnpackTuple(args, "archive_read_open_filename", 3, 3, swig_obj)) SWIG_fail;
  2921. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  2922. if (!SWIG_IsOK(res1)) {
  2923. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_open_filename" "', argument " "1"" of type '" "struct archive *""'");
  2924. }
  2925. arg1 = (struct archive *)(argp1);
  2926. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  2927. if (!SWIG_IsOK(res2)) {
  2928. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_read_open_filename" "', argument " "2"" of type '" "char const *""'");
  2929. }
  2930. arg2 = (char *)(buf2);
  2931. ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
  2932. if (!SWIG_IsOK(ecode3)) {
  2933. SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "archive_read_open_filename" "', argument " "3"" of type '" "size_t""'");
  2934. }
  2935. arg3 = (size_t)(val3);
  2936. result = (int)archive_read_open_filename(arg1,(char const *)arg2,arg3);
  2937. resultobj = SWIG_From_int((int)(result));
  2938. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  2939. return resultobj;
  2940. fail:
  2941. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  2942. return NULL;
  2943. }
  2944. SWIGINTERN PyObject *_wrap_archive_read_open_memory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  2945. PyObject *resultobj = 0;
  2946. struct archive *arg1 = (struct archive *) 0 ;
  2947. void *arg2 = (void *) 0 ;
  2948. size_t arg3 ;
  2949. void *argp1 = 0 ;
  2950. int res1 = 0 ;
  2951. int res2 ;
  2952. size_t val3 ;
  2953. int ecode3 = 0 ;
  2954. PyObject *swig_obj[3] ;
  2955. int result;
  2956. if (!SWIG_Python_UnpackTuple(args, "archive_read_open_memory", 3, 3, swig_obj)) SWIG_fail;
  2957. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  2958. if (!SWIG_IsOK(res1)) {
  2959. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_open_memory" "', argument " "1"" of type '" "struct archive *""'");
  2960. }
  2961. arg1 = (struct archive *)(argp1);
  2962. res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0);
  2963. if (!SWIG_IsOK(res2)) {
  2964. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_read_open_memory" "', argument " "2"" of type '" "void const *""'");
  2965. }
  2966. ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
  2967. if (!SWIG_IsOK(ecode3)) {
  2968. SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "archive_read_open_memory" "', argument " "3"" of type '" "size_t""'");
  2969. }
  2970. arg3 = (size_t)(val3);
  2971. result = (int)archive_read_open_memory(arg1,(void const *)arg2,arg3);
  2972. resultobj = SWIG_From_int((int)(result));
  2973. return resultobj;
  2974. fail:
  2975. return NULL;
  2976. }
  2977. SWIGINTERN PyObject *_wrap_archive_read_open_memory2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  2978. PyObject *resultobj = 0;
  2979. struct archive *arg1 = (struct archive *) 0 ;
  2980. void *arg2 = (void *) 0 ;
  2981. size_t arg3 ;
  2982. size_t arg4 ;
  2983. void *argp1 = 0 ;
  2984. int res1 = 0 ;
  2985. int res2 ;
  2986. size_t val3 ;
  2987. int ecode3 = 0 ;
  2988. size_t val4 ;
  2989. int ecode4 = 0 ;
  2990. PyObject *swig_obj[4] ;
  2991. int result;
  2992. if (!SWIG_Python_UnpackTuple(args, "archive_read_open_memory2", 4, 4, swig_obj)) SWIG_fail;
  2993. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  2994. if (!SWIG_IsOK(res1)) {
  2995. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_open_memory2" "', argument " "1"" of type '" "struct archive *""'");
  2996. }
  2997. arg1 = (struct archive *)(argp1);
  2998. res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0);
  2999. if (!SWIG_IsOK(res2)) {
  3000. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_read_open_memory2" "', argument " "2"" of type '" "void const *""'");
  3001. }
  3002. ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
  3003. if (!SWIG_IsOK(ecode3)) {
  3004. SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "archive_read_open_memory2" "', argument " "3"" of type '" "size_t""'");
  3005. }
  3006. arg3 = (size_t)(val3);
  3007. ecode4 = SWIG_AsVal_size_t(swig_obj[3], &val4);
  3008. if (!SWIG_IsOK(ecode4)) {
  3009. SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "archive_read_open_memory2" "', argument " "4"" of type '" "size_t""'");
  3010. }
  3011. arg4 = (size_t)(val4);
  3012. result = (int)archive_read_open_memory2(arg1,(void const *)arg2,arg3,arg4);
  3013. resultobj = SWIG_From_int((int)(result));
  3014. return resultobj;
  3015. fail:
  3016. return NULL;
  3017. }
  3018. SWIGINTERN PyObject *_wrap_archive_read_open_fd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3019. PyObject *resultobj = 0;
  3020. struct archive *arg1 = (struct archive *) 0 ;
  3021. int arg2 ;
  3022. size_t arg3 ;
  3023. void *argp1 = 0 ;
  3024. int res1 = 0 ;
  3025. int val2 ;
  3026. int ecode2 = 0 ;
  3027. size_t val3 ;
  3028. int ecode3 = 0 ;
  3029. PyObject *swig_obj[3] ;
  3030. int result;
  3031. if (!SWIG_Python_UnpackTuple(args, "archive_read_open_fd", 3, 3, swig_obj)) SWIG_fail;
  3032. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3033. if (!SWIG_IsOK(res1)) {
  3034. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_open_fd" "', argument " "1"" of type '" "struct archive *""'");
  3035. }
  3036. arg1 = (struct archive *)(argp1);
  3037. ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  3038. if (!SWIG_IsOK(ecode2)) {
  3039. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "archive_read_open_fd" "', argument " "2"" of type '" "int""'");
  3040. }
  3041. arg2 = (int)(val2);
  3042. ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
  3043. if (!SWIG_IsOK(ecode3)) {
  3044. SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "archive_read_open_fd" "', argument " "3"" of type '" "size_t""'");
  3045. }
  3046. arg3 = (size_t)(val3);
  3047. result = (int)archive_read_open_fd(arg1,arg2,arg3);
  3048. resultobj = SWIG_From_int((int)(result));
  3049. return resultobj;
  3050. fail:
  3051. return NULL;
  3052. }
  3053. SWIGINTERN PyObject *_wrap_archive_read_close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3054. PyObject *resultobj = 0;
  3055. struct archive *arg1 = (struct archive *) 0 ;
  3056. void *argp1 = 0 ;
  3057. int res1 = 0 ;
  3058. PyObject *swig_obj[1] ;
  3059. int result;
  3060. if (!args) SWIG_fail;
  3061. swig_obj[0] = args;
  3062. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3063. if (!SWIG_IsOK(res1)) {
  3064. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_close" "', argument " "1"" of type '" "struct archive *""'");
  3065. }
  3066. arg1 = (struct archive *)(argp1);
  3067. result = (int)archive_read_close(arg1);
  3068. resultobj = SWIG_From_int((int)(result));
  3069. return resultobj;
  3070. fail:
  3071. return NULL;
  3072. }
  3073. SWIGINTERN PyObject *_wrap_archive_format(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3074. PyObject *resultobj = 0;
  3075. struct archive *arg1 = (struct archive *) 0 ;
  3076. void *argp1 = 0 ;
  3077. int res1 = 0 ;
  3078. PyObject *swig_obj[1] ;
  3079. int result;
  3080. if (!args) SWIG_fail;
  3081. swig_obj[0] = args;
  3082. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3083. if (!SWIG_IsOK(res1)) {
  3084. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_format" "', argument " "1"" of type '" "struct archive *""'");
  3085. }
  3086. arg1 = (struct archive *)(argp1);
  3087. result = (int)archive_format(arg1);
  3088. resultobj = SWIG_From_int((int)(result));
  3089. return resultobj;
  3090. fail:
  3091. return NULL;
  3092. }
  3093. SWIGINTERN PyObject *_wrap_archive_read_next_header2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3094. PyObject *resultobj = 0;
  3095. struct archive *arg1 = (struct archive *) 0 ;
  3096. struct archive_entry *arg2 = (struct archive_entry *) 0 ;
  3097. void *argp1 = 0 ;
  3098. int res1 = 0 ;
  3099. void *argp2 = 0 ;
  3100. int res2 = 0 ;
  3101. PyObject *swig_obj[2] ;
  3102. int result;
  3103. if (!SWIG_Python_UnpackTuple(args, "archive_read_next_header2", 2, 2, swig_obj)) SWIG_fail;
  3104. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3105. if (!SWIG_IsOK(res1)) {
  3106. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_next_header2" "', argument " "1"" of type '" "struct archive *""'");
  3107. }
  3108. arg1 = (struct archive *)(argp1);
  3109. res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_archive_entry, 0 | 0 );
  3110. if (!SWIG_IsOK(res2)) {
  3111. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_read_next_header2" "', argument " "2"" of type '" "struct archive_entry *""'");
  3112. }
  3113. arg2 = (struct archive_entry *)(argp2);
  3114. result = (int)archive_read_next_header2(arg1,arg2);
  3115. resultobj = SWIG_From_int((int)(result));
  3116. return resultobj;
  3117. fail:
  3118. return NULL;
  3119. }
  3120. SWIGINTERN PyObject *_wrap_archive_entry_stat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3121. PyObject *resultobj = 0;
  3122. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  3123. void *argp1 = 0 ;
  3124. int res1 = 0 ;
  3125. PyObject *swig_obj[1] ;
  3126. struct stat *result = 0 ;
  3127. if (!args) SWIG_fail;
  3128. swig_obj[0] = args;
  3129. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  3130. if (!SWIG_IsOK(res1)) {
  3131. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_stat" "', argument " "1"" of type '" "struct archive_entry *""'");
  3132. }
  3133. arg1 = (struct archive_entry *)(argp1);
  3134. result = (struct stat *)archive_entry_stat(arg1);
  3135. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_stat, 0 | 0 );
  3136. return resultobj;
  3137. fail:
  3138. return NULL;
  3139. }
  3140. SWIGINTERN PyObject *_wrap_archive_read_header_position(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3141. PyObject *resultobj = 0;
  3142. struct archive *arg1 = (struct archive *) 0 ;
  3143. void *argp1 = 0 ;
  3144. int res1 = 0 ;
  3145. PyObject *swig_obj[1] ;
  3146. int64_t result;
  3147. if (!args) SWIG_fail;
  3148. swig_obj[0] = args;
  3149. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3150. if (!SWIG_IsOK(res1)) {
  3151. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_header_position" "', argument " "1"" of type '" "struct archive *""'");
  3152. }
  3153. arg1 = (struct archive *)(argp1);
  3154. result = archive_read_header_position(arg1);
  3155. {
  3156. resultobj = PyLong_FromLong((long)result);
  3157. }
  3158. return resultobj;
  3159. fail:
  3160. return NULL;
  3161. }
  3162. SWIGINTERN PyObject *_wrap_archive_read_set_format_option(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3163. PyObject *resultobj = 0;
  3164. struct archive *arg1 = (struct archive *) 0 ;
  3165. char *arg2 = (char *) 0 ;
  3166. char *arg3 = (char *) 0 ;
  3167. char *arg4 = (char *) 0 ;
  3168. void *argp1 = 0 ;
  3169. int res1 = 0 ;
  3170. int res2 ;
  3171. char *buf2 = 0 ;
  3172. int alloc2 = 0 ;
  3173. int res3 ;
  3174. char *buf3 = 0 ;
  3175. int alloc3 = 0 ;
  3176. int res4 ;
  3177. char *buf4 = 0 ;
  3178. int alloc4 = 0 ;
  3179. PyObject *swig_obj[4] ;
  3180. int result;
  3181. if (!SWIG_Python_UnpackTuple(args, "archive_read_set_format_option", 4, 4, swig_obj)) SWIG_fail;
  3182. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3183. if (!SWIG_IsOK(res1)) {
  3184. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_set_format_option" "', argument " "1"" of type '" "struct archive *""'");
  3185. }
  3186. arg1 = (struct archive *)(argp1);
  3187. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  3188. if (!SWIG_IsOK(res2)) {
  3189. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_read_set_format_option" "', argument " "2"" of type '" "char const *""'");
  3190. }
  3191. arg2 = (char *)(buf2);
  3192. res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  3193. if (!SWIG_IsOK(res3)) {
  3194. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "archive_read_set_format_option" "', argument " "3"" of type '" "char const *""'");
  3195. }
  3196. arg3 = (char *)(buf3);
  3197. res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  3198. if (!SWIG_IsOK(res4)) {
  3199. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "archive_read_set_format_option" "', argument " "4"" of type '" "char const *""'");
  3200. }
  3201. arg4 = (char *)(buf4);
  3202. result = (int)archive_read_set_format_option(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  3203. resultobj = SWIG_From_int((int)(result));
  3204. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3205. if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  3206. if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  3207. return resultobj;
  3208. fail:
  3209. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3210. if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  3211. if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  3212. return NULL;
  3213. }
  3214. SWIGINTERN PyObject *_wrap_archive_read_set_filter_option(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3215. PyObject *resultobj = 0;
  3216. struct archive *arg1 = (struct archive *) 0 ;
  3217. char *arg2 = (char *) 0 ;
  3218. char *arg3 = (char *) 0 ;
  3219. char *arg4 = (char *) 0 ;
  3220. void *argp1 = 0 ;
  3221. int res1 = 0 ;
  3222. int res2 ;
  3223. char *buf2 = 0 ;
  3224. int alloc2 = 0 ;
  3225. int res3 ;
  3226. char *buf3 = 0 ;
  3227. int alloc3 = 0 ;
  3228. int res4 ;
  3229. char *buf4 = 0 ;
  3230. int alloc4 = 0 ;
  3231. PyObject *swig_obj[4] ;
  3232. int result;
  3233. if (!SWIG_Python_UnpackTuple(args, "archive_read_set_filter_option", 4, 4, swig_obj)) SWIG_fail;
  3234. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3235. if (!SWIG_IsOK(res1)) {
  3236. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_set_filter_option" "', argument " "1"" of type '" "struct archive *""'");
  3237. }
  3238. arg1 = (struct archive *)(argp1);
  3239. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  3240. if (!SWIG_IsOK(res2)) {
  3241. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_read_set_filter_option" "', argument " "2"" of type '" "char const *""'");
  3242. }
  3243. arg2 = (char *)(buf2);
  3244. res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  3245. if (!SWIG_IsOK(res3)) {
  3246. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "archive_read_set_filter_option" "', argument " "3"" of type '" "char const *""'");
  3247. }
  3248. arg3 = (char *)(buf3);
  3249. res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  3250. if (!SWIG_IsOK(res4)) {
  3251. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "archive_read_set_filter_option" "', argument " "4"" of type '" "char const *""'");
  3252. }
  3253. arg4 = (char *)(buf4);
  3254. result = (int)archive_read_set_filter_option(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  3255. resultobj = SWIG_From_int((int)(result));
  3256. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3257. if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  3258. if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  3259. return resultobj;
  3260. fail:
  3261. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3262. if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  3263. if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  3264. return NULL;
  3265. }
  3266. SWIGINTERN PyObject *_wrap_archive_read_set_option(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3267. PyObject *resultobj = 0;
  3268. struct archive *arg1 = (struct archive *) 0 ;
  3269. char *arg2 = (char *) 0 ;
  3270. char *arg3 = (char *) 0 ;
  3271. char *arg4 = (char *) 0 ;
  3272. void *argp1 = 0 ;
  3273. int res1 = 0 ;
  3274. int res2 ;
  3275. char *buf2 = 0 ;
  3276. int alloc2 = 0 ;
  3277. int res3 ;
  3278. char *buf3 = 0 ;
  3279. int alloc3 = 0 ;
  3280. int res4 ;
  3281. char *buf4 = 0 ;
  3282. int alloc4 = 0 ;
  3283. PyObject *swig_obj[4] ;
  3284. int result;
  3285. if (!SWIG_Python_UnpackTuple(args, "archive_read_set_option", 4, 4, swig_obj)) SWIG_fail;
  3286. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3287. if (!SWIG_IsOK(res1)) {
  3288. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_set_option" "', argument " "1"" of type '" "struct archive *""'");
  3289. }
  3290. arg1 = (struct archive *)(argp1);
  3291. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  3292. if (!SWIG_IsOK(res2)) {
  3293. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_read_set_option" "', argument " "2"" of type '" "char const *""'");
  3294. }
  3295. arg2 = (char *)(buf2);
  3296. res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  3297. if (!SWIG_IsOK(res3)) {
  3298. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "archive_read_set_option" "', argument " "3"" of type '" "char const *""'");
  3299. }
  3300. arg3 = (char *)(buf3);
  3301. res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  3302. if (!SWIG_IsOK(res4)) {
  3303. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "archive_read_set_option" "', argument " "4"" of type '" "char const *""'");
  3304. }
  3305. arg4 = (char *)(buf4);
  3306. result = (int)archive_read_set_option(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  3307. resultobj = SWIG_From_int((int)(result));
  3308. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3309. if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  3310. if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  3311. return resultobj;
  3312. fail:
  3313. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3314. if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  3315. if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  3316. return NULL;
  3317. }
  3318. SWIGINTERN PyObject *_wrap_archive_read_set_options(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3319. PyObject *resultobj = 0;
  3320. struct archive *arg1 = (struct archive *) 0 ;
  3321. char *arg2 = (char *) 0 ;
  3322. void *argp1 = 0 ;
  3323. int res1 = 0 ;
  3324. int res2 ;
  3325. char *buf2 = 0 ;
  3326. int alloc2 = 0 ;
  3327. PyObject *swig_obj[2] ;
  3328. int result;
  3329. if (!SWIG_Python_UnpackTuple(args, "archive_read_set_options", 2, 2, swig_obj)) SWIG_fail;
  3330. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3331. if (!SWIG_IsOK(res1)) {
  3332. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_set_options" "', argument " "1"" of type '" "struct archive *""'");
  3333. }
  3334. arg1 = (struct archive *)(argp1);
  3335. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  3336. if (!SWIG_IsOK(res2)) {
  3337. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_read_set_options" "', argument " "2"" of type '" "char const *""'");
  3338. }
  3339. arg2 = (char *)(buf2);
  3340. result = (int)archive_read_set_options(arg1,(char const *)arg2);
  3341. resultobj = SWIG_From_int((int)(result));
  3342. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3343. return resultobj;
  3344. fail:
  3345. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3346. return NULL;
  3347. }
  3348. SWIGINTERN PyObject *_wrap_archive_read_add_passphrase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3349. PyObject *resultobj = 0;
  3350. struct archive *arg1 = (struct archive *) 0 ;
  3351. char *arg2 = (char *) 0 ;
  3352. void *argp1 = 0 ;
  3353. int res1 = 0 ;
  3354. int res2 ;
  3355. char *buf2 = 0 ;
  3356. int alloc2 = 0 ;
  3357. PyObject *swig_obj[2] ;
  3358. int result;
  3359. if (!SWIG_Python_UnpackTuple(args, "archive_read_add_passphrase", 2, 2, swig_obj)) SWIG_fail;
  3360. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3361. if (!SWIG_IsOK(res1)) {
  3362. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_add_passphrase" "', argument " "1"" of type '" "struct archive *""'");
  3363. }
  3364. arg1 = (struct archive *)(argp1);
  3365. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  3366. if (!SWIG_IsOK(res2)) {
  3367. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_read_add_passphrase" "', argument " "2"" of type '" "char const *""'");
  3368. }
  3369. arg2 = (char *)(buf2);
  3370. result = (int)archive_read_add_passphrase(arg1,(char const *)arg2);
  3371. resultobj = SWIG_From_int((int)(result));
  3372. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3373. return resultobj;
  3374. fail:
  3375. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3376. return NULL;
  3377. }
  3378. SWIGINTERN PyObject *_wrap_archive_read_data_skip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3379. PyObject *resultobj = 0;
  3380. struct archive *arg1 = (struct archive *) 0 ;
  3381. void *argp1 = 0 ;
  3382. int res1 = 0 ;
  3383. PyObject *swig_obj[1] ;
  3384. int result;
  3385. if (!args) SWIG_fail;
  3386. swig_obj[0] = args;
  3387. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3388. if (!SWIG_IsOK(res1)) {
  3389. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_data_skip" "', argument " "1"" of type '" "struct archive *""'");
  3390. }
  3391. arg1 = (struct archive *)(argp1);
  3392. result = (int)archive_read_data_skip(arg1);
  3393. resultobj = SWIG_From_int((int)(result));
  3394. return resultobj;
  3395. fail:
  3396. return NULL;
  3397. }
  3398. SWIGINTERN PyObject *_wrap_archive_read_data_into_fd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3399. PyObject *resultobj = 0;
  3400. struct archive *arg1 = (struct archive *) 0 ;
  3401. int arg2 ;
  3402. void *argp1 = 0 ;
  3403. int res1 = 0 ;
  3404. int val2 ;
  3405. int ecode2 = 0 ;
  3406. PyObject *swig_obj[2] ;
  3407. int result;
  3408. if (!SWIG_Python_UnpackTuple(args, "archive_read_data_into_fd", 2, 2, swig_obj)) SWIG_fail;
  3409. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3410. if (!SWIG_IsOK(res1)) {
  3411. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_data_into_fd" "', argument " "1"" of type '" "struct archive *""'");
  3412. }
  3413. arg1 = (struct archive *)(argp1);
  3414. ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  3415. if (!SWIG_IsOK(ecode2)) {
  3416. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "archive_read_data_into_fd" "', argument " "2"" of type '" "int""'");
  3417. }
  3418. arg2 = (int)(val2);
  3419. result = (int)archive_read_data_into_fd(arg1,arg2);
  3420. resultobj = SWIG_From_int((int)(result));
  3421. return resultobj;
  3422. fail:
  3423. return NULL;
  3424. }
  3425. SWIGINTERN PyObject *_wrap_archive_read_support_compression_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3426. PyObject *resultobj = 0;
  3427. struct archive *arg1 = (struct archive *) 0 ;
  3428. void *argp1 = 0 ;
  3429. int res1 = 0 ;
  3430. PyObject *swig_obj[1] ;
  3431. int result;
  3432. if (!args) SWIG_fail;
  3433. swig_obj[0] = args;
  3434. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3435. if (!SWIG_IsOK(res1)) {
  3436. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_compression_all" "', argument " "1"" of type '" "struct archive *""'");
  3437. }
  3438. arg1 = (struct archive *)(argp1);
  3439. result = (int)archive_read_support_compression_all(arg1);
  3440. resultobj = SWIG_From_int((int)(result));
  3441. return resultobj;
  3442. fail:
  3443. return NULL;
  3444. }
  3445. SWIGINTERN PyObject *_wrap_archive_read_support_compression_bzip2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3446. PyObject *resultobj = 0;
  3447. struct archive *arg1 = (struct archive *) 0 ;
  3448. void *argp1 = 0 ;
  3449. int res1 = 0 ;
  3450. PyObject *swig_obj[1] ;
  3451. int result;
  3452. if (!args) SWIG_fail;
  3453. swig_obj[0] = args;
  3454. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3455. if (!SWIG_IsOK(res1)) {
  3456. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_compression_bzip2" "', argument " "1"" of type '" "struct archive *""'");
  3457. }
  3458. arg1 = (struct archive *)(argp1);
  3459. result = (int)archive_read_support_compression_bzip2(arg1);
  3460. resultobj = SWIG_From_int((int)(result));
  3461. return resultobj;
  3462. fail:
  3463. return NULL;
  3464. }
  3465. SWIGINTERN PyObject *_wrap_archive_read_support_compression_compress(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3466. PyObject *resultobj = 0;
  3467. struct archive *arg1 = (struct archive *) 0 ;
  3468. void *argp1 = 0 ;
  3469. int res1 = 0 ;
  3470. PyObject *swig_obj[1] ;
  3471. int result;
  3472. if (!args) SWIG_fail;
  3473. swig_obj[0] = args;
  3474. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3475. if (!SWIG_IsOK(res1)) {
  3476. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_compression_compress" "', argument " "1"" of type '" "struct archive *""'");
  3477. }
  3478. arg1 = (struct archive *)(argp1);
  3479. result = (int)archive_read_support_compression_compress(arg1);
  3480. resultobj = SWIG_From_int((int)(result));
  3481. return resultobj;
  3482. fail:
  3483. return NULL;
  3484. }
  3485. SWIGINTERN PyObject *_wrap_archive_read_support_compression_gzip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3486. PyObject *resultobj = 0;
  3487. struct archive *arg1 = (struct archive *) 0 ;
  3488. void *argp1 = 0 ;
  3489. int res1 = 0 ;
  3490. PyObject *swig_obj[1] ;
  3491. int result;
  3492. if (!args) SWIG_fail;
  3493. swig_obj[0] = args;
  3494. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3495. if (!SWIG_IsOK(res1)) {
  3496. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_compression_gzip" "', argument " "1"" of type '" "struct archive *""'");
  3497. }
  3498. arg1 = (struct archive *)(argp1);
  3499. result = (int)archive_read_support_compression_gzip(arg1);
  3500. resultobj = SWIG_From_int((int)(result));
  3501. return resultobj;
  3502. fail:
  3503. return NULL;
  3504. }
  3505. SWIGINTERN PyObject *_wrap_archive_read_support_compression_lzip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3506. PyObject *resultobj = 0;
  3507. struct archive *arg1 = (struct archive *) 0 ;
  3508. void *argp1 = 0 ;
  3509. int res1 = 0 ;
  3510. PyObject *swig_obj[1] ;
  3511. int result;
  3512. if (!args) SWIG_fail;
  3513. swig_obj[0] = args;
  3514. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3515. if (!SWIG_IsOK(res1)) {
  3516. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_compression_lzip" "', argument " "1"" of type '" "struct archive *""'");
  3517. }
  3518. arg1 = (struct archive *)(argp1);
  3519. result = (int)archive_read_support_compression_lzip(arg1);
  3520. resultobj = SWIG_From_int((int)(result));
  3521. return resultobj;
  3522. fail:
  3523. return NULL;
  3524. }
  3525. SWIGINTERN PyObject *_wrap_archive_read_support_compression_lzma(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3526. PyObject *resultobj = 0;
  3527. struct archive *arg1 = (struct archive *) 0 ;
  3528. void *argp1 = 0 ;
  3529. int res1 = 0 ;
  3530. PyObject *swig_obj[1] ;
  3531. int result;
  3532. if (!args) SWIG_fail;
  3533. swig_obj[0] = args;
  3534. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3535. if (!SWIG_IsOK(res1)) {
  3536. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_compression_lzma" "', argument " "1"" of type '" "struct archive *""'");
  3537. }
  3538. arg1 = (struct archive *)(argp1);
  3539. result = (int)archive_read_support_compression_lzma(arg1);
  3540. resultobj = SWIG_From_int((int)(result));
  3541. return resultobj;
  3542. fail:
  3543. return NULL;
  3544. }
  3545. SWIGINTERN PyObject *_wrap_archive_read_support_compression_none(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3546. PyObject *resultobj = 0;
  3547. struct archive *arg1 = (struct archive *) 0 ;
  3548. void *argp1 = 0 ;
  3549. int res1 = 0 ;
  3550. PyObject *swig_obj[1] ;
  3551. int result;
  3552. if (!args) SWIG_fail;
  3553. swig_obj[0] = args;
  3554. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3555. if (!SWIG_IsOK(res1)) {
  3556. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_compression_none" "', argument " "1"" of type '" "struct archive *""'");
  3557. }
  3558. arg1 = (struct archive *)(argp1);
  3559. result = (int)archive_read_support_compression_none(arg1);
  3560. resultobj = SWIG_From_int((int)(result));
  3561. return resultobj;
  3562. fail:
  3563. return NULL;
  3564. }
  3565. SWIGINTERN PyObject *_wrap_archive_read_support_compression_program(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3566. PyObject *resultobj = 0;
  3567. struct archive *arg1 = (struct archive *) 0 ;
  3568. char *arg2 = (char *) 0 ;
  3569. void *argp1 = 0 ;
  3570. int res1 = 0 ;
  3571. int res2 ;
  3572. char *buf2 = 0 ;
  3573. int alloc2 = 0 ;
  3574. PyObject *swig_obj[2] ;
  3575. int result;
  3576. if (!SWIG_Python_UnpackTuple(args, "archive_read_support_compression_program", 2, 2, swig_obj)) SWIG_fail;
  3577. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3578. if (!SWIG_IsOK(res1)) {
  3579. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_compression_program" "', argument " "1"" of type '" "struct archive *""'");
  3580. }
  3581. arg1 = (struct archive *)(argp1);
  3582. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  3583. if (!SWIG_IsOK(res2)) {
  3584. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_read_support_compression_program" "', argument " "2"" of type '" "char const *""'");
  3585. }
  3586. arg2 = (char *)(buf2);
  3587. result = (int)archive_read_support_compression_program(arg1,(char const *)arg2);
  3588. resultobj = SWIG_From_int((int)(result));
  3589. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3590. return resultobj;
  3591. fail:
  3592. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3593. return NULL;
  3594. }
  3595. SWIGINTERN PyObject *_wrap_archive_read_support_compression_program_signature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3596. PyObject *resultobj = 0;
  3597. struct archive *arg1 = (struct archive *) 0 ;
  3598. char *arg2 = (char *) 0 ;
  3599. void *arg3 = (void *) 0 ;
  3600. size_t arg4 ;
  3601. void *argp1 = 0 ;
  3602. int res1 = 0 ;
  3603. int res2 ;
  3604. char *buf2 = 0 ;
  3605. int alloc2 = 0 ;
  3606. int res3 ;
  3607. size_t val4 ;
  3608. int ecode4 = 0 ;
  3609. PyObject *swig_obj[4] ;
  3610. int result;
  3611. if (!SWIG_Python_UnpackTuple(args, "archive_read_support_compression_program_signature", 4, 4, swig_obj)) SWIG_fail;
  3612. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3613. if (!SWIG_IsOK(res1)) {
  3614. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_compression_program_signature" "', argument " "1"" of type '" "struct archive *""'");
  3615. }
  3616. arg1 = (struct archive *)(argp1);
  3617. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  3618. if (!SWIG_IsOK(res2)) {
  3619. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_read_support_compression_program_signature" "', argument " "2"" of type '" "char const *""'");
  3620. }
  3621. arg2 = (char *)(buf2);
  3622. res3 = SWIG_ConvertPtr(swig_obj[2],SWIG_as_voidptrptr(&arg3), 0, 0);
  3623. if (!SWIG_IsOK(res3)) {
  3624. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "archive_read_support_compression_program_signature" "', argument " "3"" of type '" "void const *""'");
  3625. }
  3626. ecode4 = SWIG_AsVal_size_t(swig_obj[3], &val4);
  3627. if (!SWIG_IsOK(ecode4)) {
  3628. SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "archive_read_support_compression_program_signature" "', argument " "4"" of type '" "size_t""'");
  3629. }
  3630. arg4 = (size_t)(val4);
  3631. result = (int)archive_read_support_compression_program_signature(arg1,(char const *)arg2,(void const *)arg3,arg4);
  3632. resultobj = SWIG_From_int((int)(result));
  3633. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3634. return resultobj;
  3635. fail:
  3636. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3637. return NULL;
  3638. }
  3639. SWIGINTERN PyObject *_wrap_archive_read_support_compression_rpm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3640. PyObject *resultobj = 0;
  3641. struct archive *arg1 = (struct archive *) 0 ;
  3642. void *argp1 = 0 ;
  3643. int res1 = 0 ;
  3644. PyObject *swig_obj[1] ;
  3645. int result;
  3646. if (!args) SWIG_fail;
  3647. swig_obj[0] = args;
  3648. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3649. if (!SWIG_IsOK(res1)) {
  3650. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_compression_rpm" "', argument " "1"" of type '" "struct archive *""'");
  3651. }
  3652. arg1 = (struct archive *)(argp1);
  3653. result = (int)archive_read_support_compression_rpm(arg1);
  3654. resultobj = SWIG_From_int((int)(result));
  3655. return resultobj;
  3656. fail:
  3657. return NULL;
  3658. }
  3659. SWIGINTERN PyObject *_wrap_archive_read_support_compression_uu(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3660. PyObject *resultobj = 0;
  3661. struct archive *arg1 = (struct archive *) 0 ;
  3662. void *argp1 = 0 ;
  3663. int res1 = 0 ;
  3664. PyObject *swig_obj[1] ;
  3665. int result;
  3666. if (!args) SWIG_fail;
  3667. swig_obj[0] = args;
  3668. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3669. if (!SWIG_IsOK(res1)) {
  3670. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_compression_uu" "', argument " "1"" of type '" "struct archive *""'");
  3671. }
  3672. arg1 = (struct archive *)(argp1);
  3673. result = (int)archive_read_support_compression_uu(arg1);
  3674. resultobj = SWIG_From_int((int)(result));
  3675. return resultobj;
  3676. fail:
  3677. return NULL;
  3678. }
  3679. SWIGINTERN PyObject *_wrap_archive_read_support_compression_xz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3680. PyObject *resultobj = 0;
  3681. struct archive *arg1 = (struct archive *) 0 ;
  3682. void *argp1 = 0 ;
  3683. int res1 = 0 ;
  3684. PyObject *swig_obj[1] ;
  3685. int result;
  3686. if (!args) SWIG_fail;
  3687. swig_obj[0] = args;
  3688. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3689. if (!SWIG_IsOK(res1)) {
  3690. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_compression_xz" "', argument " "1"" of type '" "struct archive *""'");
  3691. }
  3692. arg1 = (struct archive *)(argp1);
  3693. result = (int)archive_read_support_compression_xz(arg1);
  3694. resultobj = SWIG_From_int((int)(result));
  3695. return resultobj;
  3696. fail:
  3697. return NULL;
  3698. }
  3699. SWIGINTERN PyObject *_wrap_archive_read_support_filter_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3700. PyObject *resultobj = 0;
  3701. struct archive *arg1 = (struct archive *) 0 ;
  3702. void *argp1 = 0 ;
  3703. int res1 = 0 ;
  3704. PyObject *swig_obj[1] ;
  3705. int result;
  3706. if (!args) SWIG_fail;
  3707. swig_obj[0] = args;
  3708. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3709. if (!SWIG_IsOK(res1)) {
  3710. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_filter_all" "', argument " "1"" of type '" "struct archive *""'");
  3711. }
  3712. arg1 = (struct archive *)(argp1);
  3713. result = (int)archive_read_support_filter_all(arg1);
  3714. resultobj = SWIG_From_int((int)(result));
  3715. return resultobj;
  3716. fail:
  3717. return NULL;
  3718. }
  3719. SWIGINTERN PyObject *_wrap_archive_read_support_filter_bzip2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3720. PyObject *resultobj = 0;
  3721. struct archive *arg1 = (struct archive *) 0 ;
  3722. void *argp1 = 0 ;
  3723. int res1 = 0 ;
  3724. PyObject *swig_obj[1] ;
  3725. int result;
  3726. if (!args) SWIG_fail;
  3727. swig_obj[0] = args;
  3728. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3729. if (!SWIG_IsOK(res1)) {
  3730. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_filter_bzip2" "', argument " "1"" of type '" "struct archive *""'");
  3731. }
  3732. arg1 = (struct archive *)(argp1);
  3733. result = (int)archive_read_support_filter_bzip2(arg1);
  3734. resultobj = SWIG_From_int((int)(result));
  3735. return resultobj;
  3736. fail:
  3737. return NULL;
  3738. }
  3739. SWIGINTERN PyObject *_wrap_archive_read_support_filter_compress(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3740. PyObject *resultobj = 0;
  3741. struct archive *arg1 = (struct archive *) 0 ;
  3742. void *argp1 = 0 ;
  3743. int res1 = 0 ;
  3744. PyObject *swig_obj[1] ;
  3745. int result;
  3746. if (!args) SWIG_fail;
  3747. swig_obj[0] = args;
  3748. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3749. if (!SWIG_IsOK(res1)) {
  3750. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_filter_compress" "', argument " "1"" of type '" "struct archive *""'");
  3751. }
  3752. arg1 = (struct archive *)(argp1);
  3753. result = (int)archive_read_support_filter_compress(arg1);
  3754. resultobj = SWIG_From_int((int)(result));
  3755. return resultobj;
  3756. fail:
  3757. return NULL;
  3758. }
  3759. SWIGINTERN PyObject *_wrap_archive_read_support_filter_gzip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3760. PyObject *resultobj = 0;
  3761. struct archive *arg1 = (struct archive *) 0 ;
  3762. void *argp1 = 0 ;
  3763. int res1 = 0 ;
  3764. PyObject *swig_obj[1] ;
  3765. int result;
  3766. if (!args) SWIG_fail;
  3767. swig_obj[0] = args;
  3768. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3769. if (!SWIG_IsOK(res1)) {
  3770. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_filter_gzip" "', argument " "1"" of type '" "struct archive *""'");
  3771. }
  3772. arg1 = (struct archive *)(argp1);
  3773. result = (int)archive_read_support_filter_gzip(arg1);
  3774. resultobj = SWIG_From_int((int)(result));
  3775. return resultobj;
  3776. fail:
  3777. return NULL;
  3778. }
  3779. SWIGINTERN PyObject *_wrap_archive_read_support_filter_grzip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3780. PyObject *resultobj = 0;
  3781. struct archive *arg1 = (struct archive *) 0 ;
  3782. void *argp1 = 0 ;
  3783. int res1 = 0 ;
  3784. PyObject *swig_obj[1] ;
  3785. int result;
  3786. if (!args) SWIG_fail;
  3787. swig_obj[0] = args;
  3788. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3789. if (!SWIG_IsOK(res1)) {
  3790. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_filter_grzip" "', argument " "1"" of type '" "struct archive *""'");
  3791. }
  3792. arg1 = (struct archive *)(argp1);
  3793. result = (int)archive_read_support_filter_grzip(arg1);
  3794. resultobj = SWIG_From_int((int)(result));
  3795. return resultobj;
  3796. fail:
  3797. return NULL;
  3798. }
  3799. SWIGINTERN PyObject *_wrap_archive_read_support_filter_lrzip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3800. PyObject *resultobj = 0;
  3801. struct archive *arg1 = (struct archive *) 0 ;
  3802. void *argp1 = 0 ;
  3803. int res1 = 0 ;
  3804. PyObject *swig_obj[1] ;
  3805. int result;
  3806. if (!args) SWIG_fail;
  3807. swig_obj[0] = args;
  3808. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3809. if (!SWIG_IsOK(res1)) {
  3810. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_filter_lrzip" "', argument " "1"" of type '" "struct archive *""'");
  3811. }
  3812. arg1 = (struct archive *)(argp1);
  3813. result = (int)archive_read_support_filter_lrzip(arg1);
  3814. resultobj = SWIG_From_int((int)(result));
  3815. return resultobj;
  3816. fail:
  3817. return NULL;
  3818. }
  3819. SWIGINTERN PyObject *_wrap_archive_read_support_filter_lz4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3820. PyObject *resultobj = 0;
  3821. struct archive *arg1 = (struct archive *) 0 ;
  3822. void *argp1 = 0 ;
  3823. int res1 = 0 ;
  3824. PyObject *swig_obj[1] ;
  3825. int result;
  3826. if (!args) SWIG_fail;
  3827. swig_obj[0] = args;
  3828. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3829. if (!SWIG_IsOK(res1)) {
  3830. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_filter_lz4" "', argument " "1"" of type '" "struct archive *""'");
  3831. }
  3832. arg1 = (struct archive *)(argp1);
  3833. result = (int)archive_read_support_filter_lz4(arg1);
  3834. resultobj = SWIG_From_int((int)(result));
  3835. return resultobj;
  3836. fail:
  3837. return NULL;
  3838. }
  3839. SWIGINTERN PyObject *_wrap_archive_read_support_filter_lzip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3840. PyObject *resultobj = 0;
  3841. struct archive *arg1 = (struct archive *) 0 ;
  3842. void *argp1 = 0 ;
  3843. int res1 = 0 ;
  3844. PyObject *swig_obj[1] ;
  3845. int result;
  3846. if (!args) SWIG_fail;
  3847. swig_obj[0] = args;
  3848. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3849. if (!SWIG_IsOK(res1)) {
  3850. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_filter_lzip" "', argument " "1"" of type '" "struct archive *""'");
  3851. }
  3852. arg1 = (struct archive *)(argp1);
  3853. result = (int)archive_read_support_filter_lzip(arg1);
  3854. resultobj = SWIG_From_int((int)(result));
  3855. return resultobj;
  3856. fail:
  3857. return NULL;
  3858. }
  3859. SWIGINTERN PyObject *_wrap_archive_read_support_filter_lzma(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3860. PyObject *resultobj = 0;
  3861. struct archive *arg1 = (struct archive *) 0 ;
  3862. void *argp1 = 0 ;
  3863. int res1 = 0 ;
  3864. PyObject *swig_obj[1] ;
  3865. int result;
  3866. if (!args) SWIG_fail;
  3867. swig_obj[0] = args;
  3868. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3869. if (!SWIG_IsOK(res1)) {
  3870. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_filter_lzma" "', argument " "1"" of type '" "struct archive *""'");
  3871. }
  3872. arg1 = (struct archive *)(argp1);
  3873. result = (int)archive_read_support_filter_lzma(arg1);
  3874. resultobj = SWIG_From_int((int)(result));
  3875. return resultobj;
  3876. fail:
  3877. return NULL;
  3878. }
  3879. SWIGINTERN PyObject *_wrap_archive_read_support_filter_lzop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3880. PyObject *resultobj = 0;
  3881. struct archive *arg1 = (struct archive *) 0 ;
  3882. void *argp1 = 0 ;
  3883. int res1 = 0 ;
  3884. PyObject *swig_obj[1] ;
  3885. int result;
  3886. if (!args) SWIG_fail;
  3887. swig_obj[0] = args;
  3888. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3889. if (!SWIG_IsOK(res1)) {
  3890. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_filter_lzop" "', argument " "1"" of type '" "struct archive *""'");
  3891. }
  3892. arg1 = (struct archive *)(argp1);
  3893. result = (int)archive_read_support_filter_lzop(arg1);
  3894. resultobj = SWIG_From_int((int)(result));
  3895. return resultobj;
  3896. fail:
  3897. return NULL;
  3898. }
  3899. SWIGINTERN PyObject *_wrap_archive_read_support_filter_none(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3900. PyObject *resultobj = 0;
  3901. struct archive *arg1 = (struct archive *) 0 ;
  3902. void *argp1 = 0 ;
  3903. int res1 = 0 ;
  3904. PyObject *swig_obj[1] ;
  3905. int result;
  3906. if (!args) SWIG_fail;
  3907. swig_obj[0] = args;
  3908. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3909. if (!SWIG_IsOK(res1)) {
  3910. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_filter_none" "', argument " "1"" of type '" "struct archive *""'");
  3911. }
  3912. arg1 = (struct archive *)(argp1);
  3913. result = (int)archive_read_support_filter_none(arg1);
  3914. resultobj = SWIG_From_int((int)(result));
  3915. return resultobj;
  3916. fail:
  3917. return NULL;
  3918. }
  3919. SWIGINTERN PyObject *_wrap_archive_read_support_filter_program(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3920. PyObject *resultobj = 0;
  3921. struct archive *arg1 = (struct archive *) 0 ;
  3922. char *arg2 = (char *) 0 ;
  3923. void *argp1 = 0 ;
  3924. int res1 = 0 ;
  3925. int res2 ;
  3926. char *buf2 = 0 ;
  3927. int alloc2 = 0 ;
  3928. PyObject *swig_obj[2] ;
  3929. int result;
  3930. if (!SWIG_Python_UnpackTuple(args, "archive_read_support_filter_program", 2, 2, swig_obj)) SWIG_fail;
  3931. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3932. if (!SWIG_IsOK(res1)) {
  3933. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_filter_program" "', argument " "1"" of type '" "struct archive *""'");
  3934. }
  3935. arg1 = (struct archive *)(argp1);
  3936. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  3937. if (!SWIG_IsOK(res2)) {
  3938. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_read_support_filter_program" "', argument " "2"" of type '" "char const *""'");
  3939. }
  3940. arg2 = (char *)(buf2);
  3941. result = (int)archive_read_support_filter_program(arg1,(char const *)arg2);
  3942. resultobj = SWIG_From_int((int)(result));
  3943. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3944. return resultobj;
  3945. fail:
  3946. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3947. return NULL;
  3948. }
  3949. SWIGINTERN PyObject *_wrap_archive_read_support_filter_program_signature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3950. PyObject *resultobj = 0;
  3951. struct archive *arg1 = (struct archive *) 0 ;
  3952. char *arg2 = (char *) 0 ;
  3953. void *arg3 = (void *) 0 ;
  3954. size_t arg4 ;
  3955. void *argp1 = 0 ;
  3956. int res1 = 0 ;
  3957. int res2 ;
  3958. char *buf2 = 0 ;
  3959. int alloc2 = 0 ;
  3960. int res3 ;
  3961. size_t val4 ;
  3962. int ecode4 = 0 ;
  3963. PyObject *swig_obj[4] ;
  3964. int result;
  3965. if (!SWIG_Python_UnpackTuple(args, "archive_read_support_filter_program_signature", 4, 4, swig_obj)) SWIG_fail;
  3966. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  3967. if (!SWIG_IsOK(res1)) {
  3968. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_filter_program_signature" "', argument " "1"" of type '" "struct archive *""'");
  3969. }
  3970. arg1 = (struct archive *)(argp1);
  3971. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  3972. if (!SWIG_IsOK(res2)) {
  3973. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_read_support_filter_program_signature" "', argument " "2"" of type '" "char const *""'");
  3974. }
  3975. arg2 = (char *)(buf2);
  3976. res3 = SWIG_ConvertPtr(swig_obj[2],SWIG_as_voidptrptr(&arg3), 0, 0);
  3977. if (!SWIG_IsOK(res3)) {
  3978. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "archive_read_support_filter_program_signature" "', argument " "3"" of type '" "void const *""'");
  3979. }
  3980. ecode4 = SWIG_AsVal_size_t(swig_obj[3], &val4);
  3981. if (!SWIG_IsOK(ecode4)) {
  3982. SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "archive_read_support_filter_program_signature" "', argument " "4"" of type '" "size_t""'");
  3983. }
  3984. arg4 = (size_t)(val4);
  3985. result = (int)archive_read_support_filter_program_signature(arg1,(char const *)arg2,(void const *)arg3,arg4);
  3986. resultobj = SWIG_From_int((int)(result));
  3987. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3988. return resultobj;
  3989. fail:
  3990. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  3991. return NULL;
  3992. }
  3993. SWIGINTERN PyObject *_wrap_archive_read_support_filter_rpm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  3994. PyObject *resultobj = 0;
  3995. struct archive *arg1 = (struct archive *) 0 ;
  3996. void *argp1 = 0 ;
  3997. int res1 = 0 ;
  3998. PyObject *swig_obj[1] ;
  3999. int result;
  4000. if (!args) SWIG_fail;
  4001. swig_obj[0] = args;
  4002. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4003. if (!SWIG_IsOK(res1)) {
  4004. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_filter_rpm" "', argument " "1"" of type '" "struct archive *""'");
  4005. }
  4006. arg1 = (struct archive *)(argp1);
  4007. result = (int)archive_read_support_filter_rpm(arg1);
  4008. resultobj = SWIG_From_int((int)(result));
  4009. return resultobj;
  4010. fail:
  4011. return NULL;
  4012. }
  4013. SWIGINTERN PyObject *_wrap_archive_read_support_filter_uu(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4014. PyObject *resultobj = 0;
  4015. struct archive *arg1 = (struct archive *) 0 ;
  4016. void *argp1 = 0 ;
  4017. int res1 = 0 ;
  4018. PyObject *swig_obj[1] ;
  4019. int result;
  4020. if (!args) SWIG_fail;
  4021. swig_obj[0] = args;
  4022. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4023. if (!SWIG_IsOK(res1)) {
  4024. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_filter_uu" "', argument " "1"" of type '" "struct archive *""'");
  4025. }
  4026. arg1 = (struct archive *)(argp1);
  4027. result = (int)archive_read_support_filter_uu(arg1);
  4028. resultobj = SWIG_From_int((int)(result));
  4029. return resultobj;
  4030. fail:
  4031. return NULL;
  4032. }
  4033. SWIGINTERN PyObject *_wrap_archive_read_support_filter_xz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4034. PyObject *resultobj = 0;
  4035. struct archive *arg1 = (struct archive *) 0 ;
  4036. void *argp1 = 0 ;
  4037. int res1 = 0 ;
  4038. PyObject *swig_obj[1] ;
  4039. int result;
  4040. if (!args) SWIG_fail;
  4041. swig_obj[0] = args;
  4042. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4043. if (!SWIG_IsOK(res1)) {
  4044. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_filter_xz" "', argument " "1"" of type '" "struct archive *""'");
  4045. }
  4046. arg1 = (struct archive *)(argp1);
  4047. result = (int)archive_read_support_filter_xz(arg1);
  4048. resultobj = SWIG_From_int((int)(result));
  4049. return resultobj;
  4050. fail:
  4051. return NULL;
  4052. }
  4053. SWIGINTERN PyObject *_wrap_archive_read_support_format_7zip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4054. PyObject *resultobj = 0;
  4055. struct archive *arg1 = (struct archive *) 0 ;
  4056. void *argp1 = 0 ;
  4057. int res1 = 0 ;
  4058. PyObject *swig_obj[1] ;
  4059. int result;
  4060. if (!args) SWIG_fail;
  4061. swig_obj[0] = args;
  4062. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4063. if (!SWIG_IsOK(res1)) {
  4064. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_7zip" "', argument " "1"" of type '" "struct archive *""'");
  4065. }
  4066. arg1 = (struct archive *)(argp1);
  4067. result = (int)archive_read_support_format_7zip(arg1);
  4068. resultobj = SWIG_From_int((int)(result));
  4069. return resultobj;
  4070. fail:
  4071. return NULL;
  4072. }
  4073. SWIGINTERN PyObject *_wrap_archive_read_support_format_all(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4074. PyObject *resultobj = 0;
  4075. struct archive *arg1 = (struct archive *) 0 ;
  4076. void *argp1 = 0 ;
  4077. int res1 = 0 ;
  4078. PyObject *swig_obj[1] ;
  4079. int result;
  4080. if (!args) SWIG_fail;
  4081. swig_obj[0] = args;
  4082. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4083. if (!SWIG_IsOK(res1)) {
  4084. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_all" "', argument " "1"" of type '" "struct archive *""'");
  4085. }
  4086. arg1 = (struct archive *)(argp1);
  4087. result = (int)archive_read_support_format_all(arg1);
  4088. resultobj = SWIG_From_int((int)(result));
  4089. return resultobj;
  4090. fail:
  4091. return NULL;
  4092. }
  4093. SWIGINTERN PyObject *_wrap_archive_read_support_format_ar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4094. PyObject *resultobj = 0;
  4095. struct archive *arg1 = (struct archive *) 0 ;
  4096. void *argp1 = 0 ;
  4097. int res1 = 0 ;
  4098. PyObject *swig_obj[1] ;
  4099. int result;
  4100. if (!args) SWIG_fail;
  4101. swig_obj[0] = args;
  4102. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4103. if (!SWIG_IsOK(res1)) {
  4104. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_ar" "', argument " "1"" of type '" "struct archive *""'");
  4105. }
  4106. arg1 = (struct archive *)(argp1);
  4107. result = (int)archive_read_support_format_ar(arg1);
  4108. resultobj = SWIG_From_int((int)(result));
  4109. return resultobj;
  4110. fail:
  4111. return NULL;
  4112. }
  4113. SWIGINTERN PyObject *_wrap_archive_read_support_format_by_code(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4114. PyObject *resultobj = 0;
  4115. struct archive *arg1 = (struct archive *) 0 ;
  4116. int arg2 ;
  4117. void *argp1 = 0 ;
  4118. int res1 = 0 ;
  4119. int val2 ;
  4120. int ecode2 = 0 ;
  4121. PyObject *swig_obj[2] ;
  4122. int result;
  4123. if (!SWIG_Python_UnpackTuple(args, "archive_read_support_format_by_code", 2, 2, swig_obj)) SWIG_fail;
  4124. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4125. if (!SWIG_IsOK(res1)) {
  4126. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_by_code" "', argument " "1"" of type '" "struct archive *""'");
  4127. }
  4128. arg1 = (struct archive *)(argp1);
  4129. ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  4130. if (!SWIG_IsOK(ecode2)) {
  4131. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "archive_read_support_format_by_code" "', argument " "2"" of type '" "int""'");
  4132. }
  4133. arg2 = (int)(val2);
  4134. result = (int)archive_read_support_format_by_code(arg1,arg2);
  4135. resultobj = SWIG_From_int((int)(result));
  4136. return resultobj;
  4137. fail:
  4138. return NULL;
  4139. }
  4140. SWIGINTERN PyObject *_wrap_archive_read_support_format_cab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4141. PyObject *resultobj = 0;
  4142. struct archive *arg1 = (struct archive *) 0 ;
  4143. void *argp1 = 0 ;
  4144. int res1 = 0 ;
  4145. PyObject *swig_obj[1] ;
  4146. int result;
  4147. if (!args) SWIG_fail;
  4148. swig_obj[0] = args;
  4149. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4150. if (!SWIG_IsOK(res1)) {
  4151. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_cab" "', argument " "1"" of type '" "struct archive *""'");
  4152. }
  4153. arg1 = (struct archive *)(argp1);
  4154. result = (int)archive_read_support_format_cab(arg1);
  4155. resultobj = SWIG_From_int((int)(result));
  4156. return resultobj;
  4157. fail:
  4158. return NULL;
  4159. }
  4160. SWIGINTERN PyObject *_wrap_archive_read_support_format_cpio(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4161. PyObject *resultobj = 0;
  4162. struct archive *arg1 = (struct archive *) 0 ;
  4163. void *argp1 = 0 ;
  4164. int res1 = 0 ;
  4165. PyObject *swig_obj[1] ;
  4166. int result;
  4167. if (!args) SWIG_fail;
  4168. swig_obj[0] = args;
  4169. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4170. if (!SWIG_IsOK(res1)) {
  4171. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_cpio" "', argument " "1"" of type '" "struct archive *""'");
  4172. }
  4173. arg1 = (struct archive *)(argp1);
  4174. result = (int)archive_read_support_format_cpio(arg1);
  4175. resultobj = SWIG_From_int((int)(result));
  4176. return resultobj;
  4177. fail:
  4178. return NULL;
  4179. }
  4180. SWIGINTERN PyObject *_wrap_archive_read_support_format_empty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4181. PyObject *resultobj = 0;
  4182. struct archive *arg1 = (struct archive *) 0 ;
  4183. void *argp1 = 0 ;
  4184. int res1 = 0 ;
  4185. PyObject *swig_obj[1] ;
  4186. int result;
  4187. if (!args) SWIG_fail;
  4188. swig_obj[0] = args;
  4189. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4190. if (!SWIG_IsOK(res1)) {
  4191. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_empty" "', argument " "1"" of type '" "struct archive *""'");
  4192. }
  4193. arg1 = (struct archive *)(argp1);
  4194. result = (int)archive_read_support_format_empty(arg1);
  4195. resultobj = SWIG_From_int((int)(result));
  4196. return resultobj;
  4197. fail:
  4198. return NULL;
  4199. }
  4200. SWIGINTERN PyObject *_wrap_archive_read_support_format_gnutar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4201. PyObject *resultobj = 0;
  4202. struct archive *arg1 = (struct archive *) 0 ;
  4203. void *argp1 = 0 ;
  4204. int res1 = 0 ;
  4205. PyObject *swig_obj[1] ;
  4206. int result;
  4207. if (!args) SWIG_fail;
  4208. swig_obj[0] = args;
  4209. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4210. if (!SWIG_IsOK(res1)) {
  4211. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_gnutar" "', argument " "1"" of type '" "struct archive *""'");
  4212. }
  4213. arg1 = (struct archive *)(argp1);
  4214. result = (int)archive_read_support_format_gnutar(arg1);
  4215. resultobj = SWIG_From_int((int)(result));
  4216. return resultobj;
  4217. fail:
  4218. return NULL;
  4219. }
  4220. SWIGINTERN PyObject *_wrap_archive_read_support_format_iso9660(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4221. PyObject *resultobj = 0;
  4222. struct archive *arg1 = (struct archive *) 0 ;
  4223. void *argp1 = 0 ;
  4224. int res1 = 0 ;
  4225. PyObject *swig_obj[1] ;
  4226. int result;
  4227. if (!args) SWIG_fail;
  4228. swig_obj[0] = args;
  4229. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4230. if (!SWIG_IsOK(res1)) {
  4231. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_iso9660" "', argument " "1"" of type '" "struct archive *""'");
  4232. }
  4233. arg1 = (struct archive *)(argp1);
  4234. result = (int)archive_read_support_format_iso9660(arg1);
  4235. resultobj = SWIG_From_int((int)(result));
  4236. return resultobj;
  4237. fail:
  4238. return NULL;
  4239. }
  4240. SWIGINTERN PyObject *_wrap_archive_read_support_format_lha(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4241. PyObject *resultobj = 0;
  4242. struct archive *arg1 = (struct archive *) 0 ;
  4243. void *argp1 = 0 ;
  4244. int res1 = 0 ;
  4245. PyObject *swig_obj[1] ;
  4246. int result;
  4247. if (!args) SWIG_fail;
  4248. swig_obj[0] = args;
  4249. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4250. if (!SWIG_IsOK(res1)) {
  4251. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_lha" "', argument " "1"" of type '" "struct archive *""'");
  4252. }
  4253. arg1 = (struct archive *)(argp1);
  4254. result = (int)archive_read_support_format_lha(arg1);
  4255. resultobj = SWIG_From_int((int)(result));
  4256. return resultobj;
  4257. fail:
  4258. return NULL;
  4259. }
  4260. SWIGINTERN PyObject *_wrap_archive_read_support_format_rar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4261. PyObject *resultobj = 0;
  4262. struct archive *arg1 = (struct archive *) 0 ;
  4263. void *argp1 = 0 ;
  4264. int res1 = 0 ;
  4265. PyObject *swig_obj[1] ;
  4266. int result;
  4267. if (!args) SWIG_fail;
  4268. swig_obj[0] = args;
  4269. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4270. if (!SWIG_IsOK(res1)) {
  4271. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_rar" "', argument " "1"" of type '" "struct archive *""'");
  4272. }
  4273. arg1 = (struct archive *)(argp1);
  4274. result = (int)archive_read_support_format_rar(arg1);
  4275. resultobj = SWIG_From_int((int)(result));
  4276. return resultobj;
  4277. fail:
  4278. return NULL;
  4279. }
  4280. SWIGINTERN PyObject *_wrap_archive_read_support_format_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4281. PyObject *resultobj = 0;
  4282. struct archive *arg1 = (struct archive *) 0 ;
  4283. void *argp1 = 0 ;
  4284. int res1 = 0 ;
  4285. PyObject *swig_obj[1] ;
  4286. int result;
  4287. if (!args) SWIG_fail;
  4288. swig_obj[0] = args;
  4289. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4290. if (!SWIG_IsOK(res1)) {
  4291. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_raw" "', argument " "1"" of type '" "struct archive *""'");
  4292. }
  4293. arg1 = (struct archive *)(argp1);
  4294. result = (int)archive_read_support_format_raw(arg1);
  4295. resultobj = SWIG_From_int((int)(result));
  4296. return resultobj;
  4297. fail:
  4298. return NULL;
  4299. }
  4300. SWIGINTERN PyObject *_wrap_archive_read_support_format_tar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4301. PyObject *resultobj = 0;
  4302. struct archive *arg1 = (struct archive *) 0 ;
  4303. void *argp1 = 0 ;
  4304. int res1 = 0 ;
  4305. PyObject *swig_obj[1] ;
  4306. int result;
  4307. if (!args) SWIG_fail;
  4308. swig_obj[0] = args;
  4309. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4310. if (!SWIG_IsOK(res1)) {
  4311. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_tar" "', argument " "1"" of type '" "struct archive *""'");
  4312. }
  4313. arg1 = (struct archive *)(argp1);
  4314. result = (int)archive_read_support_format_tar(arg1);
  4315. resultobj = SWIG_From_int((int)(result));
  4316. return resultobj;
  4317. fail:
  4318. return NULL;
  4319. }
  4320. SWIGINTERN PyObject *_wrap_archive_read_support_format_warc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4321. PyObject *resultobj = 0;
  4322. struct archive *arg1 = (struct archive *) 0 ;
  4323. void *argp1 = 0 ;
  4324. int res1 = 0 ;
  4325. PyObject *swig_obj[1] ;
  4326. int result;
  4327. if (!args) SWIG_fail;
  4328. swig_obj[0] = args;
  4329. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4330. if (!SWIG_IsOK(res1)) {
  4331. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_warc" "', argument " "1"" of type '" "struct archive *""'");
  4332. }
  4333. arg1 = (struct archive *)(argp1);
  4334. result = (int)archive_read_support_format_warc(arg1);
  4335. resultobj = SWIG_From_int((int)(result));
  4336. return resultobj;
  4337. fail:
  4338. return NULL;
  4339. }
  4340. SWIGINTERN PyObject *_wrap_archive_read_support_format_xar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4341. PyObject *resultobj = 0;
  4342. struct archive *arg1 = (struct archive *) 0 ;
  4343. void *argp1 = 0 ;
  4344. int res1 = 0 ;
  4345. PyObject *swig_obj[1] ;
  4346. int result;
  4347. if (!args) SWIG_fail;
  4348. swig_obj[0] = args;
  4349. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4350. if (!SWIG_IsOK(res1)) {
  4351. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_xar" "', argument " "1"" of type '" "struct archive *""'");
  4352. }
  4353. arg1 = (struct archive *)(argp1);
  4354. result = (int)archive_read_support_format_xar(arg1);
  4355. resultobj = SWIG_From_int((int)(result));
  4356. return resultobj;
  4357. fail:
  4358. return NULL;
  4359. }
  4360. SWIGINTERN PyObject *_wrap_archive_read_support_format_zip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4361. PyObject *resultobj = 0;
  4362. struct archive *arg1 = (struct archive *) 0 ;
  4363. void *argp1 = 0 ;
  4364. int res1 = 0 ;
  4365. PyObject *swig_obj[1] ;
  4366. int result;
  4367. if (!args) SWIG_fail;
  4368. swig_obj[0] = args;
  4369. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4370. if (!SWIG_IsOK(res1)) {
  4371. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_zip" "', argument " "1"" of type '" "struct archive *""'");
  4372. }
  4373. arg1 = (struct archive *)(argp1);
  4374. result = (int)archive_read_support_format_zip(arg1);
  4375. resultobj = SWIG_From_int((int)(result));
  4376. return resultobj;
  4377. fail:
  4378. return NULL;
  4379. }
  4380. SWIGINTERN PyObject *_wrap_archive_read_support_format_zip_streamable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4381. PyObject *resultobj = 0;
  4382. struct archive *arg1 = (struct archive *) 0 ;
  4383. void *argp1 = 0 ;
  4384. int res1 = 0 ;
  4385. PyObject *swig_obj[1] ;
  4386. int result;
  4387. if (!args) SWIG_fail;
  4388. swig_obj[0] = args;
  4389. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4390. if (!SWIG_IsOK(res1)) {
  4391. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_zip_streamable" "', argument " "1"" of type '" "struct archive *""'");
  4392. }
  4393. arg1 = (struct archive *)(argp1);
  4394. result = (int)archive_read_support_format_zip_streamable(arg1);
  4395. resultobj = SWIG_From_int((int)(result));
  4396. return resultobj;
  4397. fail:
  4398. return NULL;
  4399. }
  4400. SWIGINTERN PyObject *_wrap_archive_read_support_format_zip_seekable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4401. PyObject *resultobj = 0;
  4402. struct archive *arg1 = (struct archive *) 0 ;
  4403. void *argp1 = 0 ;
  4404. int res1 = 0 ;
  4405. PyObject *swig_obj[1] ;
  4406. int result;
  4407. if (!args) SWIG_fail;
  4408. swig_obj[0] = args;
  4409. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4410. if (!SWIG_IsOK(res1)) {
  4411. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_support_format_zip_seekable" "', argument " "1"" of type '" "struct archive *""'");
  4412. }
  4413. arg1 = (struct archive *)(argp1);
  4414. result = (int)archive_read_support_format_zip_seekable(arg1);
  4415. resultobj = SWIG_From_int((int)(result));
  4416. return resultobj;
  4417. fail:
  4418. return NULL;
  4419. }
  4420. SWIGINTERN PyObject *_wrap_archive_read_set_format(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4421. PyObject *resultobj = 0;
  4422. struct archive *arg1 = (struct archive *) 0 ;
  4423. int arg2 ;
  4424. void *argp1 = 0 ;
  4425. int res1 = 0 ;
  4426. int val2 ;
  4427. int ecode2 = 0 ;
  4428. PyObject *swig_obj[2] ;
  4429. int result;
  4430. if (!SWIG_Python_UnpackTuple(args, "archive_read_set_format", 2, 2, swig_obj)) SWIG_fail;
  4431. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4432. if (!SWIG_IsOK(res1)) {
  4433. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_set_format" "', argument " "1"" of type '" "struct archive *""'");
  4434. }
  4435. arg1 = (struct archive *)(argp1);
  4436. ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  4437. if (!SWIG_IsOK(ecode2)) {
  4438. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "archive_read_set_format" "', argument " "2"" of type '" "int""'");
  4439. }
  4440. arg2 = (int)(val2);
  4441. result = (int)archive_read_set_format(arg1,arg2);
  4442. resultobj = SWIG_From_int((int)(result));
  4443. return resultobj;
  4444. fail:
  4445. return NULL;
  4446. }
  4447. SWIGINTERN PyObject *_wrap_archive_read_append_filter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4448. PyObject *resultobj = 0;
  4449. struct archive *arg1 = (struct archive *) 0 ;
  4450. int arg2 ;
  4451. void *argp1 = 0 ;
  4452. int res1 = 0 ;
  4453. int val2 ;
  4454. int ecode2 = 0 ;
  4455. PyObject *swig_obj[2] ;
  4456. int result;
  4457. if (!SWIG_Python_UnpackTuple(args, "archive_read_append_filter", 2, 2, swig_obj)) SWIG_fail;
  4458. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4459. if (!SWIG_IsOK(res1)) {
  4460. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_append_filter" "', argument " "1"" of type '" "struct archive *""'");
  4461. }
  4462. arg1 = (struct archive *)(argp1);
  4463. ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  4464. if (!SWIG_IsOK(ecode2)) {
  4465. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "archive_read_append_filter" "', argument " "2"" of type '" "int""'");
  4466. }
  4467. arg2 = (int)(val2);
  4468. result = (int)archive_read_append_filter(arg1,arg2);
  4469. resultobj = SWIG_From_int((int)(result));
  4470. return resultobj;
  4471. fail:
  4472. return NULL;
  4473. }
  4474. SWIGINTERN PyObject *_wrap_archive_read_append_filter_program(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4475. PyObject *resultobj = 0;
  4476. struct archive *arg1 = (struct archive *) 0 ;
  4477. char *arg2 = (char *) 0 ;
  4478. void *argp1 = 0 ;
  4479. int res1 = 0 ;
  4480. int res2 ;
  4481. char *buf2 = 0 ;
  4482. int alloc2 = 0 ;
  4483. PyObject *swig_obj[2] ;
  4484. int result;
  4485. if (!SWIG_Python_UnpackTuple(args, "archive_read_append_filter_program", 2, 2, swig_obj)) SWIG_fail;
  4486. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4487. if (!SWIG_IsOK(res1)) {
  4488. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_append_filter_program" "', argument " "1"" of type '" "struct archive *""'");
  4489. }
  4490. arg1 = (struct archive *)(argp1);
  4491. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  4492. if (!SWIG_IsOK(res2)) {
  4493. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_read_append_filter_program" "', argument " "2"" of type '" "char const *""'");
  4494. }
  4495. arg2 = (char *)(buf2);
  4496. result = (int)archive_read_append_filter_program(arg1,(char const *)arg2);
  4497. resultobj = SWIG_From_int((int)(result));
  4498. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  4499. return resultobj;
  4500. fail:
  4501. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  4502. return NULL;
  4503. }
  4504. SWIGINTERN PyObject *_wrap_archive_read_append_filter_program_signature(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4505. PyObject *resultobj = 0;
  4506. struct archive *arg1 = (struct archive *) 0 ;
  4507. char *arg2 = (char *) 0 ;
  4508. void *arg3 = (void *) 0 ;
  4509. size_t arg4 ;
  4510. void *argp1 = 0 ;
  4511. int res1 = 0 ;
  4512. int res2 ;
  4513. char *buf2 = 0 ;
  4514. int alloc2 = 0 ;
  4515. int res3 ;
  4516. size_t val4 ;
  4517. int ecode4 = 0 ;
  4518. PyObject *swig_obj[4] ;
  4519. int result;
  4520. if (!SWIG_Python_UnpackTuple(args, "archive_read_append_filter_program_signature", 4, 4, swig_obj)) SWIG_fail;
  4521. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4522. if (!SWIG_IsOK(res1)) {
  4523. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_append_filter_program_signature" "', argument " "1"" of type '" "struct archive *""'");
  4524. }
  4525. arg1 = (struct archive *)(argp1);
  4526. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  4527. if (!SWIG_IsOK(res2)) {
  4528. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_read_append_filter_program_signature" "', argument " "2"" of type '" "char const *""'");
  4529. }
  4530. arg2 = (char *)(buf2);
  4531. res3 = SWIG_ConvertPtr(swig_obj[2],SWIG_as_voidptrptr(&arg3), 0, 0);
  4532. if (!SWIG_IsOK(res3)) {
  4533. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "archive_read_append_filter_program_signature" "', argument " "3"" of type '" "void const *""'");
  4534. }
  4535. ecode4 = SWIG_AsVal_size_t(swig_obj[3], &val4);
  4536. if (!SWIG_IsOK(ecode4)) {
  4537. SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "archive_read_append_filter_program_signature" "', argument " "4"" of type '" "size_t""'");
  4538. }
  4539. arg4 = (size_t)(val4);
  4540. result = (int)archive_read_append_filter_program_signature(arg1,(char const *)arg2,(void const *)arg3,arg4);
  4541. resultobj = SWIG_From_int((int)(result));
  4542. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  4543. return resultobj;
  4544. fail:
  4545. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  4546. return NULL;
  4547. }
  4548. SWIGINTERN PyObject *_wrap_archive_write_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4549. PyObject *resultobj = 0;
  4550. struct archive *result = 0 ;
  4551. if (!SWIG_Python_UnpackTuple(args, "archive_write_new", 0, 0, 0)) SWIG_fail;
  4552. result = (struct archive *)archive_write_new();
  4553. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_archive, 0 | 0 );
  4554. return resultobj;
  4555. fail:
  4556. return NULL;
  4557. }
  4558. SWIGINTERN PyObject *_wrap_archive_write_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4559. PyObject *resultobj = 0;
  4560. struct archive *arg1 = (struct archive *) 0 ;
  4561. void *argp1 = 0 ;
  4562. int res1 = 0 ;
  4563. PyObject *swig_obj[1] ;
  4564. int result;
  4565. if (!args) SWIG_fail;
  4566. swig_obj[0] = args;
  4567. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4568. if (!SWIG_IsOK(res1)) {
  4569. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_free" "', argument " "1"" of type '" "struct archive *""'");
  4570. }
  4571. arg1 = (struct archive *)(argp1);
  4572. result = (int)archive_write_free(arg1);
  4573. resultobj = SWIG_From_int((int)(result));
  4574. return resultobj;
  4575. fail:
  4576. return NULL;
  4577. }
  4578. SWIGINTERN PyObject *_wrap_archive_write_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4579. PyObject *resultobj = 0;
  4580. struct archive *arg1 = (struct archive *) 0 ;
  4581. void *arg2 = (void *) 0 ;
  4582. archive_open_callback *arg3 = (archive_open_callback *) 0 ;
  4583. archive_write_callback *arg4 = (archive_write_callback *) 0 ;
  4584. archive_close_callback *arg5 = (archive_close_callback *) 0 ;
  4585. void *argp1 = 0 ;
  4586. int res1 = 0 ;
  4587. int res2 ;
  4588. void *argp3 = 0 ;
  4589. int res3 = 0 ;
  4590. void *argp4 = 0 ;
  4591. int res4 = 0 ;
  4592. void *argp5 = 0 ;
  4593. int res5 = 0 ;
  4594. PyObject *swig_obj[5] ;
  4595. int result;
  4596. if (!SWIG_Python_UnpackTuple(args, "archive_write_open", 5, 5, swig_obj)) SWIG_fail;
  4597. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4598. if (!SWIG_IsOK(res1)) {
  4599. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_open" "', argument " "1"" of type '" "struct archive *""'");
  4600. }
  4601. arg1 = (struct archive *)(argp1);
  4602. res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0);
  4603. if (!SWIG_IsOK(res2)) {
  4604. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_open" "', argument " "2"" of type '" "void *""'");
  4605. }
  4606. res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_archive_open_callback, 0 | 0 );
  4607. if (!SWIG_IsOK(res3)) {
  4608. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "archive_write_open" "', argument " "3"" of type '" "archive_open_callback *""'");
  4609. }
  4610. arg3 = (archive_open_callback *)(argp3);
  4611. res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_archive_write_callback, 0 | 0 );
  4612. if (!SWIG_IsOK(res4)) {
  4613. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "archive_write_open" "', argument " "4"" of type '" "archive_write_callback *""'");
  4614. }
  4615. arg4 = (archive_write_callback *)(argp4);
  4616. res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_archive_close_callback, 0 | 0 );
  4617. if (!SWIG_IsOK(res5)) {
  4618. SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "archive_write_open" "', argument " "5"" of type '" "archive_close_callback *""'");
  4619. }
  4620. arg5 = (archive_close_callback *)(argp5);
  4621. result = (int)archive_write_open(arg1,arg2,arg3,arg4,arg5);
  4622. resultobj = SWIG_From_int((int)(result));
  4623. return resultobj;
  4624. fail:
  4625. return NULL;
  4626. }
  4627. SWIGINTERN PyObject *_wrap_archive_write_open_fd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4628. PyObject *resultobj = 0;
  4629. struct archive *arg1 = (struct archive *) 0 ;
  4630. int arg2 ;
  4631. void *argp1 = 0 ;
  4632. int res1 = 0 ;
  4633. int val2 ;
  4634. int ecode2 = 0 ;
  4635. PyObject *swig_obj[2] ;
  4636. int result;
  4637. if (!SWIG_Python_UnpackTuple(args, "archive_write_open_fd", 2, 2, swig_obj)) SWIG_fail;
  4638. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4639. if (!SWIG_IsOK(res1)) {
  4640. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_open_fd" "', argument " "1"" of type '" "struct archive *""'");
  4641. }
  4642. arg1 = (struct archive *)(argp1);
  4643. ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  4644. if (!SWIG_IsOK(ecode2)) {
  4645. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "archive_write_open_fd" "', argument " "2"" of type '" "int""'");
  4646. }
  4647. arg2 = (int)(val2);
  4648. result = (int)archive_write_open_fd(arg1,arg2);
  4649. resultobj = SWIG_From_int((int)(result));
  4650. return resultobj;
  4651. fail:
  4652. return NULL;
  4653. }
  4654. SWIGINTERN PyObject *_wrap_archive_write_open_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4655. PyObject *resultobj = 0;
  4656. struct archive *arg1 = (struct archive *) 0 ;
  4657. char *arg2 = (char *) 0 ;
  4658. void *argp1 = 0 ;
  4659. int res1 = 0 ;
  4660. int res2 ;
  4661. char *buf2 = 0 ;
  4662. int alloc2 = 0 ;
  4663. PyObject *swig_obj[2] ;
  4664. int result;
  4665. if (!SWIG_Python_UnpackTuple(args, "archive_write_open_filename", 2, 2, swig_obj)) SWIG_fail;
  4666. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4667. if (!SWIG_IsOK(res1)) {
  4668. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_open_filename" "', argument " "1"" of type '" "struct archive *""'");
  4669. }
  4670. arg1 = (struct archive *)(argp1);
  4671. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  4672. if (!SWIG_IsOK(res2)) {
  4673. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_open_filename" "', argument " "2"" of type '" "char const *""'");
  4674. }
  4675. arg2 = (char *)(buf2);
  4676. result = (int)archive_write_open_filename(arg1,(char const *)arg2);
  4677. resultobj = SWIG_From_int((int)(result));
  4678. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  4679. return resultobj;
  4680. fail:
  4681. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  4682. return NULL;
  4683. }
  4684. SWIGINTERN PyObject *_wrap_archive_write_open_filename_w(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4685. PyObject *resultobj = 0;
  4686. struct archive *arg1 = (struct archive *) 0 ;
  4687. wchar_t *arg2 = (wchar_t *) 0 ;
  4688. void *argp1 = 0 ;
  4689. int res1 = 0 ;
  4690. void *argp2 = 0 ;
  4691. int res2 = 0 ;
  4692. PyObject *swig_obj[2] ;
  4693. int result;
  4694. if (!SWIG_Python_UnpackTuple(args, "archive_write_open_filename_w", 2, 2, swig_obj)) SWIG_fail;
  4695. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4696. if (!SWIG_IsOK(res1)) {
  4697. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_open_filename_w" "', argument " "1"" of type '" "struct archive *""'");
  4698. }
  4699. arg1 = (struct archive *)(argp1);
  4700. res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_wchar_t, 0 | 0 );
  4701. if (!SWIG_IsOK(res2)) {
  4702. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_open_filename_w" "', argument " "2"" of type '" "wchar_t const *""'");
  4703. }
  4704. arg2 = (wchar_t *)(argp2);
  4705. result = (int)archive_write_open_filename_w(arg1,(wchar_t const *)arg2);
  4706. resultobj = SWIG_From_int((int)(result));
  4707. return resultobj;
  4708. fail:
  4709. return NULL;
  4710. }
  4711. SWIGINTERN PyObject *_wrap_archive_write_open_memory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4712. PyObject *resultobj = 0;
  4713. struct archive *arg1 = (struct archive *) 0 ;
  4714. void *arg2 = (void *) 0 ;
  4715. size_t arg3 ;
  4716. size_t *arg4 = (size_t *) 0 ;
  4717. void *argp1 = 0 ;
  4718. int res1 = 0 ;
  4719. int res2 ;
  4720. size_t val3 ;
  4721. int ecode3 = 0 ;
  4722. void *argp4 = 0 ;
  4723. int res4 = 0 ;
  4724. PyObject *swig_obj[4] ;
  4725. int result;
  4726. if (!SWIG_Python_UnpackTuple(args, "archive_write_open_memory", 4, 4, swig_obj)) SWIG_fail;
  4727. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4728. if (!SWIG_IsOK(res1)) {
  4729. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_open_memory" "', argument " "1"" of type '" "struct archive *""'");
  4730. }
  4731. arg1 = (struct archive *)(argp1);
  4732. res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0);
  4733. if (!SWIG_IsOK(res2)) {
  4734. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_open_memory" "', argument " "2"" of type '" "void *""'");
  4735. }
  4736. ecode3 = SWIG_AsVal_size_t(swig_obj[2], &val3);
  4737. if (!SWIG_IsOK(ecode3)) {
  4738. SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "archive_write_open_memory" "', argument " "3"" of type '" "size_t""'");
  4739. }
  4740. arg3 = (size_t)(val3);
  4741. res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_size_t, 0 | 0 );
  4742. if (!SWIG_IsOK(res4)) {
  4743. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "archive_write_open_memory" "', argument " "4"" of type '" "size_t *""'");
  4744. }
  4745. arg4 = (size_t *)(argp4);
  4746. result = (int)archive_write_open_memory(arg1,arg2,arg3,arg4);
  4747. resultobj = SWIG_From_int((int)(result));
  4748. return resultobj;
  4749. fail:
  4750. return NULL;
  4751. }
  4752. SWIGINTERN PyObject *_wrap_archive_write_close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4753. PyObject *resultobj = 0;
  4754. struct archive *arg1 = (struct archive *) 0 ;
  4755. void *argp1 = 0 ;
  4756. int res1 = 0 ;
  4757. PyObject *swig_obj[1] ;
  4758. int result;
  4759. if (!args) SWIG_fail;
  4760. swig_obj[0] = args;
  4761. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4762. if (!SWIG_IsOK(res1)) {
  4763. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_close" "', argument " "1"" of type '" "struct archive *""'");
  4764. }
  4765. arg1 = (struct archive *)(argp1);
  4766. result = (int)archive_write_close(arg1);
  4767. resultobj = SWIG_From_int((int)(result));
  4768. return resultobj;
  4769. fail:
  4770. return NULL;
  4771. }
  4772. SWIGINTERN PyObject *_wrap_archive_write_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4773. PyObject *resultobj = 0;
  4774. struct archive *arg1 = (struct archive *) 0 ;
  4775. struct archive_entry *arg2 = (struct archive_entry *) 0 ;
  4776. void *argp1 = 0 ;
  4777. int res1 = 0 ;
  4778. void *argp2 = 0 ;
  4779. int res2 = 0 ;
  4780. PyObject *swig_obj[2] ;
  4781. int result;
  4782. if (!SWIG_Python_UnpackTuple(args, "archive_write_header", 2, 2, swig_obj)) SWIG_fail;
  4783. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4784. if (!SWIG_IsOK(res1)) {
  4785. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_header" "', argument " "1"" of type '" "struct archive *""'");
  4786. }
  4787. arg1 = (struct archive *)(argp1);
  4788. res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_archive_entry, 0 | 0 );
  4789. if (!SWIG_IsOK(res2)) {
  4790. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_header" "', argument " "2"" of type '" "struct archive_entry *""'");
  4791. }
  4792. arg2 = (struct archive_entry *)(argp2);
  4793. result = (int)archive_write_header(arg1,arg2);
  4794. resultobj = SWIG_From_int((int)(result));
  4795. return resultobj;
  4796. fail:
  4797. return NULL;
  4798. }
  4799. SWIGINTERN PyObject *_wrap_archive_write_set_format_option(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4800. PyObject *resultobj = 0;
  4801. struct archive *arg1 = (struct archive *) 0 ;
  4802. char *arg2 = (char *) 0 ;
  4803. char *arg3 = (char *) 0 ;
  4804. char *arg4 = (char *) 0 ;
  4805. void *argp1 = 0 ;
  4806. int res1 = 0 ;
  4807. int res2 ;
  4808. char *buf2 = 0 ;
  4809. int alloc2 = 0 ;
  4810. int res3 ;
  4811. char *buf3 = 0 ;
  4812. int alloc3 = 0 ;
  4813. int res4 ;
  4814. char *buf4 = 0 ;
  4815. int alloc4 = 0 ;
  4816. PyObject *swig_obj[4] ;
  4817. int result;
  4818. if (!SWIG_Python_UnpackTuple(args, "archive_write_set_format_option", 4, 4, swig_obj)) SWIG_fail;
  4819. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4820. if (!SWIG_IsOK(res1)) {
  4821. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_option" "', argument " "1"" of type '" "struct archive *""'");
  4822. }
  4823. arg1 = (struct archive *)(argp1);
  4824. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  4825. if (!SWIG_IsOK(res2)) {
  4826. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_set_format_option" "', argument " "2"" of type '" "char const *""'");
  4827. }
  4828. arg2 = (char *)(buf2);
  4829. res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  4830. if (!SWIG_IsOK(res3)) {
  4831. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "archive_write_set_format_option" "', argument " "3"" of type '" "char const *""'");
  4832. }
  4833. arg3 = (char *)(buf3);
  4834. res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  4835. if (!SWIG_IsOK(res4)) {
  4836. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "archive_write_set_format_option" "', argument " "4"" of type '" "char const *""'");
  4837. }
  4838. arg4 = (char *)(buf4);
  4839. result = (int)archive_write_set_format_option(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  4840. resultobj = SWIG_From_int((int)(result));
  4841. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  4842. if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  4843. if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  4844. return resultobj;
  4845. fail:
  4846. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  4847. if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  4848. if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  4849. return NULL;
  4850. }
  4851. SWIGINTERN PyObject *_wrap_archive_write_set_filter_option(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4852. PyObject *resultobj = 0;
  4853. struct archive *arg1 = (struct archive *) 0 ;
  4854. char *arg2 = (char *) 0 ;
  4855. char *arg3 = (char *) 0 ;
  4856. char *arg4 = (char *) 0 ;
  4857. void *argp1 = 0 ;
  4858. int res1 = 0 ;
  4859. int res2 ;
  4860. char *buf2 = 0 ;
  4861. int alloc2 = 0 ;
  4862. int res3 ;
  4863. char *buf3 = 0 ;
  4864. int alloc3 = 0 ;
  4865. int res4 ;
  4866. char *buf4 = 0 ;
  4867. int alloc4 = 0 ;
  4868. PyObject *swig_obj[4] ;
  4869. int result;
  4870. if (!SWIG_Python_UnpackTuple(args, "archive_write_set_filter_option", 4, 4, swig_obj)) SWIG_fail;
  4871. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4872. if (!SWIG_IsOK(res1)) {
  4873. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_filter_option" "', argument " "1"" of type '" "struct archive *""'");
  4874. }
  4875. arg1 = (struct archive *)(argp1);
  4876. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  4877. if (!SWIG_IsOK(res2)) {
  4878. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_set_filter_option" "', argument " "2"" of type '" "char const *""'");
  4879. }
  4880. arg2 = (char *)(buf2);
  4881. res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  4882. if (!SWIG_IsOK(res3)) {
  4883. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "archive_write_set_filter_option" "', argument " "3"" of type '" "char const *""'");
  4884. }
  4885. arg3 = (char *)(buf3);
  4886. res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  4887. if (!SWIG_IsOK(res4)) {
  4888. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "archive_write_set_filter_option" "', argument " "4"" of type '" "char const *""'");
  4889. }
  4890. arg4 = (char *)(buf4);
  4891. result = (int)archive_write_set_filter_option(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  4892. resultobj = SWIG_From_int((int)(result));
  4893. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  4894. if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  4895. if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  4896. return resultobj;
  4897. fail:
  4898. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  4899. if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  4900. if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  4901. return NULL;
  4902. }
  4903. SWIGINTERN PyObject *_wrap_archive_write_set_option(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4904. PyObject *resultobj = 0;
  4905. struct archive *arg1 = (struct archive *) 0 ;
  4906. char *arg2 = (char *) 0 ;
  4907. char *arg3 = (char *) 0 ;
  4908. char *arg4 = (char *) 0 ;
  4909. void *argp1 = 0 ;
  4910. int res1 = 0 ;
  4911. int res2 ;
  4912. char *buf2 = 0 ;
  4913. int alloc2 = 0 ;
  4914. int res3 ;
  4915. char *buf3 = 0 ;
  4916. int alloc3 = 0 ;
  4917. int res4 ;
  4918. char *buf4 = 0 ;
  4919. int alloc4 = 0 ;
  4920. PyObject *swig_obj[4] ;
  4921. int result;
  4922. if (!SWIG_Python_UnpackTuple(args, "archive_write_set_option", 4, 4, swig_obj)) SWIG_fail;
  4923. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4924. if (!SWIG_IsOK(res1)) {
  4925. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_option" "', argument " "1"" of type '" "struct archive *""'");
  4926. }
  4927. arg1 = (struct archive *)(argp1);
  4928. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  4929. if (!SWIG_IsOK(res2)) {
  4930. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_set_option" "', argument " "2"" of type '" "char const *""'");
  4931. }
  4932. arg2 = (char *)(buf2);
  4933. res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  4934. if (!SWIG_IsOK(res3)) {
  4935. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "archive_write_set_option" "', argument " "3"" of type '" "char const *""'");
  4936. }
  4937. arg3 = (char *)(buf3);
  4938. res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  4939. if (!SWIG_IsOK(res4)) {
  4940. SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "archive_write_set_option" "', argument " "4"" of type '" "char const *""'");
  4941. }
  4942. arg4 = (char *)(buf4);
  4943. result = (int)archive_write_set_option(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  4944. resultobj = SWIG_From_int((int)(result));
  4945. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  4946. if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  4947. if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  4948. return resultobj;
  4949. fail:
  4950. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  4951. if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  4952. if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  4953. return NULL;
  4954. }
  4955. SWIGINTERN PyObject *_wrap_archive_write_set_options(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4956. PyObject *resultobj = 0;
  4957. struct archive *arg1 = (struct archive *) 0 ;
  4958. char *arg2 = (char *) 0 ;
  4959. void *argp1 = 0 ;
  4960. int res1 = 0 ;
  4961. int res2 ;
  4962. char *buf2 = 0 ;
  4963. int alloc2 = 0 ;
  4964. PyObject *swig_obj[2] ;
  4965. int result;
  4966. if (!SWIG_Python_UnpackTuple(args, "archive_write_set_options", 2, 2, swig_obj)) SWIG_fail;
  4967. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4968. if (!SWIG_IsOK(res1)) {
  4969. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_options" "', argument " "1"" of type '" "struct archive *""'");
  4970. }
  4971. arg1 = (struct archive *)(argp1);
  4972. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  4973. if (!SWIG_IsOK(res2)) {
  4974. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_set_options" "', argument " "2"" of type '" "char const *""'");
  4975. }
  4976. arg2 = (char *)(buf2);
  4977. result = (int)archive_write_set_options(arg1,(char const *)arg2);
  4978. resultobj = SWIG_From_int((int)(result));
  4979. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  4980. return resultobj;
  4981. fail:
  4982. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  4983. return NULL;
  4984. }
  4985. SWIGINTERN PyObject *_wrap_archive_write_set_passphrase(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  4986. PyObject *resultobj = 0;
  4987. struct archive *arg1 = (struct archive *) 0 ;
  4988. char *arg2 = (char *) 0 ;
  4989. void *argp1 = 0 ;
  4990. int res1 = 0 ;
  4991. int res2 ;
  4992. char *buf2 = 0 ;
  4993. int alloc2 = 0 ;
  4994. PyObject *swig_obj[2] ;
  4995. int result;
  4996. if (!SWIG_Python_UnpackTuple(args, "archive_write_set_passphrase", 2, 2, swig_obj)) SWIG_fail;
  4997. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  4998. if (!SWIG_IsOK(res1)) {
  4999. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_passphrase" "', argument " "1"" of type '" "struct archive *""'");
  5000. }
  5001. arg1 = (struct archive *)(argp1);
  5002. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  5003. if (!SWIG_IsOK(res2)) {
  5004. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_set_passphrase" "', argument " "2"" of type '" "char const *""'");
  5005. }
  5006. arg2 = (char *)(buf2);
  5007. result = (int)archive_write_set_passphrase(arg1,(char const *)arg2);
  5008. resultobj = SWIG_From_int((int)(result));
  5009. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  5010. return resultobj;
  5011. fail:
  5012. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  5013. return NULL;
  5014. }
  5015. SWIGINTERN PyObject *_wrap_archive_write_finish_entry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5016. PyObject *resultobj = 0;
  5017. struct archive *arg1 = (struct archive *) 0 ;
  5018. void *argp1 = 0 ;
  5019. int res1 = 0 ;
  5020. PyObject *swig_obj[1] ;
  5021. int result;
  5022. if (!args) SWIG_fail;
  5023. swig_obj[0] = args;
  5024. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5025. if (!SWIG_IsOK(res1)) {
  5026. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_finish_entry" "', argument " "1"" of type '" "struct archive *""'");
  5027. }
  5028. arg1 = (struct archive *)(argp1);
  5029. result = (int)archive_write_finish_entry(arg1);
  5030. resultobj = SWIG_From_int((int)(result));
  5031. return resultobj;
  5032. fail:
  5033. return NULL;
  5034. }
  5035. SWIGINTERN PyObject *_wrap_archive_write_add_filter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5036. PyObject *resultobj = 0;
  5037. struct archive *arg1 = (struct archive *) 0 ;
  5038. int arg2 ;
  5039. void *argp1 = 0 ;
  5040. int res1 = 0 ;
  5041. int val2 ;
  5042. int ecode2 = 0 ;
  5043. PyObject *swig_obj[2] ;
  5044. int result;
  5045. if (!SWIG_Python_UnpackTuple(args, "archive_write_add_filter", 2, 2, swig_obj)) SWIG_fail;
  5046. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5047. if (!SWIG_IsOK(res1)) {
  5048. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter" "', argument " "1"" of type '" "struct archive *""'");
  5049. }
  5050. arg1 = (struct archive *)(argp1);
  5051. ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  5052. if (!SWIG_IsOK(ecode2)) {
  5053. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "archive_write_add_filter" "', argument " "2"" of type '" "int""'");
  5054. }
  5055. arg2 = (int)(val2);
  5056. result = (int)archive_write_add_filter(arg1,arg2);
  5057. resultobj = SWIG_From_int((int)(result));
  5058. return resultobj;
  5059. fail:
  5060. return NULL;
  5061. }
  5062. SWIGINTERN PyObject *_wrap_archive_write_add_filter_by_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5063. PyObject *resultobj = 0;
  5064. struct archive *arg1 = (struct archive *) 0 ;
  5065. char *arg2 = (char *) 0 ;
  5066. void *argp1 = 0 ;
  5067. int res1 = 0 ;
  5068. int res2 ;
  5069. char *buf2 = 0 ;
  5070. int alloc2 = 0 ;
  5071. PyObject *swig_obj[2] ;
  5072. int result;
  5073. if (!SWIG_Python_UnpackTuple(args, "archive_write_add_filter_by_name", 2, 2, swig_obj)) SWIG_fail;
  5074. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5075. if (!SWIG_IsOK(res1)) {
  5076. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_by_name" "', argument " "1"" of type '" "struct archive *""'");
  5077. }
  5078. arg1 = (struct archive *)(argp1);
  5079. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  5080. if (!SWIG_IsOK(res2)) {
  5081. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_add_filter_by_name" "', argument " "2"" of type '" "char const *""'");
  5082. }
  5083. arg2 = (char *)(buf2);
  5084. result = (int)archive_write_add_filter_by_name(arg1,(char const *)arg2);
  5085. resultobj = SWIG_From_int((int)(result));
  5086. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  5087. return resultobj;
  5088. fail:
  5089. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  5090. return NULL;
  5091. }
  5092. SWIGINTERN PyObject *_wrap_archive_write_add_filter_b64encode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5093. PyObject *resultobj = 0;
  5094. struct archive *arg1 = (struct archive *) 0 ;
  5095. void *argp1 = 0 ;
  5096. int res1 = 0 ;
  5097. PyObject *swig_obj[1] ;
  5098. int result;
  5099. if (!args) SWIG_fail;
  5100. swig_obj[0] = args;
  5101. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5102. if (!SWIG_IsOK(res1)) {
  5103. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_b64encode" "', argument " "1"" of type '" "struct archive *""'");
  5104. }
  5105. arg1 = (struct archive *)(argp1);
  5106. result = (int)archive_write_add_filter_b64encode(arg1);
  5107. resultobj = SWIG_From_int((int)(result));
  5108. return resultobj;
  5109. fail:
  5110. return NULL;
  5111. }
  5112. SWIGINTERN PyObject *_wrap_archive_write_add_filter_bzip2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5113. PyObject *resultobj = 0;
  5114. struct archive *arg1 = (struct archive *) 0 ;
  5115. void *argp1 = 0 ;
  5116. int res1 = 0 ;
  5117. PyObject *swig_obj[1] ;
  5118. int result;
  5119. if (!args) SWIG_fail;
  5120. swig_obj[0] = args;
  5121. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5122. if (!SWIG_IsOK(res1)) {
  5123. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_bzip2" "', argument " "1"" of type '" "struct archive *""'");
  5124. }
  5125. arg1 = (struct archive *)(argp1);
  5126. result = (int)archive_write_add_filter_bzip2(arg1);
  5127. resultobj = SWIG_From_int((int)(result));
  5128. return resultobj;
  5129. fail:
  5130. return NULL;
  5131. }
  5132. SWIGINTERN PyObject *_wrap_archive_write_add_filter_compress(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5133. PyObject *resultobj = 0;
  5134. struct archive *arg1 = (struct archive *) 0 ;
  5135. void *argp1 = 0 ;
  5136. int res1 = 0 ;
  5137. PyObject *swig_obj[1] ;
  5138. int result;
  5139. if (!args) SWIG_fail;
  5140. swig_obj[0] = args;
  5141. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5142. if (!SWIG_IsOK(res1)) {
  5143. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_compress" "', argument " "1"" of type '" "struct archive *""'");
  5144. }
  5145. arg1 = (struct archive *)(argp1);
  5146. result = (int)archive_write_add_filter_compress(arg1);
  5147. resultobj = SWIG_From_int((int)(result));
  5148. return resultobj;
  5149. fail:
  5150. return NULL;
  5151. }
  5152. SWIGINTERN PyObject *_wrap_archive_write_add_filter_grzip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5153. PyObject *resultobj = 0;
  5154. struct archive *arg1 = (struct archive *) 0 ;
  5155. void *argp1 = 0 ;
  5156. int res1 = 0 ;
  5157. PyObject *swig_obj[1] ;
  5158. int result;
  5159. if (!args) SWIG_fail;
  5160. swig_obj[0] = args;
  5161. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5162. if (!SWIG_IsOK(res1)) {
  5163. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_grzip" "', argument " "1"" of type '" "struct archive *""'");
  5164. }
  5165. arg1 = (struct archive *)(argp1);
  5166. result = (int)archive_write_add_filter_grzip(arg1);
  5167. resultobj = SWIG_From_int((int)(result));
  5168. return resultobj;
  5169. fail:
  5170. return NULL;
  5171. }
  5172. SWIGINTERN PyObject *_wrap_archive_write_add_filter_gzip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5173. PyObject *resultobj = 0;
  5174. struct archive *arg1 = (struct archive *) 0 ;
  5175. void *argp1 = 0 ;
  5176. int res1 = 0 ;
  5177. PyObject *swig_obj[1] ;
  5178. int result;
  5179. if (!args) SWIG_fail;
  5180. swig_obj[0] = args;
  5181. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5182. if (!SWIG_IsOK(res1)) {
  5183. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_gzip" "', argument " "1"" of type '" "struct archive *""'");
  5184. }
  5185. arg1 = (struct archive *)(argp1);
  5186. result = (int)archive_write_add_filter_gzip(arg1);
  5187. resultobj = SWIG_From_int((int)(result));
  5188. return resultobj;
  5189. fail:
  5190. return NULL;
  5191. }
  5192. SWIGINTERN PyObject *_wrap_archive_write_add_filter_lrzip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5193. PyObject *resultobj = 0;
  5194. struct archive *arg1 = (struct archive *) 0 ;
  5195. void *argp1 = 0 ;
  5196. int res1 = 0 ;
  5197. PyObject *swig_obj[1] ;
  5198. int result;
  5199. if (!args) SWIG_fail;
  5200. swig_obj[0] = args;
  5201. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5202. if (!SWIG_IsOK(res1)) {
  5203. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_lrzip" "', argument " "1"" of type '" "struct archive *""'");
  5204. }
  5205. arg1 = (struct archive *)(argp1);
  5206. result = (int)archive_write_add_filter_lrzip(arg1);
  5207. resultobj = SWIG_From_int((int)(result));
  5208. return resultobj;
  5209. fail:
  5210. return NULL;
  5211. }
  5212. SWIGINTERN PyObject *_wrap_archive_write_add_filter_lz4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5213. PyObject *resultobj = 0;
  5214. struct archive *arg1 = (struct archive *) 0 ;
  5215. void *argp1 = 0 ;
  5216. int res1 = 0 ;
  5217. PyObject *swig_obj[1] ;
  5218. int result;
  5219. if (!args) SWIG_fail;
  5220. swig_obj[0] = args;
  5221. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5222. if (!SWIG_IsOK(res1)) {
  5223. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_lz4" "', argument " "1"" of type '" "struct archive *""'");
  5224. }
  5225. arg1 = (struct archive *)(argp1);
  5226. result = (int)archive_write_add_filter_lz4(arg1);
  5227. resultobj = SWIG_From_int((int)(result));
  5228. return resultobj;
  5229. fail:
  5230. return NULL;
  5231. }
  5232. SWIGINTERN PyObject *_wrap_archive_write_add_filter_lzip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5233. PyObject *resultobj = 0;
  5234. struct archive *arg1 = (struct archive *) 0 ;
  5235. void *argp1 = 0 ;
  5236. int res1 = 0 ;
  5237. PyObject *swig_obj[1] ;
  5238. int result;
  5239. if (!args) SWIG_fail;
  5240. swig_obj[0] = args;
  5241. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5242. if (!SWIG_IsOK(res1)) {
  5243. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_lzip" "', argument " "1"" of type '" "struct archive *""'");
  5244. }
  5245. arg1 = (struct archive *)(argp1);
  5246. result = (int)archive_write_add_filter_lzip(arg1);
  5247. resultobj = SWIG_From_int((int)(result));
  5248. return resultobj;
  5249. fail:
  5250. return NULL;
  5251. }
  5252. SWIGINTERN PyObject *_wrap_archive_write_add_filter_lzma(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5253. PyObject *resultobj = 0;
  5254. struct archive *arg1 = (struct archive *) 0 ;
  5255. void *argp1 = 0 ;
  5256. int res1 = 0 ;
  5257. PyObject *swig_obj[1] ;
  5258. int result;
  5259. if (!args) SWIG_fail;
  5260. swig_obj[0] = args;
  5261. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5262. if (!SWIG_IsOK(res1)) {
  5263. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_lzma" "', argument " "1"" of type '" "struct archive *""'");
  5264. }
  5265. arg1 = (struct archive *)(argp1);
  5266. result = (int)archive_write_add_filter_lzma(arg1);
  5267. resultobj = SWIG_From_int((int)(result));
  5268. return resultobj;
  5269. fail:
  5270. return NULL;
  5271. }
  5272. SWIGINTERN PyObject *_wrap_archive_write_add_filter_lzop(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5273. PyObject *resultobj = 0;
  5274. struct archive *arg1 = (struct archive *) 0 ;
  5275. void *argp1 = 0 ;
  5276. int res1 = 0 ;
  5277. PyObject *swig_obj[1] ;
  5278. int result;
  5279. if (!args) SWIG_fail;
  5280. swig_obj[0] = args;
  5281. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5282. if (!SWIG_IsOK(res1)) {
  5283. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_lzop" "', argument " "1"" of type '" "struct archive *""'");
  5284. }
  5285. arg1 = (struct archive *)(argp1);
  5286. result = (int)archive_write_add_filter_lzop(arg1);
  5287. resultobj = SWIG_From_int((int)(result));
  5288. return resultobj;
  5289. fail:
  5290. return NULL;
  5291. }
  5292. SWIGINTERN PyObject *_wrap_archive_write_add_filter_none(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5293. PyObject *resultobj = 0;
  5294. struct archive *arg1 = (struct archive *) 0 ;
  5295. void *argp1 = 0 ;
  5296. int res1 = 0 ;
  5297. PyObject *swig_obj[1] ;
  5298. int result;
  5299. if (!args) SWIG_fail;
  5300. swig_obj[0] = args;
  5301. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5302. if (!SWIG_IsOK(res1)) {
  5303. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_none" "', argument " "1"" of type '" "struct archive *""'");
  5304. }
  5305. arg1 = (struct archive *)(argp1);
  5306. result = (int)archive_write_add_filter_none(arg1);
  5307. resultobj = SWIG_From_int((int)(result));
  5308. return resultobj;
  5309. fail:
  5310. return NULL;
  5311. }
  5312. SWIGINTERN PyObject *_wrap_archive_write_add_filter_program(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5313. PyObject *resultobj = 0;
  5314. struct archive *arg1 = (struct archive *) 0 ;
  5315. char *arg2 = (char *) 0 ;
  5316. void *argp1 = 0 ;
  5317. int res1 = 0 ;
  5318. int res2 ;
  5319. char *buf2 = 0 ;
  5320. int alloc2 = 0 ;
  5321. PyObject *swig_obj[2] ;
  5322. int result;
  5323. if (!SWIG_Python_UnpackTuple(args, "archive_write_add_filter_program", 2, 2, swig_obj)) SWIG_fail;
  5324. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5325. if (!SWIG_IsOK(res1)) {
  5326. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_program" "', argument " "1"" of type '" "struct archive *""'");
  5327. }
  5328. arg1 = (struct archive *)(argp1);
  5329. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  5330. if (!SWIG_IsOK(res2)) {
  5331. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_add_filter_program" "', argument " "2"" of type '" "char const *""'");
  5332. }
  5333. arg2 = (char *)(buf2);
  5334. result = (int)archive_write_add_filter_program(arg1,(char const *)arg2);
  5335. resultobj = SWIG_From_int((int)(result));
  5336. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  5337. return resultobj;
  5338. fail:
  5339. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  5340. return NULL;
  5341. }
  5342. SWIGINTERN PyObject *_wrap_archive_write_add_filter_uuencode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5343. PyObject *resultobj = 0;
  5344. struct archive *arg1 = (struct archive *) 0 ;
  5345. void *argp1 = 0 ;
  5346. int res1 = 0 ;
  5347. PyObject *swig_obj[1] ;
  5348. int result;
  5349. if (!args) SWIG_fail;
  5350. swig_obj[0] = args;
  5351. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5352. if (!SWIG_IsOK(res1)) {
  5353. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_uuencode" "', argument " "1"" of type '" "struct archive *""'");
  5354. }
  5355. arg1 = (struct archive *)(argp1);
  5356. result = (int)archive_write_add_filter_uuencode(arg1);
  5357. resultobj = SWIG_From_int((int)(result));
  5358. return resultobj;
  5359. fail:
  5360. return NULL;
  5361. }
  5362. SWIGINTERN PyObject *_wrap_archive_write_add_filter_xz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5363. PyObject *resultobj = 0;
  5364. struct archive *arg1 = (struct archive *) 0 ;
  5365. void *argp1 = 0 ;
  5366. int res1 = 0 ;
  5367. PyObject *swig_obj[1] ;
  5368. int result;
  5369. if (!args) SWIG_fail;
  5370. swig_obj[0] = args;
  5371. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5372. if (!SWIG_IsOK(res1)) {
  5373. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_add_filter_xz" "', argument " "1"" of type '" "struct archive *""'");
  5374. }
  5375. arg1 = (struct archive *)(argp1);
  5376. result = (int)archive_write_add_filter_xz(arg1);
  5377. resultobj = SWIG_From_int((int)(result));
  5378. return resultobj;
  5379. fail:
  5380. return NULL;
  5381. }
  5382. SWIGINTERN PyObject *_wrap_archive_write_set_format(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5383. PyObject *resultobj = 0;
  5384. struct archive *arg1 = (struct archive *) 0 ;
  5385. int arg2 ;
  5386. void *argp1 = 0 ;
  5387. int res1 = 0 ;
  5388. int val2 ;
  5389. int ecode2 = 0 ;
  5390. PyObject *swig_obj[2] ;
  5391. int result;
  5392. if (!SWIG_Python_UnpackTuple(args, "archive_write_set_format", 2, 2, swig_obj)) SWIG_fail;
  5393. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5394. if (!SWIG_IsOK(res1)) {
  5395. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format" "', argument " "1"" of type '" "struct archive *""'");
  5396. }
  5397. arg1 = (struct archive *)(argp1);
  5398. ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  5399. if (!SWIG_IsOK(ecode2)) {
  5400. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "archive_write_set_format" "', argument " "2"" of type '" "int""'");
  5401. }
  5402. arg2 = (int)(val2);
  5403. result = (int)archive_write_set_format(arg1,arg2);
  5404. resultobj = SWIG_From_int((int)(result));
  5405. return resultobj;
  5406. fail:
  5407. return NULL;
  5408. }
  5409. SWIGINTERN PyObject *_wrap_archive_write_set_format_by_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5410. PyObject *resultobj = 0;
  5411. struct archive *arg1 = (struct archive *) 0 ;
  5412. char *arg2 = (char *) 0 ;
  5413. void *argp1 = 0 ;
  5414. int res1 = 0 ;
  5415. int res2 ;
  5416. char *buf2 = 0 ;
  5417. int alloc2 = 0 ;
  5418. PyObject *swig_obj[2] ;
  5419. int result;
  5420. if (!SWIG_Python_UnpackTuple(args, "archive_write_set_format_by_name", 2, 2, swig_obj)) SWIG_fail;
  5421. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5422. if (!SWIG_IsOK(res1)) {
  5423. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_by_name" "', argument " "1"" of type '" "struct archive *""'");
  5424. }
  5425. arg1 = (struct archive *)(argp1);
  5426. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  5427. if (!SWIG_IsOK(res2)) {
  5428. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_set_format_by_name" "', argument " "2"" of type '" "char const *""'");
  5429. }
  5430. arg2 = (char *)(buf2);
  5431. result = (int)archive_write_set_format_by_name(arg1,(char const *)arg2);
  5432. resultobj = SWIG_From_int((int)(result));
  5433. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  5434. return resultobj;
  5435. fail:
  5436. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  5437. return NULL;
  5438. }
  5439. SWIGINTERN PyObject *_wrap_archive_write_set_format_7zip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5440. PyObject *resultobj = 0;
  5441. struct archive *arg1 = (struct archive *) 0 ;
  5442. void *argp1 = 0 ;
  5443. int res1 = 0 ;
  5444. PyObject *swig_obj[1] ;
  5445. int result;
  5446. if (!args) SWIG_fail;
  5447. swig_obj[0] = args;
  5448. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5449. if (!SWIG_IsOK(res1)) {
  5450. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_7zip" "', argument " "1"" of type '" "struct archive *""'");
  5451. }
  5452. arg1 = (struct archive *)(argp1);
  5453. result = (int)archive_write_set_format_7zip(arg1);
  5454. resultobj = SWIG_From_int((int)(result));
  5455. return resultobj;
  5456. fail:
  5457. return NULL;
  5458. }
  5459. SWIGINTERN PyObject *_wrap_archive_write_set_format_ar_bsd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5460. PyObject *resultobj = 0;
  5461. struct archive *arg1 = (struct archive *) 0 ;
  5462. void *argp1 = 0 ;
  5463. int res1 = 0 ;
  5464. PyObject *swig_obj[1] ;
  5465. int result;
  5466. if (!args) SWIG_fail;
  5467. swig_obj[0] = args;
  5468. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5469. if (!SWIG_IsOK(res1)) {
  5470. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_ar_bsd" "', argument " "1"" of type '" "struct archive *""'");
  5471. }
  5472. arg1 = (struct archive *)(argp1);
  5473. result = (int)archive_write_set_format_ar_bsd(arg1);
  5474. resultobj = SWIG_From_int((int)(result));
  5475. return resultobj;
  5476. fail:
  5477. return NULL;
  5478. }
  5479. SWIGINTERN PyObject *_wrap_archive_write_set_format_ar_svr4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5480. PyObject *resultobj = 0;
  5481. struct archive *arg1 = (struct archive *) 0 ;
  5482. void *argp1 = 0 ;
  5483. int res1 = 0 ;
  5484. PyObject *swig_obj[1] ;
  5485. int result;
  5486. if (!args) SWIG_fail;
  5487. swig_obj[0] = args;
  5488. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5489. if (!SWIG_IsOK(res1)) {
  5490. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_ar_svr4" "', argument " "1"" of type '" "struct archive *""'");
  5491. }
  5492. arg1 = (struct archive *)(argp1);
  5493. result = (int)archive_write_set_format_ar_svr4(arg1);
  5494. resultobj = SWIG_From_int((int)(result));
  5495. return resultobj;
  5496. fail:
  5497. return NULL;
  5498. }
  5499. SWIGINTERN PyObject *_wrap_archive_write_set_format_cpio(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5500. PyObject *resultobj = 0;
  5501. struct archive *arg1 = (struct archive *) 0 ;
  5502. void *argp1 = 0 ;
  5503. int res1 = 0 ;
  5504. PyObject *swig_obj[1] ;
  5505. int result;
  5506. if (!args) SWIG_fail;
  5507. swig_obj[0] = args;
  5508. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5509. if (!SWIG_IsOK(res1)) {
  5510. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_cpio" "', argument " "1"" of type '" "struct archive *""'");
  5511. }
  5512. arg1 = (struct archive *)(argp1);
  5513. result = (int)archive_write_set_format_cpio(arg1);
  5514. resultobj = SWIG_From_int((int)(result));
  5515. return resultobj;
  5516. fail:
  5517. return NULL;
  5518. }
  5519. SWIGINTERN PyObject *_wrap_archive_write_set_format_cpio_newc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5520. PyObject *resultobj = 0;
  5521. struct archive *arg1 = (struct archive *) 0 ;
  5522. void *argp1 = 0 ;
  5523. int res1 = 0 ;
  5524. PyObject *swig_obj[1] ;
  5525. int result;
  5526. if (!args) SWIG_fail;
  5527. swig_obj[0] = args;
  5528. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5529. if (!SWIG_IsOK(res1)) {
  5530. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_cpio_newc" "', argument " "1"" of type '" "struct archive *""'");
  5531. }
  5532. arg1 = (struct archive *)(argp1);
  5533. result = (int)archive_write_set_format_cpio_newc(arg1);
  5534. resultobj = SWIG_From_int((int)(result));
  5535. return resultobj;
  5536. fail:
  5537. return NULL;
  5538. }
  5539. SWIGINTERN PyObject *_wrap_archive_write_set_format_gnutar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5540. PyObject *resultobj = 0;
  5541. struct archive *arg1 = (struct archive *) 0 ;
  5542. void *argp1 = 0 ;
  5543. int res1 = 0 ;
  5544. PyObject *swig_obj[1] ;
  5545. int result;
  5546. if (!args) SWIG_fail;
  5547. swig_obj[0] = args;
  5548. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5549. if (!SWIG_IsOK(res1)) {
  5550. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_gnutar" "', argument " "1"" of type '" "struct archive *""'");
  5551. }
  5552. arg1 = (struct archive *)(argp1);
  5553. result = (int)archive_write_set_format_gnutar(arg1);
  5554. resultobj = SWIG_From_int((int)(result));
  5555. return resultobj;
  5556. fail:
  5557. return NULL;
  5558. }
  5559. SWIGINTERN PyObject *_wrap_archive_write_set_format_iso9660(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5560. PyObject *resultobj = 0;
  5561. struct archive *arg1 = (struct archive *) 0 ;
  5562. void *argp1 = 0 ;
  5563. int res1 = 0 ;
  5564. PyObject *swig_obj[1] ;
  5565. int result;
  5566. if (!args) SWIG_fail;
  5567. swig_obj[0] = args;
  5568. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5569. if (!SWIG_IsOK(res1)) {
  5570. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_iso9660" "', argument " "1"" of type '" "struct archive *""'");
  5571. }
  5572. arg1 = (struct archive *)(argp1);
  5573. result = (int)archive_write_set_format_iso9660(arg1);
  5574. resultobj = SWIG_From_int((int)(result));
  5575. return resultobj;
  5576. fail:
  5577. return NULL;
  5578. }
  5579. SWIGINTERN PyObject *_wrap_archive_write_set_format_mtree(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5580. PyObject *resultobj = 0;
  5581. struct archive *arg1 = (struct archive *) 0 ;
  5582. void *argp1 = 0 ;
  5583. int res1 = 0 ;
  5584. PyObject *swig_obj[1] ;
  5585. int result;
  5586. if (!args) SWIG_fail;
  5587. swig_obj[0] = args;
  5588. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5589. if (!SWIG_IsOK(res1)) {
  5590. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_mtree" "', argument " "1"" of type '" "struct archive *""'");
  5591. }
  5592. arg1 = (struct archive *)(argp1);
  5593. result = (int)archive_write_set_format_mtree(arg1);
  5594. resultobj = SWIG_From_int((int)(result));
  5595. return resultobj;
  5596. fail:
  5597. return NULL;
  5598. }
  5599. SWIGINTERN PyObject *_wrap_archive_write_set_format_mtree_classic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5600. PyObject *resultobj = 0;
  5601. struct archive *arg1 = (struct archive *) 0 ;
  5602. void *argp1 = 0 ;
  5603. int res1 = 0 ;
  5604. PyObject *swig_obj[1] ;
  5605. int result;
  5606. if (!args) SWIG_fail;
  5607. swig_obj[0] = args;
  5608. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5609. if (!SWIG_IsOK(res1)) {
  5610. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_mtree_classic" "', argument " "1"" of type '" "struct archive *""'");
  5611. }
  5612. arg1 = (struct archive *)(argp1);
  5613. result = (int)archive_write_set_format_mtree_classic(arg1);
  5614. resultobj = SWIG_From_int((int)(result));
  5615. return resultobj;
  5616. fail:
  5617. return NULL;
  5618. }
  5619. SWIGINTERN PyObject *_wrap_archive_write_set_format_pax(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5620. PyObject *resultobj = 0;
  5621. struct archive *arg1 = (struct archive *) 0 ;
  5622. void *argp1 = 0 ;
  5623. int res1 = 0 ;
  5624. PyObject *swig_obj[1] ;
  5625. int result;
  5626. if (!args) SWIG_fail;
  5627. swig_obj[0] = args;
  5628. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5629. if (!SWIG_IsOK(res1)) {
  5630. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_pax" "', argument " "1"" of type '" "struct archive *""'");
  5631. }
  5632. arg1 = (struct archive *)(argp1);
  5633. result = (int)archive_write_set_format_pax(arg1);
  5634. resultobj = SWIG_From_int((int)(result));
  5635. return resultobj;
  5636. fail:
  5637. return NULL;
  5638. }
  5639. SWIGINTERN PyObject *_wrap_archive_write_set_format_pax_restricted(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5640. PyObject *resultobj = 0;
  5641. struct archive *arg1 = (struct archive *) 0 ;
  5642. void *argp1 = 0 ;
  5643. int res1 = 0 ;
  5644. PyObject *swig_obj[1] ;
  5645. int result;
  5646. if (!args) SWIG_fail;
  5647. swig_obj[0] = args;
  5648. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5649. if (!SWIG_IsOK(res1)) {
  5650. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_pax_restricted" "', argument " "1"" of type '" "struct archive *""'");
  5651. }
  5652. arg1 = (struct archive *)(argp1);
  5653. result = (int)archive_write_set_format_pax_restricted(arg1);
  5654. resultobj = SWIG_From_int((int)(result));
  5655. return resultobj;
  5656. fail:
  5657. return NULL;
  5658. }
  5659. SWIGINTERN PyObject *_wrap_archive_write_set_format_raw(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5660. PyObject *resultobj = 0;
  5661. struct archive *arg1 = (struct archive *) 0 ;
  5662. void *argp1 = 0 ;
  5663. int res1 = 0 ;
  5664. PyObject *swig_obj[1] ;
  5665. int result;
  5666. if (!args) SWIG_fail;
  5667. swig_obj[0] = args;
  5668. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5669. if (!SWIG_IsOK(res1)) {
  5670. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_raw" "', argument " "1"" of type '" "struct archive *""'");
  5671. }
  5672. arg1 = (struct archive *)(argp1);
  5673. result = (int)archive_write_set_format_raw(arg1);
  5674. resultobj = SWIG_From_int((int)(result));
  5675. return resultobj;
  5676. fail:
  5677. return NULL;
  5678. }
  5679. SWIGINTERN PyObject *_wrap_archive_write_set_format_shar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5680. PyObject *resultobj = 0;
  5681. struct archive *arg1 = (struct archive *) 0 ;
  5682. void *argp1 = 0 ;
  5683. int res1 = 0 ;
  5684. PyObject *swig_obj[1] ;
  5685. int result;
  5686. if (!args) SWIG_fail;
  5687. swig_obj[0] = args;
  5688. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5689. if (!SWIG_IsOK(res1)) {
  5690. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_shar" "', argument " "1"" of type '" "struct archive *""'");
  5691. }
  5692. arg1 = (struct archive *)(argp1);
  5693. result = (int)archive_write_set_format_shar(arg1);
  5694. resultobj = SWIG_From_int((int)(result));
  5695. return resultobj;
  5696. fail:
  5697. return NULL;
  5698. }
  5699. SWIGINTERN PyObject *_wrap_archive_write_set_format_shar_dump(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5700. PyObject *resultobj = 0;
  5701. struct archive *arg1 = (struct archive *) 0 ;
  5702. void *argp1 = 0 ;
  5703. int res1 = 0 ;
  5704. PyObject *swig_obj[1] ;
  5705. int result;
  5706. if (!args) SWIG_fail;
  5707. swig_obj[0] = args;
  5708. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5709. if (!SWIG_IsOK(res1)) {
  5710. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_shar_dump" "', argument " "1"" of type '" "struct archive *""'");
  5711. }
  5712. arg1 = (struct archive *)(argp1);
  5713. result = (int)archive_write_set_format_shar_dump(arg1);
  5714. resultobj = SWIG_From_int((int)(result));
  5715. return resultobj;
  5716. fail:
  5717. return NULL;
  5718. }
  5719. SWIGINTERN PyObject *_wrap_archive_write_set_format_ustar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5720. PyObject *resultobj = 0;
  5721. struct archive *arg1 = (struct archive *) 0 ;
  5722. void *argp1 = 0 ;
  5723. int res1 = 0 ;
  5724. PyObject *swig_obj[1] ;
  5725. int result;
  5726. if (!args) SWIG_fail;
  5727. swig_obj[0] = args;
  5728. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5729. if (!SWIG_IsOK(res1)) {
  5730. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_ustar" "', argument " "1"" of type '" "struct archive *""'");
  5731. }
  5732. arg1 = (struct archive *)(argp1);
  5733. result = (int)archive_write_set_format_ustar(arg1);
  5734. resultobj = SWIG_From_int((int)(result));
  5735. return resultobj;
  5736. fail:
  5737. return NULL;
  5738. }
  5739. SWIGINTERN PyObject *_wrap_archive_write_set_format_v7tar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5740. PyObject *resultobj = 0;
  5741. struct archive *arg1 = (struct archive *) 0 ;
  5742. void *argp1 = 0 ;
  5743. int res1 = 0 ;
  5744. PyObject *swig_obj[1] ;
  5745. int result;
  5746. if (!args) SWIG_fail;
  5747. swig_obj[0] = args;
  5748. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5749. if (!SWIG_IsOK(res1)) {
  5750. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_v7tar" "', argument " "1"" of type '" "struct archive *""'");
  5751. }
  5752. arg1 = (struct archive *)(argp1);
  5753. result = (int)archive_write_set_format_v7tar(arg1);
  5754. resultobj = SWIG_From_int((int)(result));
  5755. return resultobj;
  5756. fail:
  5757. return NULL;
  5758. }
  5759. SWIGINTERN PyObject *_wrap_archive_write_set_format_warc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5760. PyObject *resultobj = 0;
  5761. struct archive *arg1 = (struct archive *) 0 ;
  5762. void *argp1 = 0 ;
  5763. int res1 = 0 ;
  5764. PyObject *swig_obj[1] ;
  5765. int result;
  5766. if (!args) SWIG_fail;
  5767. swig_obj[0] = args;
  5768. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5769. if (!SWIG_IsOK(res1)) {
  5770. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_warc" "', argument " "1"" of type '" "struct archive *""'");
  5771. }
  5772. arg1 = (struct archive *)(argp1);
  5773. result = (int)archive_write_set_format_warc(arg1);
  5774. resultobj = SWIG_From_int((int)(result));
  5775. return resultobj;
  5776. fail:
  5777. return NULL;
  5778. }
  5779. SWIGINTERN PyObject *_wrap_archive_write_set_format_xar(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5780. PyObject *resultobj = 0;
  5781. struct archive *arg1 = (struct archive *) 0 ;
  5782. void *argp1 = 0 ;
  5783. int res1 = 0 ;
  5784. PyObject *swig_obj[1] ;
  5785. int result;
  5786. if (!args) SWIG_fail;
  5787. swig_obj[0] = args;
  5788. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5789. if (!SWIG_IsOK(res1)) {
  5790. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_xar" "', argument " "1"" of type '" "struct archive *""'");
  5791. }
  5792. arg1 = (struct archive *)(argp1);
  5793. result = (int)archive_write_set_format_xar(arg1);
  5794. resultobj = SWIG_From_int((int)(result));
  5795. return resultobj;
  5796. fail:
  5797. return NULL;
  5798. }
  5799. SWIGINTERN PyObject *_wrap_archive_write_set_format_zip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5800. PyObject *resultobj = 0;
  5801. struct archive *arg1 = (struct archive *) 0 ;
  5802. void *argp1 = 0 ;
  5803. int res1 = 0 ;
  5804. PyObject *swig_obj[1] ;
  5805. int result;
  5806. if (!args) SWIG_fail;
  5807. swig_obj[0] = args;
  5808. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5809. if (!SWIG_IsOK(res1)) {
  5810. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_zip" "', argument " "1"" of type '" "struct archive *""'");
  5811. }
  5812. arg1 = (struct archive *)(argp1);
  5813. result = (int)archive_write_set_format_zip(arg1);
  5814. resultobj = SWIG_From_int((int)(result));
  5815. return resultobj;
  5816. fail:
  5817. return NULL;
  5818. }
  5819. SWIGINTERN PyObject *_wrap_archive_write_set_format_filter_by_ext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5820. PyObject *resultobj = 0;
  5821. struct archive *arg1 = (struct archive *) 0 ;
  5822. char *arg2 = (char *) 0 ;
  5823. void *argp1 = 0 ;
  5824. int res1 = 0 ;
  5825. int res2 ;
  5826. char *buf2 = 0 ;
  5827. int alloc2 = 0 ;
  5828. PyObject *swig_obj[2] ;
  5829. int result;
  5830. if (!SWIG_Python_UnpackTuple(args, "archive_write_set_format_filter_by_ext", 2, 2, swig_obj)) SWIG_fail;
  5831. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5832. if (!SWIG_IsOK(res1)) {
  5833. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_filter_by_ext" "', argument " "1"" of type '" "struct archive *""'");
  5834. }
  5835. arg1 = (struct archive *)(argp1);
  5836. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  5837. if (!SWIG_IsOK(res2)) {
  5838. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_set_format_filter_by_ext" "', argument " "2"" of type '" "char const *""'");
  5839. }
  5840. arg2 = (char *)(buf2);
  5841. result = (int)archive_write_set_format_filter_by_ext(arg1,(char const *)arg2);
  5842. resultobj = SWIG_From_int((int)(result));
  5843. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  5844. return resultobj;
  5845. fail:
  5846. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  5847. return NULL;
  5848. }
  5849. SWIGINTERN PyObject *_wrap_archive_write_set_format_filter_by_ext_def(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5850. PyObject *resultobj = 0;
  5851. struct archive *arg1 = (struct archive *) 0 ;
  5852. char *arg2 = (char *) 0 ;
  5853. char *arg3 = (char *) 0 ;
  5854. void *argp1 = 0 ;
  5855. int res1 = 0 ;
  5856. int res2 ;
  5857. char *buf2 = 0 ;
  5858. int alloc2 = 0 ;
  5859. int res3 ;
  5860. char *buf3 = 0 ;
  5861. int alloc3 = 0 ;
  5862. PyObject *swig_obj[3] ;
  5863. int result;
  5864. if (!SWIG_Python_UnpackTuple(args, "archive_write_set_format_filter_by_ext_def", 3, 3, swig_obj)) SWIG_fail;
  5865. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5866. if (!SWIG_IsOK(res1)) {
  5867. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_set_format_filter_by_ext_def" "', argument " "1"" of type '" "struct archive *""'");
  5868. }
  5869. arg1 = (struct archive *)(argp1);
  5870. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  5871. if (!SWIG_IsOK(res2)) {
  5872. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_write_set_format_filter_by_ext_def" "', argument " "2"" of type '" "char const *""'");
  5873. }
  5874. arg2 = (char *)(buf2);
  5875. res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  5876. if (!SWIG_IsOK(res3)) {
  5877. SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "archive_write_set_format_filter_by_ext_def" "', argument " "3"" of type '" "char const *""'");
  5878. }
  5879. arg3 = (char *)(buf3);
  5880. result = (int)archive_write_set_format_filter_by_ext_def(arg1,(char const *)arg2,(char const *)arg3);
  5881. resultobj = SWIG_From_int((int)(result));
  5882. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  5883. if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  5884. return resultobj;
  5885. fail:
  5886. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  5887. if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  5888. return NULL;
  5889. }
  5890. SWIGINTERN PyObject *_wrap_archive_write_zip_set_compression_deflate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5891. PyObject *resultobj = 0;
  5892. struct archive *arg1 = (struct archive *) 0 ;
  5893. void *argp1 = 0 ;
  5894. int res1 = 0 ;
  5895. PyObject *swig_obj[1] ;
  5896. int result;
  5897. if (!args) SWIG_fail;
  5898. swig_obj[0] = args;
  5899. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5900. if (!SWIG_IsOK(res1)) {
  5901. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_zip_set_compression_deflate" "', argument " "1"" of type '" "struct archive *""'");
  5902. }
  5903. arg1 = (struct archive *)(argp1);
  5904. result = (int)archive_write_zip_set_compression_deflate(arg1);
  5905. resultobj = SWIG_From_int((int)(result));
  5906. return resultobj;
  5907. fail:
  5908. return NULL;
  5909. }
  5910. SWIGINTERN PyObject *_wrap_archive_write_zip_set_compression_store(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5911. PyObject *resultobj = 0;
  5912. struct archive *arg1 = (struct archive *) 0 ;
  5913. void *argp1 = 0 ;
  5914. int res1 = 0 ;
  5915. PyObject *swig_obj[1] ;
  5916. int result;
  5917. if (!args) SWIG_fail;
  5918. swig_obj[0] = args;
  5919. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  5920. if (!SWIG_IsOK(res1)) {
  5921. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_zip_set_compression_store" "', argument " "1"" of type '" "struct archive *""'");
  5922. }
  5923. arg1 = (struct archive *)(argp1);
  5924. result = (int)archive_write_zip_set_compression_store(arg1);
  5925. resultobj = SWIG_From_int((int)(result));
  5926. return resultobj;
  5927. fail:
  5928. return NULL;
  5929. }
  5930. SWIGINTERN PyObject *_wrap_archive_entry_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5931. PyObject *resultobj = 0;
  5932. struct archive_entry *result = 0 ;
  5933. if (!SWIG_Python_UnpackTuple(args, "archive_entry_new", 0, 0, 0)) SWIG_fail;
  5934. result = (struct archive_entry *)archive_entry_new();
  5935. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_archive_entry, 0 | 0 );
  5936. return resultobj;
  5937. fail:
  5938. return NULL;
  5939. }
  5940. SWIGINTERN PyObject *_wrap_archive_entry_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5941. PyObject *resultobj = 0;
  5942. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  5943. void *argp1 = 0 ;
  5944. int res1 = 0 ;
  5945. PyObject *swig_obj[1] ;
  5946. if (!args) SWIG_fail;
  5947. swig_obj[0] = args;
  5948. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  5949. if (!SWIG_IsOK(res1)) {
  5950. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_free" "', argument " "1"" of type '" "struct archive_entry *""'");
  5951. }
  5952. arg1 = (struct archive_entry *)(argp1);
  5953. archive_entry_free(arg1);
  5954. resultobj = SWIG_Py_Void();
  5955. return resultobj;
  5956. fail:
  5957. return NULL;
  5958. }
  5959. SWIGINTERN PyObject *_wrap_archive_entry_pathname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5960. PyObject *resultobj = 0;
  5961. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  5962. void *argp1 = 0 ;
  5963. int res1 = 0 ;
  5964. PyObject *swig_obj[1] ;
  5965. char *result = 0 ;
  5966. if (!args) SWIG_fail;
  5967. swig_obj[0] = args;
  5968. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  5969. if (!SWIG_IsOK(res1)) {
  5970. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_pathname" "', argument " "1"" of type '" "struct archive_entry *""'");
  5971. }
  5972. arg1 = (struct archive_entry *)(argp1);
  5973. result = (char *)archive_entry_pathname(arg1);
  5974. resultobj = SWIG_FromCharPtr((const char *)result);
  5975. return resultobj;
  5976. fail:
  5977. return NULL;
  5978. }
  5979. SWIGINTERN PyObject *_wrap_archive_entry_pathname_w(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  5980. PyObject *resultobj = 0;
  5981. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  5982. void *argp1 = 0 ;
  5983. int res1 = 0 ;
  5984. PyObject *swig_obj[1] ;
  5985. wchar_t *result = 0 ;
  5986. if (!args) SWIG_fail;
  5987. swig_obj[0] = args;
  5988. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  5989. if (!SWIG_IsOK(res1)) {
  5990. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_pathname_w" "', argument " "1"" of type '" "struct archive_entry *""'");
  5991. }
  5992. arg1 = (struct archive_entry *)(argp1);
  5993. result = (wchar_t *)archive_entry_pathname_w(arg1);
  5994. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wchar_t, 0 | 0 );
  5995. return resultobj;
  5996. fail:
  5997. return NULL;
  5998. }
  5999. SWIGINTERN PyObject *_wrap_archive_entry_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6000. PyObject *resultobj = 0;
  6001. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  6002. void *argp1 = 0 ;
  6003. int res1 = 0 ;
  6004. PyObject *swig_obj[1] ;
  6005. int64_t result;
  6006. if (!args) SWIG_fail;
  6007. swig_obj[0] = args;
  6008. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  6009. if (!SWIG_IsOK(res1)) {
  6010. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_size" "', argument " "1"" of type '" "struct archive_entry *""'");
  6011. }
  6012. arg1 = (struct archive_entry *)(argp1);
  6013. result = archive_entry_size(arg1);
  6014. {
  6015. resultobj = PyLong_FromLong((long)result);
  6016. }
  6017. return resultobj;
  6018. fail:
  6019. return NULL;
  6020. }
  6021. SWIGINTERN PyObject *_wrap_archive_entry_mtime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6022. PyObject *resultobj = 0;
  6023. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  6024. void *argp1 = 0 ;
  6025. int res1 = 0 ;
  6026. PyObject *swig_obj[1] ;
  6027. time_t result;
  6028. if (!args) SWIG_fail;
  6029. swig_obj[0] = args;
  6030. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  6031. if (!SWIG_IsOK(res1)) {
  6032. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_mtime" "', argument " "1"" of type '" "struct archive_entry *""'");
  6033. }
  6034. arg1 = (struct archive_entry *)(argp1);
  6035. result = archive_entry_mtime(arg1);
  6036. {
  6037. resultobj = PyLong_FromLong((long)result);
  6038. }
  6039. return resultobj;
  6040. fail:
  6041. return NULL;
  6042. }
  6043. SWIGINTERN PyObject *_wrap_archive_entry_filetype(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6044. PyObject *resultobj = 0;
  6045. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  6046. void *argp1 = 0 ;
  6047. int res1 = 0 ;
  6048. PyObject *swig_obj[1] ;
  6049. mode_t result;
  6050. if (!args) SWIG_fail;
  6051. swig_obj[0] = args;
  6052. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  6053. if (!SWIG_IsOK(res1)) {
  6054. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_filetype" "', argument " "1"" of type '" "struct archive_entry *""'");
  6055. }
  6056. arg1 = (struct archive_entry *)(argp1);
  6057. result = (mode_t)archive_entry_filetype(arg1);
  6058. resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
  6059. return resultobj;
  6060. fail:
  6061. return NULL;
  6062. }
  6063. SWIGINTERN PyObject *_wrap_archive_entry_perm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6064. PyObject *resultobj = 0;
  6065. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  6066. void *argp1 = 0 ;
  6067. int res1 = 0 ;
  6068. PyObject *swig_obj[1] ;
  6069. mode_t result;
  6070. if (!args) SWIG_fail;
  6071. swig_obj[0] = args;
  6072. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  6073. if (!SWIG_IsOK(res1)) {
  6074. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_perm" "', argument " "1"" of type '" "struct archive_entry *""'");
  6075. }
  6076. arg1 = (struct archive_entry *)(argp1);
  6077. result = (mode_t)archive_entry_perm(arg1);
  6078. resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
  6079. return resultobj;
  6080. fail:
  6081. return NULL;
  6082. }
  6083. SWIGINTERN PyObject *_wrap_archive_entry_symlink(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6084. PyObject *resultobj = 0;
  6085. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  6086. void *argp1 = 0 ;
  6087. int res1 = 0 ;
  6088. PyObject *swig_obj[1] ;
  6089. char *result = 0 ;
  6090. if (!args) SWIG_fail;
  6091. swig_obj[0] = args;
  6092. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  6093. if (!SWIG_IsOK(res1)) {
  6094. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_symlink" "', argument " "1"" of type '" "struct archive_entry *""'");
  6095. }
  6096. arg1 = (struct archive_entry *)(argp1);
  6097. result = (char *)archive_entry_symlink(arg1);
  6098. resultobj = SWIG_FromCharPtr((const char *)result);
  6099. return resultobj;
  6100. fail:
  6101. return NULL;
  6102. }
  6103. SWIGINTERN PyObject *_wrap_archive_entry_set_link(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6104. PyObject *resultobj = 0;
  6105. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  6106. char *arg2 = (char *) 0 ;
  6107. void *argp1 = 0 ;
  6108. int res1 = 0 ;
  6109. int res2 ;
  6110. char *buf2 = 0 ;
  6111. int alloc2 = 0 ;
  6112. PyObject *swig_obj[2] ;
  6113. if (!SWIG_Python_UnpackTuple(args, "archive_entry_set_link", 2, 2, swig_obj)) SWIG_fail;
  6114. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  6115. if (!SWIG_IsOK(res1)) {
  6116. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_set_link" "', argument " "1"" of type '" "struct archive_entry *""'");
  6117. }
  6118. arg1 = (struct archive_entry *)(argp1);
  6119. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  6120. if (!SWIG_IsOK(res2)) {
  6121. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_entry_set_link" "', argument " "2"" of type '" "char const *""'");
  6122. }
  6123. arg2 = (char *)(buf2);
  6124. archive_entry_set_link(arg1,(char const *)arg2);
  6125. resultobj = SWIG_Py_Void();
  6126. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  6127. return resultobj;
  6128. fail:
  6129. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  6130. return NULL;
  6131. }
  6132. SWIGINTERN PyObject *_wrap_archive_entry_symlink_w(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6133. PyObject *resultobj = 0;
  6134. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  6135. void *argp1 = 0 ;
  6136. int res1 = 0 ;
  6137. PyObject *swig_obj[1] ;
  6138. wchar_t *result = 0 ;
  6139. if (!args) SWIG_fail;
  6140. swig_obj[0] = args;
  6141. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  6142. if (!SWIG_IsOK(res1)) {
  6143. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_symlink_w" "', argument " "1"" of type '" "struct archive_entry *""'");
  6144. }
  6145. arg1 = (struct archive_entry *)(argp1);
  6146. result = (wchar_t *)archive_entry_symlink_w(arg1);
  6147. resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_wchar_t, 0 | 0 );
  6148. return resultobj;
  6149. fail:
  6150. return NULL;
  6151. }
  6152. SWIGINTERN PyObject *_wrap_archive_read_disk_set_symlink_logical(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6153. PyObject *resultobj = 0;
  6154. struct archive *arg1 = (struct archive *) 0 ;
  6155. void *argp1 = 0 ;
  6156. int res1 = 0 ;
  6157. PyObject *swig_obj[1] ;
  6158. int result;
  6159. if (!args) SWIG_fail;
  6160. swig_obj[0] = args;
  6161. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  6162. if (!SWIG_IsOK(res1)) {
  6163. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_disk_set_symlink_logical" "', argument " "1"" of type '" "struct archive *""'");
  6164. }
  6165. arg1 = (struct archive *)(argp1);
  6166. result = (int)archive_read_disk_set_symlink_logical(arg1);
  6167. resultobj = SWIG_From_int((int)(result));
  6168. return resultobj;
  6169. fail:
  6170. return NULL;
  6171. }
  6172. SWIGINTERN PyObject *_wrap_archive_read_disk_set_symlink_physical(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6173. PyObject *resultobj = 0;
  6174. struct archive *arg1 = (struct archive *) 0 ;
  6175. void *argp1 = 0 ;
  6176. int res1 = 0 ;
  6177. PyObject *swig_obj[1] ;
  6178. int result;
  6179. if (!args) SWIG_fail;
  6180. swig_obj[0] = args;
  6181. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  6182. if (!SWIG_IsOK(res1)) {
  6183. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_disk_set_symlink_physical" "', argument " "1"" of type '" "struct archive *""'");
  6184. }
  6185. arg1 = (struct archive *)(argp1);
  6186. result = (int)archive_read_disk_set_symlink_physical(arg1);
  6187. resultobj = SWIG_From_int((int)(result));
  6188. return resultobj;
  6189. fail:
  6190. return NULL;
  6191. }
  6192. SWIGINTERN PyObject *_wrap_archive_read_disk_set_symlink_hybrid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6193. PyObject *resultobj = 0;
  6194. struct archive *arg1 = (struct archive *) 0 ;
  6195. void *argp1 = 0 ;
  6196. int res1 = 0 ;
  6197. PyObject *swig_obj[1] ;
  6198. int result;
  6199. if (!args) SWIG_fail;
  6200. swig_obj[0] = args;
  6201. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  6202. if (!SWIG_IsOK(res1)) {
  6203. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_disk_set_symlink_hybrid" "', argument " "1"" of type '" "struct archive *""'");
  6204. }
  6205. arg1 = (struct archive *)(argp1);
  6206. result = (int)archive_read_disk_set_symlink_hybrid(arg1);
  6207. resultobj = SWIG_From_int((int)(result));
  6208. return resultobj;
  6209. fail:
  6210. return NULL;
  6211. }
  6212. SWIGINTERN PyObject *_wrap_archive_entry_set_symlink(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6213. PyObject *resultobj = 0;
  6214. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  6215. char *arg2 = (char *) 0 ;
  6216. void *argp1 = 0 ;
  6217. int res1 = 0 ;
  6218. int res2 ;
  6219. char *buf2 = 0 ;
  6220. int alloc2 = 0 ;
  6221. PyObject *swig_obj[2] ;
  6222. if (!SWIG_Python_UnpackTuple(args, "archive_entry_set_symlink", 2, 2, swig_obj)) SWIG_fail;
  6223. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  6224. if (!SWIG_IsOK(res1)) {
  6225. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_set_symlink" "', argument " "1"" of type '" "struct archive_entry *""'");
  6226. }
  6227. arg1 = (struct archive_entry *)(argp1);
  6228. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  6229. if (!SWIG_IsOK(res2)) {
  6230. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_entry_set_symlink" "', argument " "2"" of type '" "char const *""'");
  6231. }
  6232. arg2 = (char *)(buf2);
  6233. archive_entry_set_symlink(arg1,(char const *)arg2);
  6234. resultobj = SWIG_Py_Void();
  6235. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  6236. return resultobj;
  6237. fail:
  6238. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  6239. return NULL;
  6240. }
  6241. SWIGINTERN PyObject *_wrap_archive_entry_copy_symlink(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6242. PyObject *resultobj = 0;
  6243. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  6244. char *arg2 = (char *) 0 ;
  6245. void *argp1 = 0 ;
  6246. int res1 = 0 ;
  6247. int res2 ;
  6248. char *buf2 = 0 ;
  6249. int alloc2 = 0 ;
  6250. PyObject *swig_obj[2] ;
  6251. if (!SWIG_Python_UnpackTuple(args, "archive_entry_copy_symlink", 2, 2, swig_obj)) SWIG_fail;
  6252. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  6253. if (!SWIG_IsOK(res1)) {
  6254. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_copy_symlink" "', argument " "1"" of type '" "struct archive_entry *""'");
  6255. }
  6256. arg1 = (struct archive_entry *)(argp1);
  6257. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  6258. if (!SWIG_IsOK(res2)) {
  6259. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_entry_copy_symlink" "', argument " "2"" of type '" "char const *""'");
  6260. }
  6261. arg2 = (char *)(buf2);
  6262. archive_entry_copy_symlink(arg1,(char const *)arg2);
  6263. resultobj = SWIG_Py_Void();
  6264. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  6265. return resultobj;
  6266. fail:
  6267. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  6268. return NULL;
  6269. }
  6270. SWIGINTERN PyObject *_wrap_archive_entry_copy_symlink_w(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6271. PyObject *resultobj = 0;
  6272. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  6273. wchar_t *arg2 = (wchar_t *) 0 ;
  6274. void *argp1 = 0 ;
  6275. int res1 = 0 ;
  6276. void *argp2 = 0 ;
  6277. int res2 = 0 ;
  6278. PyObject *swig_obj[2] ;
  6279. if (!SWIG_Python_UnpackTuple(args, "archive_entry_copy_symlink_w", 2, 2, swig_obj)) SWIG_fail;
  6280. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  6281. if (!SWIG_IsOK(res1)) {
  6282. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_copy_symlink_w" "', argument " "1"" of type '" "struct archive_entry *""'");
  6283. }
  6284. arg1 = (struct archive_entry *)(argp1);
  6285. res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_wchar_t, 0 | 0 );
  6286. if (!SWIG_IsOK(res2)) {
  6287. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_entry_copy_symlink_w" "', argument " "2"" of type '" "wchar_t const *""'");
  6288. }
  6289. arg2 = (wchar_t *)(argp2);
  6290. archive_entry_copy_symlink_w(arg1,(wchar_t const *)arg2);
  6291. resultobj = SWIG_Py_Void();
  6292. return resultobj;
  6293. fail:
  6294. return NULL;
  6295. }
  6296. SWIGINTERN PyObject *_wrap_archive_entry_set_pathname(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6297. PyObject *resultobj = 0;
  6298. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  6299. char *arg2 = (char *) 0 ;
  6300. void *argp1 = 0 ;
  6301. int res1 = 0 ;
  6302. int res2 ;
  6303. char *buf2 = 0 ;
  6304. int alloc2 = 0 ;
  6305. PyObject *swig_obj[2] ;
  6306. if (!SWIG_Python_UnpackTuple(args, "archive_entry_set_pathname", 2, 2, swig_obj)) SWIG_fail;
  6307. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  6308. if (!SWIG_IsOK(res1)) {
  6309. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_set_pathname" "', argument " "1"" of type '" "struct archive_entry *""'");
  6310. }
  6311. arg1 = (struct archive_entry *)(argp1);
  6312. res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  6313. if (!SWIG_IsOK(res2)) {
  6314. SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "archive_entry_set_pathname" "', argument " "2"" of type '" "char const *""'");
  6315. }
  6316. arg2 = (char *)(buf2);
  6317. archive_entry_set_pathname(arg1,(char const *)arg2);
  6318. resultobj = SWIG_Py_Void();
  6319. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  6320. return resultobj;
  6321. fail:
  6322. if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  6323. return NULL;
  6324. }
  6325. SWIGINTERN PyObject *_wrap_archive_entry_set_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6326. PyObject *resultobj = 0;
  6327. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  6328. int64_t arg2 ;
  6329. void *argp1 = 0 ;
  6330. int res1 = 0 ;
  6331. PyObject *swig_obj[2] ;
  6332. if (!SWIG_Python_UnpackTuple(args, "archive_entry_set_size", 2, 2, swig_obj)) SWIG_fail;
  6333. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  6334. if (!SWIG_IsOK(res1)) {
  6335. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_set_size" "', argument " "1"" of type '" "struct archive_entry *""'");
  6336. }
  6337. arg1 = (struct archive_entry *)(argp1);
  6338. {
  6339. if (PyLong_Check(swig_obj[1]))
  6340. arg2 = (int64_t) PyLong_AsLong(swig_obj[1]);
  6341. else if (PyInt_Check(swig_obj[1]))
  6342. arg2 = (int64_t) PyInt_AsLong(swig_obj[1]);
  6343. else if (PyFloat_Check(swig_obj[1]))
  6344. arg2 = (int64_t) PyFloat_AsDouble(swig_obj[1]);
  6345. else {
  6346. PyErr_SetString(PyExc_TypeError,"Expected a large number");
  6347. return NULL;
  6348. }
  6349. }
  6350. archive_entry_set_size(arg1,arg2);
  6351. resultobj = SWIG_Py_Void();
  6352. return resultobj;
  6353. fail:
  6354. return NULL;
  6355. }
  6356. SWIGINTERN PyObject *_wrap_archive_entry_set_mtime(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6357. PyObject *resultobj = 0;
  6358. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  6359. time_t arg2 ;
  6360. long arg3 ;
  6361. void *argp1 = 0 ;
  6362. int res1 = 0 ;
  6363. long val3 ;
  6364. int ecode3 = 0 ;
  6365. PyObject *swig_obj[3] ;
  6366. if (!SWIG_Python_UnpackTuple(args, "archive_entry_set_mtime", 3, 3, swig_obj)) SWIG_fail;
  6367. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  6368. if (!SWIG_IsOK(res1)) {
  6369. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_set_mtime" "', argument " "1"" of type '" "struct archive_entry *""'");
  6370. }
  6371. arg1 = (struct archive_entry *)(argp1);
  6372. {
  6373. if (PyLong_Check(swig_obj[1]))
  6374. arg2 = (time_t) PyLong_AsLong(swig_obj[1]);
  6375. else if (PyInt_Check(swig_obj[1]))
  6376. arg2 = (time_t) PyInt_AsLong(swig_obj[1]);
  6377. else if (PyFloat_Check(swig_obj[1]))
  6378. arg2 = (time_t) PyFloat_AsDouble(swig_obj[1]);
  6379. else {
  6380. PyErr_SetString(PyExc_TypeError,"Expected a large number");
  6381. return NULL;
  6382. }
  6383. }
  6384. ecode3 = SWIG_AsVal_long(swig_obj[2], &val3);
  6385. if (!SWIG_IsOK(ecode3)) {
  6386. SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "archive_entry_set_mtime" "', argument " "3"" of type '" "long""'");
  6387. }
  6388. arg3 = (long)(val3);
  6389. archive_entry_set_mtime(arg1,arg2,arg3);
  6390. resultobj = SWIG_Py_Void();
  6391. return resultobj;
  6392. fail:
  6393. return NULL;
  6394. }
  6395. SWIGINTERN PyObject *_wrap_archive_entry_set_filetype(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6396. PyObject *resultobj = 0;
  6397. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  6398. unsigned int arg2 ;
  6399. void *argp1 = 0 ;
  6400. int res1 = 0 ;
  6401. unsigned int val2 ;
  6402. int ecode2 = 0 ;
  6403. PyObject *swig_obj[2] ;
  6404. if (!SWIG_Python_UnpackTuple(args, "archive_entry_set_filetype", 2, 2, swig_obj)) SWIG_fail;
  6405. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  6406. if (!SWIG_IsOK(res1)) {
  6407. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_set_filetype" "', argument " "1"" of type '" "struct archive_entry *""'");
  6408. }
  6409. arg1 = (struct archive_entry *)(argp1);
  6410. ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2);
  6411. if (!SWIG_IsOK(ecode2)) {
  6412. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "archive_entry_set_filetype" "', argument " "2"" of type '" "unsigned int""'");
  6413. }
  6414. arg2 = (unsigned int)(val2);
  6415. archive_entry_set_filetype(arg1,arg2);
  6416. resultobj = SWIG_Py_Void();
  6417. return resultobj;
  6418. fail:
  6419. return NULL;
  6420. }
  6421. SWIGINTERN PyObject *_wrap_archive_entry_set_perm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6422. PyObject *resultobj = 0;
  6423. struct archive_entry *arg1 = (struct archive_entry *) 0 ;
  6424. mode_t arg2 ;
  6425. void *argp1 = 0 ;
  6426. int res1 = 0 ;
  6427. unsigned short val2 ;
  6428. int ecode2 = 0 ;
  6429. PyObject *swig_obj[2] ;
  6430. if (!SWIG_Python_UnpackTuple(args, "archive_entry_set_perm", 2, 2, swig_obj)) SWIG_fail;
  6431. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive_entry, 0 | 0 );
  6432. if (!SWIG_IsOK(res1)) {
  6433. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_entry_set_perm" "', argument " "1"" of type '" "struct archive_entry *""'");
  6434. }
  6435. arg1 = (struct archive_entry *)(argp1);
  6436. ecode2 = SWIG_AsVal_unsigned_SS_short(swig_obj[1], &val2);
  6437. if (!SWIG_IsOK(ecode2)) {
  6438. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "archive_entry_set_perm" "', argument " "2"" of type '" "mode_t""'");
  6439. }
  6440. arg2 = (mode_t)(val2);
  6441. archive_entry_set_perm(arg1,arg2);
  6442. resultobj = SWIG_Py_Void();
  6443. return resultobj;
  6444. fail:
  6445. return NULL;
  6446. }
  6447. SWIGINTERN PyObject *_wrap_archive_errno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6448. PyObject *resultobj = 0;
  6449. struct archive *arg1 = (struct archive *) 0 ;
  6450. void *argp1 = 0 ;
  6451. int res1 = 0 ;
  6452. PyObject *swig_obj[1] ;
  6453. int result;
  6454. if (!args) SWIG_fail;
  6455. swig_obj[0] = args;
  6456. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  6457. if (!SWIG_IsOK(res1)) {
  6458. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_errno" "', argument " "1"" of type '" "struct archive *""'");
  6459. }
  6460. arg1 = (struct archive *)(argp1);
  6461. result = (int)archive_errno(arg1);
  6462. resultobj = SWIG_From_int((int)(result));
  6463. return resultobj;
  6464. fail:
  6465. return NULL;
  6466. }
  6467. SWIGINTERN PyObject *_wrap_archive_error_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6468. PyObject *resultobj = 0;
  6469. struct archive *arg1 = (struct archive *) 0 ;
  6470. void *argp1 = 0 ;
  6471. int res1 = 0 ;
  6472. PyObject *swig_obj[1] ;
  6473. char *result = 0 ;
  6474. if (!args) SWIG_fail;
  6475. swig_obj[0] = args;
  6476. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  6477. if (!SWIG_IsOK(res1)) {
  6478. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_error_string" "', argument " "1"" of type '" "struct archive *""'");
  6479. }
  6480. arg1 = (struct archive *)(argp1);
  6481. result = (char *)archive_error_string(arg1);
  6482. resultobj = SWIG_FromCharPtr((const char *)result);
  6483. return resultobj;
  6484. fail:
  6485. return NULL;
  6486. }
  6487. SWIGINTERN PyObject *_wrap_archive_read_data_into_str(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6488. PyObject *resultobj = 0;
  6489. struct archive *arg1 = (struct archive *) 0 ;
  6490. int arg2 ;
  6491. void *argp1 = 0 ;
  6492. int res1 = 0 ;
  6493. int val2 ;
  6494. int ecode2 = 0 ;
  6495. PyObject *swig_obj[2] ;
  6496. PyObject *result = 0 ;
  6497. if (!SWIG_Python_UnpackTuple(args, "archive_read_data_into_str", 2, 2, swig_obj)) SWIG_fail;
  6498. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  6499. if (!SWIG_IsOK(res1)) {
  6500. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_read_data_into_str" "', argument " "1"" of type '" "struct archive *""'");
  6501. }
  6502. arg1 = (struct archive *)(argp1);
  6503. ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  6504. if (!SWIG_IsOK(ecode2)) {
  6505. SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "archive_read_data_into_str" "', argument " "2"" of type '" "int""'");
  6506. }
  6507. arg2 = (int)(val2);
  6508. result = (PyObject *)archive_read_data_into_str(arg1,arg2);
  6509. resultobj = result;
  6510. return resultobj;
  6511. fail:
  6512. return NULL;
  6513. }
  6514. SWIGINTERN PyObject *_wrap_archive_write_data_from_str(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  6515. PyObject *resultobj = 0;
  6516. struct archive *arg1 = (struct archive *) 0 ;
  6517. PyObject *arg2 = (PyObject *) 0 ;
  6518. void *argp1 = 0 ;
  6519. int res1 = 0 ;
  6520. PyObject *swig_obj[2] ;
  6521. PyObject *result = 0 ;
  6522. if (!SWIG_Python_UnpackTuple(args, "archive_write_data_from_str", 2, 2, swig_obj)) SWIG_fail;
  6523. res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_archive, 0 | 0 );
  6524. if (!SWIG_IsOK(res1)) {
  6525. SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "archive_write_data_from_str" "', argument " "1"" of type '" "struct archive *""'");
  6526. }
  6527. arg1 = (struct archive *)(argp1);
  6528. arg2 = swig_obj[1];
  6529. result = (PyObject *)archive_write_data_from_str(arg1,arg2);
  6530. resultobj = result;
  6531. return resultobj;
  6532. fail:
  6533. return NULL;
  6534. }
  6535. static PyMethodDef SwigMethods[] = {
  6536. { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
  6537. { "archive_read_new", _wrap_archive_read_new, METH_NOARGS, NULL},
  6538. { "archive_read_free", _wrap_archive_read_free, METH_O, NULL},
  6539. { "archive_read_open_filename", _wrap_archive_read_open_filename, METH_VARARGS, NULL},
  6540. { "archive_read_open_memory", _wrap_archive_read_open_memory, METH_VARARGS, NULL},
  6541. { "archive_read_open_memory2", _wrap_archive_read_open_memory2, METH_VARARGS, NULL},
  6542. { "archive_read_open_fd", _wrap_archive_read_open_fd, METH_VARARGS, NULL},
  6543. { "archive_read_close", _wrap_archive_read_close, METH_O, NULL},
  6544. { "archive_format", _wrap_archive_format, METH_O, NULL},
  6545. { "archive_read_next_header2", _wrap_archive_read_next_header2, METH_VARARGS, NULL},
  6546. { "archive_entry_stat", _wrap_archive_entry_stat, METH_O, NULL},
  6547. { "archive_read_header_position", _wrap_archive_read_header_position, METH_O, NULL},
  6548. { "archive_read_set_format_option", _wrap_archive_read_set_format_option, METH_VARARGS, NULL},
  6549. { "archive_read_set_filter_option", _wrap_archive_read_set_filter_option, METH_VARARGS, NULL},
  6550. { "archive_read_set_option", _wrap_archive_read_set_option, METH_VARARGS, NULL},
  6551. { "archive_read_set_options", _wrap_archive_read_set_options, METH_VARARGS, NULL},
  6552. { "archive_read_add_passphrase", _wrap_archive_read_add_passphrase, METH_VARARGS, NULL},
  6553. { "archive_read_data_skip", _wrap_archive_read_data_skip, METH_O, NULL},
  6554. { "archive_read_data_into_fd", _wrap_archive_read_data_into_fd, METH_VARARGS, NULL},
  6555. { "archive_read_support_compression_all", _wrap_archive_read_support_compression_all, METH_O, NULL},
  6556. { "archive_read_support_compression_bzip2", _wrap_archive_read_support_compression_bzip2, METH_O, NULL},
  6557. { "archive_read_support_compression_compress", _wrap_archive_read_support_compression_compress, METH_O, NULL},
  6558. { "archive_read_support_compression_gzip", _wrap_archive_read_support_compression_gzip, METH_O, NULL},
  6559. { "archive_read_support_compression_lzip", _wrap_archive_read_support_compression_lzip, METH_O, NULL},
  6560. { "archive_read_support_compression_lzma", _wrap_archive_read_support_compression_lzma, METH_O, NULL},
  6561. { "archive_read_support_compression_none", _wrap_archive_read_support_compression_none, METH_O, NULL},
  6562. { "archive_read_support_compression_program", _wrap_archive_read_support_compression_program, METH_VARARGS, NULL},
  6563. { "archive_read_support_compression_program_signature", _wrap_archive_read_support_compression_program_signature, METH_VARARGS, NULL},
  6564. { "archive_read_support_compression_rpm", _wrap_archive_read_support_compression_rpm, METH_O, NULL},
  6565. { "archive_read_support_compression_uu", _wrap_archive_read_support_compression_uu, METH_O, NULL},
  6566. { "archive_read_support_compression_xz", _wrap_archive_read_support_compression_xz, METH_O, NULL},
  6567. { "archive_read_support_filter_all", _wrap_archive_read_support_filter_all, METH_O, NULL},
  6568. { "archive_read_support_filter_bzip2", _wrap_archive_read_support_filter_bzip2, METH_O, NULL},
  6569. { "archive_read_support_filter_compress", _wrap_archive_read_support_filter_compress, METH_O, NULL},
  6570. { "archive_read_support_filter_gzip", _wrap_archive_read_support_filter_gzip, METH_O, NULL},
  6571. { "archive_read_support_filter_grzip", _wrap_archive_read_support_filter_grzip, METH_O, NULL},
  6572. { "archive_read_support_filter_lrzip", _wrap_archive_read_support_filter_lrzip, METH_O, NULL},
  6573. { "archive_read_support_filter_lz4", _wrap_archive_read_support_filter_lz4, METH_O, NULL},
  6574. { "archive_read_support_filter_lzip", _wrap_archive_read_support_filter_lzip, METH_O, NULL},
  6575. { "archive_read_support_filter_lzma", _wrap_archive_read_support_filter_lzma, METH_O, NULL},
  6576. { "archive_read_support_filter_lzop", _wrap_archive_read_support_filter_lzop, METH_O, NULL},
  6577. { "archive_read_support_filter_none", _wrap_archive_read_support_filter_none, METH_O, NULL},
  6578. { "archive_read_support_filter_program", _wrap_archive_read_support_filter_program, METH_VARARGS, NULL},
  6579. { "archive_read_support_filter_program_signature", _wrap_archive_read_support_filter_program_signature, METH_VARARGS, NULL},
  6580. { "archive_read_support_filter_rpm", _wrap_archive_read_support_filter_rpm, METH_O, NULL},
  6581. { "archive_read_support_filter_uu", _wrap_archive_read_support_filter_uu, METH_O, NULL},
  6582. { "archive_read_support_filter_xz", _wrap_archive_read_support_filter_xz, METH_O, NULL},
  6583. { "archive_read_support_format_7zip", _wrap_archive_read_support_format_7zip, METH_O, NULL},
  6584. { "archive_read_support_format_all", _wrap_archive_read_support_format_all, METH_O, NULL},
  6585. { "archive_read_support_format_ar", _wrap_archive_read_support_format_ar, METH_O, NULL},
  6586. { "archive_read_support_format_by_code", _wrap_archive_read_support_format_by_code, METH_VARARGS, NULL},
  6587. { "archive_read_support_format_cab", _wrap_archive_read_support_format_cab, METH_O, NULL},
  6588. { "archive_read_support_format_cpio", _wrap_archive_read_support_format_cpio, METH_O, NULL},
  6589. { "archive_read_support_format_empty", _wrap_archive_read_support_format_empty, METH_O, NULL},
  6590. { "archive_read_support_format_gnutar", _wrap_archive_read_support_format_gnutar, METH_O, NULL},
  6591. { "archive_read_support_format_iso9660", _wrap_archive_read_support_format_iso9660, METH_O, NULL},
  6592. { "archive_read_support_format_lha", _wrap_archive_read_support_format_lha, METH_O, NULL},
  6593. { "archive_read_support_format_rar", _wrap_archive_read_support_format_rar, METH_O, NULL},
  6594. { "archive_read_support_format_raw", _wrap_archive_read_support_format_raw, METH_O, NULL},
  6595. { "archive_read_support_format_tar", _wrap_archive_read_support_format_tar, METH_O, NULL},
  6596. { "archive_read_support_format_warc", _wrap_archive_read_support_format_warc, METH_O, NULL},
  6597. { "archive_read_support_format_xar", _wrap_archive_read_support_format_xar, METH_O, NULL},
  6598. { "archive_read_support_format_zip", _wrap_archive_read_support_format_zip, METH_O, NULL},
  6599. { "archive_read_support_format_zip_streamable", _wrap_archive_read_support_format_zip_streamable, METH_O, NULL},
  6600. { "archive_read_support_format_zip_seekable", _wrap_archive_read_support_format_zip_seekable, METH_O, NULL},
  6601. { "archive_read_set_format", _wrap_archive_read_set_format, METH_VARARGS, NULL},
  6602. { "archive_read_append_filter", _wrap_archive_read_append_filter, METH_VARARGS, NULL},
  6603. { "archive_read_append_filter_program", _wrap_archive_read_append_filter_program, METH_VARARGS, NULL},
  6604. { "archive_read_append_filter_program_signature", _wrap_archive_read_append_filter_program_signature, METH_VARARGS, NULL},
  6605. { "archive_write_new", _wrap_archive_write_new, METH_NOARGS, NULL},
  6606. { "archive_write_free", _wrap_archive_write_free, METH_O, NULL},
  6607. { "archive_write_open", _wrap_archive_write_open, METH_VARARGS, NULL},
  6608. { "archive_write_open_fd", _wrap_archive_write_open_fd, METH_VARARGS, NULL},
  6609. { "archive_write_open_filename", _wrap_archive_write_open_filename, METH_VARARGS, NULL},
  6610. { "archive_write_open_filename_w", _wrap_archive_write_open_filename_w, METH_VARARGS, NULL},
  6611. { "archive_write_open_memory", _wrap_archive_write_open_memory, METH_VARARGS, NULL},
  6612. { "archive_write_close", _wrap_archive_write_close, METH_O, NULL},
  6613. { "archive_write_header", _wrap_archive_write_header, METH_VARARGS, NULL},
  6614. { "archive_write_set_format_option", _wrap_archive_write_set_format_option, METH_VARARGS, NULL},
  6615. { "archive_write_set_filter_option", _wrap_archive_write_set_filter_option, METH_VARARGS, NULL},
  6616. { "archive_write_set_option", _wrap_archive_write_set_option, METH_VARARGS, NULL},
  6617. { "archive_write_set_options", _wrap_archive_write_set_options, METH_VARARGS, NULL},
  6618. { "archive_write_set_passphrase", _wrap_archive_write_set_passphrase, METH_VARARGS, NULL},
  6619. { "archive_write_finish_entry", _wrap_archive_write_finish_entry, METH_O, NULL},
  6620. { "archive_write_add_filter", _wrap_archive_write_add_filter, METH_VARARGS, NULL},
  6621. { "archive_write_add_filter_by_name", _wrap_archive_write_add_filter_by_name, METH_VARARGS, NULL},
  6622. { "archive_write_add_filter_b64encode", _wrap_archive_write_add_filter_b64encode, METH_O, NULL},
  6623. { "archive_write_add_filter_bzip2", _wrap_archive_write_add_filter_bzip2, METH_O, NULL},
  6624. { "archive_write_add_filter_compress", _wrap_archive_write_add_filter_compress, METH_O, NULL},
  6625. { "archive_write_add_filter_grzip", _wrap_archive_write_add_filter_grzip, METH_O, NULL},
  6626. { "archive_write_add_filter_gzip", _wrap_archive_write_add_filter_gzip, METH_O, NULL},
  6627. { "archive_write_add_filter_lrzip", _wrap_archive_write_add_filter_lrzip, METH_O, NULL},
  6628. { "archive_write_add_filter_lz4", _wrap_archive_write_add_filter_lz4, METH_O, NULL},
  6629. { "archive_write_add_filter_lzip", _wrap_archive_write_add_filter_lzip, METH_O, NULL},
  6630. { "archive_write_add_filter_lzma", _wrap_archive_write_add_filter_lzma, METH_O, NULL},
  6631. { "archive_write_add_filter_lzop", _wrap_archive_write_add_filter_lzop, METH_O, NULL},
  6632. { "archive_write_add_filter_none", _wrap_archive_write_add_filter_none, METH_O, NULL},
  6633. { "archive_write_add_filter_program", _wrap_archive_write_add_filter_program, METH_VARARGS, NULL},
  6634. { "archive_write_add_filter_uuencode", _wrap_archive_write_add_filter_uuencode, METH_O, NULL},
  6635. { "archive_write_add_filter_xz", _wrap_archive_write_add_filter_xz, METH_O, NULL},
  6636. { "archive_write_set_format", _wrap_archive_write_set_format, METH_VARARGS, NULL},
  6637. { "archive_write_set_format_by_name", _wrap_archive_write_set_format_by_name, METH_VARARGS, NULL},
  6638. { "archive_write_set_format_7zip", _wrap_archive_write_set_format_7zip, METH_O, NULL},
  6639. { "archive_write_set_format_ar_bsd", _wrap_archive_write_set_format_ar_bsd, METH_O, NULL},
  6640. { "archive_write_set_format_ar_svr4", _wrap_archive_write_set_format_ar_svr4, METH_O, NULL},
  6641. { "archive_write_set_format_cpio", _wrap_archive_write_set_format_cpio, METH_O, NULL},
  6642. { "archive_write_set_format_cpio_newc", _wrap_archive_write_set_format_cpio_newc, METH_O, NULL},
  6643. { "archive_write_set_format_gnutar", _wrap_archive_write_set_format_gnutar, METH_O, NULL},
  6644. { "archive_write_set_format_iso9660", _wrap_archive_write_set_format_iso9660, METH_O, NULL},
  6645. { "archive_write_set_format_mtree", _wrap_archive_write_set_format_mtree, METH_O, NULL},
  6646. { "archive_write_set_format_mtree_classic", _wrap_archive_write_set_format_mtree_classic, METH_O, NULL},
  6647. { "archive_write_set_format_pax", _wrap_archive_write_set_format_pax, METH_O, NULL},
  6648. { "archive_write_set_format_pax_restricted", _wrap_archive_write_set_format_pax_restricted, METH_O, NULL},
  6649. { "archive_write_set_format_raw", _wrap_archive_write_set_format_raw, METH_O, NULL},
  6650. { "archive_write_set_format_shar", _wrap_archive_write_set_format_shar, METH_O, NULL},
  6651. { "archive_write_set_format_shar_dump", _wrap_archive_write_set_format_shar_dump, METH_O, NULL},
  6652. { "archive_write_set_format_ustar", _wrap_archive_write_set_format_ustar, METH_O, NULL},
  6653. { "archive_write_set_format_v7tar", _wrap_archive_write_set_format_v7tar, METH_O, NULL},
  6654. { "archive_write_set_format_warc", _wrap_archive_write_set_format_warc, METH_O, NULL},
  6655. { "archive_write_set_format_xar", _wrap_archive_write_set_format_xar, METH_O, NULL},
  6656. { "archive_write_set_format_zip", _wrap_archive_write_set_format_zip, METH_O, NULL},
  6657. { "archive_write_set_format_filter_by_ext", _wrap_archive_write_set_format_filter_by_ext, METH_VARARGS, NULL},
  6658. { "archive_write_set_format_filter_by_ext_def", _wrap_archive_write_set_format_filter_by_ext_def, METH_VARARGS, NULL},
  6659. { "archive_write_zip_set_compression_deflate", _wrap_archive_write_zip_set_compression_deflate, METH_O, NULL},
  6660. { "archive_write_zip_set_compression_store", _wrap_archive_write_zip_set_compression_store, METH_O, NULL},
  6661. { "archive_entry_new", _wrap_archive_entry_new, METH_NOARGS, NULL},
  6662. { "archive_entry_free", _wrap_archive_entry_free, METH_O, NULL},
  6663. { "archive_entry_pathname", _wrap_archive_entry_pathname, METH_O, NULL},
  6664. { "archive_entry_pathname_w", _wrap_archive_entry_pathname_w, METH_O, NULL},
  6665. { "archive_entry_size", _wrap_archive_entry_size, METH_O, NULL},
  6666. { "archive_entry_mtime", _wrap_archive_entry_mtime, METH_O, NULL},
  6667. { "archive_entry_filetype", _wrap_archive_entry_filetype, METH_O, NULL},
  6668. { "archive_entry_perm", _wrap_archive_entry_perm, METH_O, NULL},
  6669. { "archive_entry_symlink", _wrap_archive_entry_symlink, METH_O, NULL},
  6670. { "archive_entry_set_link", _wrap_archive_entry_set_link, METH_VARARGS, NULL},
  6671. { "archive_entry_symlink_w", _wrap_archive_entry_symlink_w, METH_O, NULL},
  6672. { "archive_read_disk_set_symlink_logical", _wrap_archive_read_disk_set_symlink_logical, METH_O, NULL},
  6673. { "archive_read_disk_set_symlink_physical", _wrap_archive_read_disk_set_symlink_physical, METH_O, NULL},
  6674. { "archive_read_disk_set_symlink_hybrid", _wrap_archive_read_disk_set_symlink_hybrid, METH_O, NULL},
  6675. { "archive_entry_set_symlink", _wrap_archive_entry_set_symlink, METH_VARARGS, NULL},
  6676. { "archive_entry_copy_symlink", _wrap_archive_entry_copy_symlink, METH_VARARGS, NULL},
  6677. { "archive_entry_copy_symlink_w", _wrap_archive_entry_copy_symlink_w, METH_VARARGS, NULL},
  6678. { "archive_entry_set_pathname", _wrap_archive_entry_set_pathname, METH_VARARGS, NULL},
  6679. { "archive_entry_set_size", _wrap_archive_entry_set_size, METH_VARARGS, NULL},
  6680. { "archive_entry_set_mtime", _wrap_archive_entry_set_mtime, METH_VARARGS, NULL},
  6681. { "archive_entry_set_filetype", _wrap_archive_entry_set_filetype, METH_VARARGS, NULL},
  6682. { "archive_entry_set_perm", _wrap_archive_entry_set_perm, METH_VARARGS, NULL},
  6683. { "archive_errno", _wrap_archive_errno, METH_O, NULL},
  6684. { "archive_error_string", _wrap_archive_error_string, METH_O, NULL},
  6685. { "archive_read_data_into_str", _wrap_archive_read_data_into_str, METH_VARARGS, NULL},
  6686. { "archive_write_data_from_str", _wrap_archive_write_data_from_str, METH_VARARGS, NULL},
  6687. { NULL, NULL, 0, NULL }
  6688. };
  6689. static PyMethodDef SwigMethods_proxydocs[] = {
  6690. { NULL, NULL, 0, NULL }
  6691. };
  6692. /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
  6693. static swig_type_info _swigt__p_archive = {"_p_archive", "struct archive *", 0, 0, (void*)0, 0};
  6694. static swig_type_info _swigt__p_archive_close_callback = {"_p_archive_close_callback", "archive_close_callback *", 0, 0, (void*)0, 0};
  6695. static swig_type_info _swigt__p_archive_entry = {"_p_archive_entry", "struct archive_entry *", 0, 0, (void*)0, 0};
  6696. static swig_type_info _swigt__p_archive_open_callback = {"_p_archive_open_callback", "archive_open_callback *", 0, 0, (void*)0, 0};
  6697. static swig_type_info _swigt__p_archive_write_callback = {"_p_archive_write_callback", "archive_write_callback *", 0, 0, (void*)0, 0};
  6698. static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
  6699. static swig_type_info _swigt__p_int64_t = {"_p_int64_t", "int64_t *", 0, 0, (void*)0, 0};
  6700. static swig_type_info _swigt__p_size_t = {"_p_size_t", "size_t *", 0, 0, (void*)0, 0};
  6701. static swig_type_info _swigt__p_stat = {"_p_stat", "struct stat *", 0, 0, (void*)0, 0};
  6702. static swig_type_info _swigt__p_time_t = {"_p_time_t", "time_t *", 0, 0, (void*)0, 0};
  6703. static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|mode_t *", 0, 0, (void*)0, 0};
  6704. static swig_type_info _swigt__p_wchar_t = {"_p_wchar_t", "wchar_t *", 0, 0, (void*)0, 0};
  6705. static swig_type_info *swig_type_initial[] = {
  6706. &_swigt__p_archive,
  6707. &_swigt__p_archive_close_callback,
  6708. &_swigt__p_archive_entry,
  6709. &_swigt__p_archive_open_callback,
  6710. &_swigt__p_archive_write_callback,
  6711. &_swigt__p_char,
  6712. &_swigt__p_int64_t,
  6713. &_swigt__p_size_t,
  6714. &_swigt__p_stat,
  6715. &_swigt__p_time_t,
  6716. &_swigt__p_unsigned_short,
  6717. &_swigt__p_wchar_t,
  6718. };
  6719. static swig_cast_info _swigc__p_archive[] = { {&_swigt__p_archive, 0, 0, 0},{0, 0, 0, 0}};
  6720. static swig_cast_info _swigc__p_archive_close_callback[] = { {&_swigt__p_archive_close_callback, 0, 0, 0},{0, 0, 0, 0}};
  6721. static swig_cast_info _swigc__p_archive_entry[] = { {&_swigt__p_archive_entry, 0, 0, 0},{0, 0, 0, 0}};
  6722. static swig_cast_info _swigc__p_archive_open_callback[] = { {&_swigt__p_archive_open_callback, 0, 0, 0},{0, 0, 0, 0}};
  6723. static swig_cast_info _swigc__p_archive_write_callback[] = { {&_swigt__p_archive_write_callback, 0, 0, 0},{0, 0, 0, 0}};
  6724. static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
  6725. static swig_cast_info _swigc__p_int64_t[] = { {&_swigt__p_int64_t, 0, 0, 0},{0, 0, 0, 0}};
  6726. static swig_cast_info _swigc__p_size_t[] = { {&_swigt__p_size_t, 0, 0, 0},{0, 0, 0, 0}};
  6727. static swig_cast_info _swigc__p_stat[] = { {&_swigt__p_stat, 0, 0, 0},{0, 0, 0, 0}};
  6728. static swig_cast_info _swigc__p_time_t[] = { {&_swigt__p_time_t, 0, 0, 0},{0, 0, 0, 0}};
  6729. static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}};
  6730. static swig_cast_info _swigc__p_wchar_t[] = { {&_swigt__p_wchar_t, 0, 0, 0},{0, 0, 0, 0}};
  6731. static swig_cast_info *swig_cast_initial[] = {
  6732. _swigc__p_archive,
  6733. _swigc__p_archive_close_callback,
  6734. _swigc__p_archive_entry,
  6735. _swigc__p_archive_open_callback,
  6736. _swigc__p_archive_write_callback,
  6737. _swigc__p_char,
  6738. _swigc__p_int64_t,
  6739. _swigc__p_size_t,
  6740. _swigc__p_stat,
  6741. _swigc__p_time_t,
  6742. _swigc__p_unsigned_short,
  6743. _swigc__p_wchar_t,
  6744. };
  6745. /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
  6746. static swig_const_info swig_const_table[] = {
  6747. {0, 0, 0, 0.0, 0, 0}};
  6748. #ifdef __cplusplus
  6749. }
  6750. #endif
  6751. /* -----------------------------------------------------------------------------
  6752. * Type initialization:
  6753. * This problem is tough by the requirement that no dynamic
  6754. * memory is used. Also, since swig_type_info structures store pointers to
  6755. * swig_cast_info structures and swig_cast_info structures store pointers back
  6756. * to swig_type_info structures, we need some lookup code at initialization.
  6757. * The idea is that swig generates all the structures that are needed.
  6758. * The runtime then collects these partially filled structures.
  6759. * The SWIG_InitializeModule function takes these initial arrays out of
  6760. * swig_module, and does all the lookup, filling in the swig_module.types
  6761. * array with the correct data and linking the correct swig_cast_info
  6762. * structures together.
  6763. *
  6764. * The generated swig_type_info structures are assigned statically to an initial
  6765. * array. We just loop through that array, and handle each type individually.
  6766. * First we lookup if this type has been already loaded, and if so, use the
  6767. * loaded structure instead of the generated one. Then we have to fill in the
  6768. * cast linked list. The cast data is initially stored in something like a
  6769. * two-dimensional array. Each row corresponds to a type (there are the same
  6770. * number of rows as there are in the swig_type_initial array). Each entry in
  6771. * a column is one of the swig_cast_info structures for that type.
  6772. * The cast_initial array is actually an array of arrays, because each row has
  6773. * a variable number of columns. So to actually build the cast linked list,
  6774. * we find the array of casts associated with the type, and loop through it
  6775. * adding the casts to the list. The one last trick we need to do is making
  6776. * sure the type pointer in the swig_cast_info struct is correct.
  6777. *
  6778. * First off, we lookup the cast->type name to see if it is already loaded.
  6779. * There are three cases to handle:
  6780. * 1) If the cast->type has already been loaded AND the type we are adding
  6781. * casting info to has not been loaded (it is in this module), THEN we
  6782. * replace the cast->type pointer with the type pointer that has already
  6783. * been loaded.
  6784. * 2) If BOTH types (the one we are adding casting info to, and the
  6785. * cast->type) are loaded, THEN the cast info has already been loaded by
  6786. * the previous module so we just ignore it.
  6787. * 3) Finally, if cast->type has not already been loaded, then we add that
  6788. * swig_cast_info to the linked list (because the cast->type) pointer will
  6789. * be correct.
  6790. * ----------------------------------------------------------------------------- */
  6791. #ifdef __cplusplus
  6792. extern "C" {
  6793. #if 0
  6794. } /* c-mode */
  6795. #endif
  6796. #endif
  6797. #if 0
  6798. #define SWIGRUNTIME_DEBUG
  6799. #endif
  6800. SWIGRUNTIME void
  6801. SWIG_InitializeModule(void *clientdata) {
  6802. size_t i;
  6803. swig_module_info *module_head, *iter;
  6804. int init;
  6805. /* check to see if the circular list has been setup, if not, set it up */
  6806. if (swig_module.next==0) {
  6807. /* Initialize the swig_module */
  6808. swig_module.type_initial = swig_type_initial;
  6809. swig_module.cast_initial = swig_cast_initial;
  6810. swig_module.next = &swig_module;
  6811. init = 1;
  6812. } else {
  6813. init = 0;
  6814. }
  6815. /* Try and load any already created modules */
  6816. module_head = SWIG_GetModule(clientdata);
  6817. if (!module_head) {
  6818. /* This is the first module loaded for this interpreter */
  6819. /* so set the swig module into the interpreter */
  6820. SWIG_SetModule(clientdata, &swig_module);
  6821. } else {
  6822. /* the interpreter has loaded a SWIG module, but has it loaded this one? */
  6823. iter=module_head;
  6824. do {
  6825. if (iter==&swig_module) {
  6826. /* Our module is already in the list, so there's nothing more to do. */
  6827. return;
  6828. }
  6829. iter=iter->next;
  6830. } while (iter!= module_head);
  6831. /* otherwise we must add our module into the list */
  6832. swig_module.next = module_head->next;
  6833. module_head->next = &swig_module;
  6834. }
  6835. /* When multiple interpreters are used, a module could have already been initialized in
  6836. a different interpreter, but not yet have a pointer in this interpreter.
  6837. In this case, we do not want to continue adding types... everything should be
  6838. set up already */
  6839. if (init == 0) return;
  6840. /* Now work on filling in swig_module.types */
  6841. #ifdef SWIGRUNTIME_DEBUG
  6842. printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
  6843. #endif
  6844. for (i = 0; i < swig_module.size; ++i) {
  6845. swig_type_info *type = 0;
  6846. swig_type_info *ret;
  6847. swig_cast_info *cast;
  6848. #ifdef SWIGRUNTIME_DEBUG
  6849. printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
  6850. #endif
  6851. /* if there is another module already loaded */
  6852. if (swig_module.next != &swig_module) {
  6853. type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
  6854. }
  6855. if (type) {
  6856. /* Overwrite clientdata field */
  6857. #ifdef SWIGRUNTIME_DEBUG
  6858. printf("SWIG_InitializeModule: found type %s\n", type->name);
  6859. #endif
  6860. if (swig_module.type_initial[i]->clientdata) {
  6861. type->clientdata = swig_module.type_initial[i]->clientdata;
  6862. #ifdef SWIGRUNTIME_DEBUG
  6863. printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
  6864. #endif
  6865. }
  6866. } else {
  6867. type = swig_module.type_initial[i];
  6868. }
  6869. /* Insert casting types */
  6870. cast = swig_module.cast_initial[i];
  6871. while (cast->type) {
  6872. /* Don't need to add information already in the list */
  6873. ret = 0;
  6874. #ifdef SWIGRUNTIME_DEBUG
  6875. printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
  6876. #endif
  6877. if (swig_module.next != &swig_module) {
  6878. ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
  6879. #ifdef SWIGRUNTIME_DEBUG
  6880. if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
  6881. #endif
  6882. }
  6883. if (ret) {
  6884. if (type == swig_module.type_initial[i]) {
  6885. #ifdef SWIGRUNTIME_DEBUG
  6886. printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
  6887. #endif
  6888. cast->type = ret;
  6889. ret = 0;
  6890. } else {
  6891. /* Check for casting already in the list */
  6892. swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
  6893. #ifdef SWIGRUNTIME_DEBUG
  6894. if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
  6895. #endif
  6896. if (!ocast) ret = 0;
  6897. }
  6898. }
  6899. if (!ret) {
  6900. #ifdef SWIGRUNTIME_DEBUG
  6901. printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
  6902. #endif
  6903. if (type->cast) {
  6904. type->cast->prev = cast;
  6905. cast->next = type->cast;
  6906. }
  6907. type->cast = cast;
  6908. }
  6909. cast++;
  6910. }
  6911. /* Set entry in modules->types array equal to the type */
  6912. swig_module.types[i] = type;
  6913. }
  6914. swig_module.types[i] = 0;
  6915. #ifdef SWIGRUNTIME_DEBUG
  6916. printf("**** SWIG_InitializeModule: Cast List ******\n");
  6917. for (i = 0; i < swig_module.size; ++i) {
  6918. int j = 0;
  6919. swig_cast_info *cast = swig_module.cast_initial[i];
  6920. printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
  6921. while (cast->type) {
  6922. printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
  6923. cast++;
  6924. ++j;
  6925. }
  6926. printf("---- Total casts: %d\n",j);
  6927. }
  6928. printf("**** SWIG_InitializeModule: Cast List ******\n");
  6929. #endif
  6930. }
  6931. /* This function will propagate the clientdata field of type to
  6932. * any new swig_type_info structures that have been added into the list
  6933. * of equivalent types. It is like calling
  6934. * SWIG_TypeClientData(type, clientdata) a second time.
  6935. */
  6936. SWIGRUNTIME void
  6937. SWIG_PropagateClientData(void) {
  6938. size_t i;
  6939. swig_cast_info *equiv;
  6940. static int init_run = 0;
  6941. if (init_run) return;
  6942. init_run = 1;
  6943. for (i = 0; i < swig_module.size; i++) {
  6944. if (swig_module.types[i]->clientdata) {
  6945. equiv = swig_module.types[i]->cast;
  6946. while (equiv) {
  6947. if (!equiv->converter) {
  6948. if (equiv->type && !equiv->type->clientdata)
  6949. SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
  6950. }
  6951. equiv = equiv->next;
  6952. }
  6953. }
  6954. }
  6955. }
  6956. #ifdef __cplusplus
  6957. #if 0
  6958. {
  6959. /* c-mode */
  6960. #endif
  6961. }
  6962. #endif
  6963. #ifdef __cplusplus
  6964. extern "C" {
  6965. #endif
  6966. /* Python-specific SWIG API */
  6967. #define SWIG_newvarlink() SWIG_Python_newvarlink()
  6968. #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
  6969. #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
  6970. /* -----------------------------------------------------------------------------
  6971. * global variable support code.
  6972. * ----------------------------------------------------------------------------- */
  6973. typedef struct swig_globalvar {
  6974. char *name; /* Name of global variable */
  6975. PyObject *(*get_attr)(void); /* Return the current value */
  6976. int (*set_attr)(PyObject *); /* Set the value */
  6977. struct swig_globalvar *next;
  6978. } swig_globalvar;
  6979. typedef struct swig_varlinkobject {
  6980. PyObject_HEAD
  6981. swig_globalvar *vars;
  6982. } swig_varlinkobject;
  6983. SWIGINTERN PyObject *
  6984. swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
  6985. #if PY_VERSION_HEX >= 0x03000000
  6986. return PyUnicode_InternFromString("<Swig global variables>");
  6987. #else
  6988. return PyString_FromString("<Swig global variables>");
  6989. #endif
  6990. }
  6991. SWIGINTERN PyObject *
  6992. swig_varlink_str(swig_varlinkobject *v) {
  6993. #if PY_VERSION_HEX >= 0x03000000
  6994. PyObject *str = PyUnicode_InternFromString("(");
  6995. PyObject *tail;
  6996. PyObject *joined;
  6997. swig_globalvar *var;
  6998. for (var = v->vars; var; var=var->next) {
  6999. tail = PyUnicode_FromString(var->name);
  7000. joined = PyUnicode_Concat(str, tail);
  7001. Py_DecRef(str);
  7002. Py_DecRef(tail);
  7003. str = joined;
  7004. if (var->next) {
  7005. tail = PyUnicode_InternFromString(", ");
  7006. joined = PyUnicode_Concat(str, tail);
  7007. Py_DecRef(str);
  7008. Py_DecRef(tail);
  7009. str = joined;
  7010. }
  7011. }
  7012. tail = PyUnicode_InternFromString(")");
  7013. joined = PyUnicode_Concat(str, tail);
  7014. Py_DecRef(str);
  7015. Py_DecRef(tail);
  7016. str = joined;
  7017. #else
  7018. PyObject *str = PyString_FromString("(");
  7019. swig_globalvar *var;
  7020. for (var = v->vars; var; var=var->next) {
  7021. PyString_ConcatAndDel(&str,PyString_FromString(var->name));
  7022. if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
  7023. }
  7024. PyString_ConcatAndDel(&str,PyString_FromString(")"));
  7025. #endif
  7026. return str;
  7027. }
  7028. SWIGINTERN void
  7029. swig_varlink_dealloc(swig_varlinkobject *v) {
  7030. swig_globalvar *var = v->vars;
  7031. while (var) {
  7032. swig_globalvar *n = var->next;
  7033. free(var->name);
  7034. free(var);
  7035. var = n;
  7036. }
  7037. }
  7038. SWIGINTERN PyObject *
  7039. swig_varlink_getattr(swig_varlinkobject *v, char *n) {
  7040. PyObject *res = NULL;
  7041. swig_globalvar *var = v->vars;
  7042. while (var) {
  7043. if (strcmp(var->name,n) == 0) {
  7044. res = (*var->get_attr)();
  7045. break;
  7046. }
  7047. var = var->next;
  7048. }
  7049. if (res == NULL && !PyErr_Occurred()) {
  7050. PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
  7051. }
  7052. return res;
  7053. }
  7054. SWIGINTERN int
  7055. swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
  7056. int res = 1;
  7057. swig_globalvar *var = v->vars;
  7058. while (var) {
  7059. if (strcmp(var->name,n) == 0) {
  7060. res = (*var->set_attr)(p);
  7061. break;
  7062. }
  7063. var = var->next;
  7064. }
  7065. if (res == 1 && !PyErr_Occurred()) {
  7066. PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
  7067. }
  7068. return res;
  7069. }
  7070. SWIGINTERN PyTypeObject*
  7071. swig_varlink_type(void) {
  7072. static char varlink__doc__[] = "Swig var link object";
  7073. static PyTypeObject varlink_type;
  7074. static int type_init = 0;
  7075. if (!type_init) {
  7076. const PyTypeObject tmp = {
  7077. #if PY_VERSION_HEX >= 0x03000000
  7078. PyVarObject_HEAD_INIT(NULL, 0)
  7079. #else
  7080. PyObject_HEAD_INIT(NULL)
  7081. 0, /* ob_size */
  7082. #endif
  7083. "swigvarlink", /* tp_name */
  7084. sizeof(swig_varlinkobject), /* tp_basicsize */
  7085. 0, /* tp_itemsize */
  7086. (destructor) swig_varlink_dealloc, /* tp_dealloc */
  7087. 0, /* tp_print */
  7088. (getattrfunc) swig_varlink_getattr, /* tp_getattr */
  7089. (setattrfunc) swig_varlink_setattr, /* tp_setattr */
  7090. 0, /* tp_compare */
  7091. (reprfunc) swig_varlink_repr, /* tp_repr */
  7092. 0, /* tp_as_number */
  7093. 0, /* tp_as_sequence */
  7094. 0, /* tp_as_mapping */
  7095. 0, /* tp_hash */
  7096. 0, /* tp_call */
  7097. (reprfunc) swig_varlink_str, /* tp_str */
  7098. 0, /* tp_getattro */
  7099. 0, /* tp_setattro */
  7100. 0, /* tp_as_buffer */
  7101. 0, /* tp_flags */
  7102. varlink__doc__, /* tp_doc */
  7103. 0, /* tp_traverse */
  7104. 0, /* tp_clear */
  7105. 0, /* tp_richcompare */
  7106. 0, /* tp_weaklistoffset */
  7107. 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
  7108. 0, /* tp_del */
  7109. 0, /* tp_version_tag */
  7110. #if PY_VERSION_HEX >= 0x03040000
  7111. 0, /* tp_finalize */
  7112. #endif
  7113. #if PY_VERSION_HEX >= 0x03080000
  7114. 0, /* tp_vectorcall */
  7115. #endif
  7116. #if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
  7117. 0, /* tp_print */
  7118. #endif
  7119. #ifdef COUNT_ALLOCS
  7120. 0, /* tp_allocs */
  7121. 0, /* tp_frees */
  7122. 0, /* tp_maxalloc */
  7123. 0, /* tp_prev */
  7124. 0 /* tp_next */
  7125. #endif
  7126. };
  7127. varlink_type = tmp;
  7128. type_init = 1;
  7129. if (PyType_Ready(&varlink_type) < 0)
  7130. return NULL;
  7131. }
  7132. return &varlink_type;
  7133. }
  7134. /* Create a variable linking object for use later */
  7135. SWIGINTERN PyObject *
  7136. SWIG_Python_newvarlink(void) {
  7137. swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
  7138. if (result) {
  7139. result->vars = 0;
  7140. }
  7141. return ((PyObject*) result);
  7142. }
  7143. SWIGINTERN void
  7144. SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
  7145. swig_varlinkobject *v = (swig_varlinkobject *) p;
  7146. swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
  7147. if (gv) {
  7148. size_t size = strlen(name)+1;
  7149. gv->name = (char *)malloc(size);
  7150. if (gv->name) {
  7151. memcpy(gv->name, name, size);
  7152. gv->get_attr = get_attr;
  7153. gv->set_attr = set_attr;
  7154. gv->next = v->vars;
  7155. }
  7156. }
  7157. v->vars = gv;
  7158. }
  7159. SWIGINTERN PyObject *
  7160. SWIG_globals(void) {
  7161. static PyObject *globals = 0;
  7162. if (!globals) {
  7163. globals = SWIG_newvarlink();
  7164. }
  7165. return globals;
  7166. }
  7167. /* -----------------------------------------------------------------------------
  7168. * constants/methods manipulation
  7169. * ----------------------------------------------------------------------------- */
  7170. /* Install Constants */
  7171. SWIGINTERN void
  7172. SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
  7173. PyObject *obj = 0;
  7174. size_t i;
  7175. for (i = 0; constants[i].type; ++i) {
  7176. switch(constants[i].type) {
  7177. case SWIG_PY_POINTER:
  7178. obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
  7179. break;
  7180. case SWIG_PY_BINARY:
  7181. obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
  7182. break;
  7183. default:
  7184. obj = 0;
  7185. break;
  7186. }
  7187. if (obj) {
  7188. PyDict_SetItemString(d, constants[i].name, obj);
  7189. Py_DECREF(obj);
  7190. }
  7191. }
  7192. }
  7193. /* -----------------------------------------------------------------------------*/
  7194. /* Fix SwigMethods to carry the callback ptrs when needed */
  7195. /* -----------------------------------------------------------------------------*/
  7196. SWIGINTERN void
  7197. SWIG_Python_FixMethods(PyMethodDef *methods,
  7198. swig_const_info *const_table,
  7199. swig_type_info **types,
  7200. swig_type_info **types_initial) {
  7201. size_t i;
  7202. for (i = 0; methods[i].ml_name; ++i) {
  7203. const char *c = methods[i].ml_doc;
  7204. if (!c) continue;
  7205. c = strstr(c, "swig_ptr: ");
  7206. if (c) {
  7207. int j;
  7208. swig_const_info *ci = 0;
  7209. const char *name = c + 10;
  7210. for (j = 0; const_table[j].type; ++j) {
  7211. if (strncmp(const_table[j].name, name,
  7212. strlen(const_table[j].name)) == 0) {
  7213. ci = &(const_table[j]);
  7214. break;
  7215. }
  7216. }
  7217. if (ci) {
  7218. void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
  7219. if (ptr) {
  7220. size_t shift = (ci->ptype) - types;
  7221. swig_type_info *ty = types_initial[shift];
  7222. size_t ldoc = (c - methods[i].ml_doc);
  7223. size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
  7224. char *ndoc = (char*)malloc(ldoc + lptr + 10);
  7225. if (ndoc) {
  7226. char *buff = ndoc;
  7227. memcpy(buff, methods[i].ml_doc, ldoc);
  7228. buff += ldoc;
  7229. memcpy(buff, "swig_ptr: ", 10);
  7230. buff += 10;
  7231. SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
  7232. methods[i].ml_doc = ndoc;
  7233. }
  7234. }
  7235. }
  7236. }
  7237. }
  7238. }
  7239. /* -----------------------------------------------------------------------------
  7240. * Method creation and docstring support functions
  7241. * ----------------------------------------------------------------------------- */
  7242. /* -----------------------------------------------------------------------------
  7243. * Function to find the method definition with the correct docstring for the
  7244. * proxy module as opposed to the low-level API
  7245. * ----------------------------------------------------------------------------- */
  7246. SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
  7247. /* Find the function in the modified method table */
  7248. size_t offset = 0;
  7249. int found = 0;
  7250. while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
  7251. if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
  7252. found = 1;
  7253. break;
  7254. }
  7255. offset++;
  7256. }
  7257. /* Use the copy with the modified docstring if available */
  7258. return found ? &SwigMethods_proxydocs[offset] : NULL;
  7259. }
  7260. /* -----------------------------------------------------------------------------
  7261. * Wrapper of PyInstanceMethod_New() used in Python 3
  7262. * It is exported to the generated module, used for -fastproxy
  7263. * ----------------------------------------------------------------------------- */
  7264. SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
  7265. if (PyCFunction_Check(func)) {
  7266. PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
  7267. PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
  7268. if (ml)
  7269. func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
  7270. }
  7271. #if PY_VERSION_HEX >= 0x03000000
  7272. return PyInstanceMethod_New(func);
  7273. #else
  7274. return PyMethod_New(func, NULL, NULL);
  7275. #endif
  7276. }
  7277. /* -----------------------------------------------------------------------------
  7278. * Wrapper of PyStaticMethod_New()
  7279. * It is exported to the generated module, used for -fastproxy
  7280. * ----------------------------------------------------------------------------- */
  7281. SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
  7282. if (PyCFunction_Check(func)) {
  7283. PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
  7284. PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
  7285. if (ml)
  7286. func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
  7287. }
  7288. return PyStaticMethod_New(func);
  7289. }
  7290. #ifdef __cplusplus
  7291. }
  7292. #endif
  7293. /* -----------------------------------------------------------------------------*
  7294. * Partial Init method
  7295. * -----------------------------------------------------------------------------*/
  7296. #ifdef __cplusplus
  7297. extern "C"
  7298. #endif
  7299. SWIGEXPORT
  7300. #if PY_VERSION_HEX >= 0x03000000
  7301. PyObject*
  7302. #else
  7303. void
  7304. #endif
  7305. SWIG_init(void) {
  7306. PyObject *m, *d, *md, *globals;
  7307. #if PY_VERSION_HEX >= 0x03000000
  7308. static struct PyModuleDef SWIG_module = {
  7309. PyModuleDef_HEAD_INIT,
  7310. SWIG_name,
  7311. NULL,
  7312. -1,
  7313. SwigMethods,
  7314. NULL,
  7315. NULL,
  7316. NULL,
  7317. NULL
  7318. };
  7319. #endif
  7320. #if defined(SWIGPYTHON_BUILTIN)
  7321. static SwigPyClientData SwigPyObject_clientdata = {
  7322. 0, 0, 0, 0, 0, 0, 0
  7323. };
  7324. static PyGetSetDef this_getset_def = {
  7325. (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
  7326. };
  7327. static SwigPyGetSet thisown_getset_closure = {
  7328. SwigPyObject_own,
  7329. SwigPyObject_own
  7330. };
  7331. static PyGetSetDef thisown_getset_def = {
  7332. (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
  7333. };
  7334. PyTypeObject *builtin_pytype;
  7335. int builtin_base_count;
  7336. swig_type_info *builtin_basetype;
  7337. PyObject *tuple;
  7338. PyGetSetDescrObject *static_getset;
  7339. PyTypeObject *metatype;
  7340. PyTypeObject *swigpyobject;
  7341. SwigPyClientData *cd;
  7342. PyObject *public_interface, *public_symbol;
  7343. PyObject *this_descr;
  7344. PyObject *thisown_descr;
  7345. PyObject *self = 0;
  7346. int i;
  7347. (void)builtin_pytype;
  7348. (void)builtin_base_count;
  7349. (void)builtin_basetype;
  7350. (void)tuple;
  7351. (void)static_getset;
  7352. (void)self;
  7353. /* Metaclass is used to implement static member variables */
  7354. metatype = SwigPyObjectType();
  7355. assert(metatype);
  7356. #endif
  7357. (void)globals;
  7358. /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
  7359. SWIG_This();
  7360. SWIG_Python_TypeCache();
  7361. SwigPyPacked_type();
  7362. #ifndef SWIGPYTHON_BUILTIN
  7363. SwigPyObject_type();
  7364. #endif
  7365. /* Fix SwigMethods to carry the callback ptrs when needed */
  7366. SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
  7367. #if PY_VERSION_HEX >= 0x03000000
  7368. m = PyModule_Create(&SWIG_module);
  7369. #else
  7370. m = Py_InitModule(SWIG_name, SwigMethods);
  7371. #endif
  7372. md = d = PyModule_GetDict(m);
  7373. (void)md;
  7374. SWIG_InitializeModule(0);
  7375. #ifdef SWIGPYTHON_BUILTIN
  7376. swigpyobject = SwigPyObject_TypeOnce();
  7377. SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
  7378. assert(SwigPyObject_stype);
  7379. cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  7380. if (!cd) {
  7381. SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
  7382. SwigPyObject_clientdata.pytype = swigpyobject;
  7383. } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
  7384. PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
  7385. # if PY_VERSION_HEX >= 0x03000000
  7386. return NULL;
  7387. # else
  7388. return;
  7389. # endif
  7390. }
  7391. /* All objects have a 'this' attribute */
  7392. this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
  7393. (void)this_descr;
  7394. /* All objects have a 'thisown' attribute */
  7395. thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
  7396. (void)thisown_descr;
  7397. public_interface = PyList_New(0);
  7398. public_symbol = 0;
  7399. (void)public_symbol;
  7400. PyDict_SetItemString(md, "__all__", public_interface);
  7401. Py_DECREF(public_interface);
  7402. for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
  7403. SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
  7404. for (i = 0; swig_const_table[i].name != 0; ++i)
  7405. SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
  7406. #endif
  7407. SWIG_InstallConstants(d,swig_const_table);
  7408. SWIG_Python_SetConstant(d, "ARCHIVE_VERSION_NUMBER",SWIG_From_int((int)(3002002)));
  7409. SWIG_Python_SetConstant(d, "ARCHIVE_VERSION_STRING",SWIG_FromCharPtr("libarchive 3.2.2"));
  7410. SWIG_Python_SetConstant(d, "ARCHIVE_EOF",SWIG_From_int((int)(1)));
  7411. SWIG_Python_SetConstant(d, "ARCHIVE_OK",SWIG_From_int((int)(0)));
  7412. SWIG_Python_SetConstant(d, "ARCHIVE_RETRY",SWIG_From_int((int)((-10))));
  7413. SWIG_Python_SetConstant(d, "ARCHIVE_WARN",SWIG_From_int((int)((-20))));
  7414. SWIG_Python_SetConstant(d, "ARCHIVE_FAILED",SWIG_From_int((int)((-25))));
  7415. SWIG_Python_SetConstant(d, "ARCHIVE_FATAL",SWIG_From_int((int)((-30))));
  7416. SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_NONE",SWIG_From_int((int)(0)));
  7417. SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_GZIP",SWIG_From_int((int)(1)));
  7418. SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_BZIP2",SWIG_From_int((int)(2)));
  7419. SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_COMPRESS",SWIG_From_int((int)(3)));
  7420. SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_PROGRAM",SWIG_From_int((int)(4)));
  7421. SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_LZMA",SWIG_From_int((int)(5)));
  7422. SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_XZ",SWIG_From_int((int)(6)));
  7423. SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_UU",SWIG_From_int((int)(7)));
  7424. SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_RPM",SWIG_From_int((int)(8)));
  7425. SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_LZIP",SWIG_From_int((int)(9)));
  7426. SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_LRZIP",SWIG_From_int((int)(10)));
  7427. SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_LZOP",SWIG_From_int((int)(11)));
  7428. SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_GRZIP",SWIG_From_int((int)(12)));
  7429. SWIG_Python_SetConstant(d, "ARCHIVE_FILTER_LZ4",SWIG_From_int((int)(13)));
  7430. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_BASE_MASK",SWIG_From_int((int)(0xff0000)));
  7431. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_CPIO",SWIG_From_int((int)(0x10000)));
  7432. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_CPIO_POSIX",SWIG_From_int((int)((0x10000|1))));
  7433. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_CPIO_BIN_LE",SWIG_From_int((int)((0x10000|2))));
  7434. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_CPIO_BIN_BE",SWIG_From_int((int)((0x10000|3))));
  7435. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_CPIO_SVR4_NOCRC",SWIG_From_int((int)((0x10000|4))));
  7436. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_CPIO_SVR4_CRC",SWIG_From_int((int)((0x10000|5))));
  7437. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_CPIO_AFIO_LARGE",SWIG_From_int((int)((0x10000|6))));
  7438. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_SHAR",SWIG_From_int((int)(0x20000)));
  7439. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_SHAR_BASE",SWIG_From_int((int)((0x20000|1))));
  7440. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_SHAR_DUMP",SWIG_From_int((int)((0x20000|2))));
  7441. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_TAR",SWIG_From_int((int)(0x30000)));
  7442. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_TAR_USTAR",SWIG_From_int((int)((0x30000|1))));
  7443. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_TAR_PAX_INTERCHANGE",SWIG_From_int((int)((0x30000|2))));
  7444. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_TAR_PAX_RESTRICTED",SWIG_From_int((int)((0x30000|3))));
  7445. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_TAR_GNUTAR",SWIG_From_int((int)((0x30000|4))));
  7446. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_ISO9660",SWIG_From_int((int)(0x40000)));
  7447. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_ISO9660_ROCKRIDGE",SWIG_From_int((int)((0x40000|1))));
  7448. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_ZIP",SWIG_From_int((int)(0x50000)));
  7449. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_EMPTY",SWIG_From_int((int)(0x60000)));
  7450. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_AR",SWIG_From_int((int)(0x70000)));
  7451. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_AR_GNU",SWIG_From_int((int)((0x70000|1))));
  7452. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_AR_BSD",SWIG_From_int((int)((0x70000|2))));
  7453. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_MTREE",SWIG_From_int((int)(0x80000)));
  7454. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_RAW",SWIG_From_int((int)(0x90000)));
  7455. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_XAR",SWIG_From_int((int)(0xA0000)));
  7456. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_LHA",SWIG_From_int((int)(0xB0000)));
  7457. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_CAB",SWIG_From_int((int)(0xC0000)));
  7458. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_RAR",SWIG_From_int((int)(0xD0000)));
  7459. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_7ZIP",SWIG_From_int((int)(0xE0000)));
  7460. SWIG_Python_SetConstant(d, "ARCHIVE_FORMAT_WARC",SWIG_From_int((int)(0xF0000)));
  7461. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_OWNER",SWIG_From_int((int)((0x0001))));
  7462. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_PERM",SWIG_From_int((int)((0x0002))));
  7463. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_TIME",SWIG_From_int((int)((0x0004))));
  7464. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_NO_OVERWRITE",SWIG_From_int((int)((0x0008))));
  7465. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_UNLINK",SWIG_From_int((int)((0x0010))));
  7466. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_ACL",SWIG_From_int((int)((0x0020))));
  7467. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_FFLAGS",SWIG_From_int((int)((0x0040))));
  7468. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_XATTR",SWIG_From_int((int)((0x0080))));
  7469. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_SECURE_SYMLINKS",SWIG_From_int((int)((0x0100))));
  7470. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_SECURE_NODOTDOT",SWIG_From_int((int)((0x0200))));
  7471. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_NO_AUTODIR",SWIG_From_int((int)((0x0400))));
  7472. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_NO_OVERWRITE_NEWER",SWIG_From_int((int)((0x0800))));
  7473. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_SPARSE",SWIG_From_int((int)((0x1000))));
  7474. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_MAC_METADATA",SWIG_From_int((int)((0x2000))));
  7475. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_NO_HFS_COMPRESSION",SWIG_From_int((int)((0x4000))));
  7476. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_HFS_COMPRESSION_FORCED",SWIG_From_int((int)((0x8000))));
  7477. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_SECURE_NOABSOLUTEPATHS",SWIG_From_int((int)((0x10000))));
  7478. SWIG_Python_SetConstant(d, "ARCHIVE_EXTRACT_CLEAR_NOCHANGE_FFLAGS",SWIG_From_int((int)((0x20000))));
  7479. #if PY_VERSION_HEX >= 0x03000000
  7480. return m;
  7481. #else
  7482. return;
  7483. #endif
  7484. }