| 1 | /* ----------------------------------------------------------------------------
|
|---|
| 2 | * This file was automatically generated by SWIG (http://www.swig.org).
|
|---|
| 3 | * Version 3.0.5
|
|---|
| 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 |
|
|---|
| 11 | #define SWIGPYTHON
|
|---|
| 12 | #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
|
|---|
| 13 |
|
|---|
| 14 | /* -----------------------------------------------------------------------------
|
|---|
| 15 | * This section contains generic SWIG labels for method/variable
|
|---|
| 16 | * declarations/attributes, and other compiler dependent labels.
|
|---|
| 17 | * ----------------------------------------------------------------------------- */
|
|---|
| 18 |
|
|---|
| 19 | /* template workaround for compilers that cannot correctly implement the C++ standard */
|
|---|
| 20 | #ifndef SWIGTEMPLATEDISAMBIGUATOR
|
|---|
| 21 | # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
|
|---|
| 22 | # define SWIGTEMPLATEDISAMBIGUATOR template
|
|---|
| 23 | # elif defined(__HP_aCC)
|
|---|
| 24 | /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
|
|---|
| 25 | /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
|
|---|
| 26 | # define SWIGTEMPLATEDISAMBIGUATOR template
|
|---|
| 27 | # else
|
|---|
| 28 | # define SWIGTEMPLATEDISAMBIGUATOR
|
|---|
| 29 | # endif
|
|---|
| 30 | #endif
|
|---|
| 31 |
|
|---|
| 32 | /* inline attribute */
|
|---|
| 33 | #ifndef SWIGINLINE
|
|---|
| 34 | # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
|
|---|
| 35 | # define SWIGINLINE inline
|
|---|
| 36 | # else
|
|---|
| 37 | # define SWIGINLINE
|
|---|
| 38 | # endif
|
|---|
| 39 | #endif
|
|---|
| 40 |
|
|---|
| 41 | /* attribute recognised by some compilers to avoid 'unused' warnings */
|
|---|
| 42 | #ifndef SWIGUNUSED
|
|---|
| 43 | # if defined(__GNUC__)
|
|---|
| 44 | # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
|
|---|
| 45 | # define SWIGUNUSED __attribute__ ((__unused__))
|
|---|
| 46 | # else
|
|---|
| 47 | # define SWIGUNUSED
|
|---|
| 48 | # endif
|
|---|
| 49 | # elif defined(__ICC)
|
|---|
| 50 | # define SWIGUNUSED __attribute__ ((__unused__))
|
|---|
| 51 | # else
|
|---|
| 52 | # define SWIGUNUSED
|
|---|
| 53 | # endif
|
|---|
| 54 | #endif
|
|---|
| 55 |
|
|---|
| 56 | #ifndef SWIG_MSC_UNSUPPRESS_4505
|
|---|
| 57 | # if defined(_MSC_VER)
|
|---|
| 58 | # pragma warning(disable : 4505) /* unreferenced local function has been removed */
|
|---|
| 59 | # endif
|
|---|
| 60 | #endif
|
|---|
| 61 |
|
|---|
| 62 | #ifndef SWIGUNUSEDPARM
|
|---|
| 63 | # ifdef __cplusplus
|
|---|
| 64 | # define SWIGUNUSEDPARM(p)
|
|---|
| 65 | # else
|
|---|
| 66 | # define SWIGUNUSEDPARM(p) p SWIGUNUSED
|
|---|
| 67 | # endif
|
|---|
| 68 | #endif
|
|---|
| 69 |
|
|---|
| 70 | /* internal SWIG method */
|
|---|
| 71 | #ifndef SWIGINTERN
|
|---|
| 72 | # define SWIGINTERN static SWIGUNUSED
|
|---|
| 73 | #endif
|
|---|
| 74 |
|
|---|
| 75 | /* internal inline SWIG method */
|
|---|
| 76 | #ifndef SWIGINTERNINLINE
|
|---|
| 77 | # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
|
|---|
| 78 | #endif
|
|---|
| 79 |
|
|---|
| 80 | /* exporting methods */
|
|---|
| 81 | #if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
|
|---|
| 82 | # ifndef GCC_HASCLASSVISIBILITY
|
|---|
| 83 | # define GCC_HASCLASSVISIBILITY
|
|---|
| 84 | # endif
|
|---|
| 85 | #endif
|
|---|
| 86 |
|
|---|
| 87 | #ifndef SWIGEXPORT
|
|---|
| 88 | # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
|---|
| 89 | # if defined(STATIC_LINKED)
|
|---|
| 90 | # define SWIGEXPORT
|
|---|
| 91 | # else
|
|---|
| 92 | # define SWIGEXPORT __declspec(dllexport)
|
|---|
| 93 | # endif
|
|---|
| 94 | # else
|
|---|
| 95 | # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
|
|---|
| 96 | # define SWIGEXPORT __attribute__ ((visibility("default")))
|
|---|
| 97 | # else
|
|---|
| 98 | # define SWIGEXPORT
|
|---|
| 99 | # endif
|
|---|
| 100 | # endif
|
|---|
| 101 | #endif
|
|---|
| 102 |
|
|---|
| 103 | /* calling conventions for Windows */
|
|---|
| 104 | #ifndef SWIGSTDCALL
|
|---|
| 105 | # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
|---|
| 106 | # define SWIGSTDCALL __stdcall
|
|---|
| 107 | # else
|
|---|
| 108 | # define SWIGSTDCALL
|
|---|
| 109 | # endif
|
|---|
| 110 | #endif
|
|---|
| 111 |
|
|---|
| 112 | /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
|
|---|
| 113 | #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
|
|---|
| 114 | # define _CRT_SECURE_NO_DEPRECATE
|
|---|
| 115 | #endif
|
|---|
| 116 |
|
|---|
| 117 | /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
|
|---|
| 118 | #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
|
|---|
| 119 | # define _SCL_SECURE_NO_DEPRECATE
|
|---|
| 120 | #endif
|
|---|
| 121 |
|
|---|
| 122 |
|
|---|
| 123 |
|
|---|
| 124 | #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
|
|---|
| 125 | /* Use debug wrappers with the Python release dll */
|
|---|
| 126 | # undef _DEBUG
|
|---|
| 127 | # include <Python.h>
|
|---|
| 128 | # define _DEBUG
|
|---|
| 129 | #else
|
|---|
| 130 | # include <Python.h>
|
|---|
| 131 | #endif
|
|---|
| 132 |
|
|---|
| 133 | /* -----------------------------------------------------------------------------
|
|---|
| 134 | * swigrun.swg
|
|---|
| 135 | *
|
|---|
| 136 | * This file contains generic C API SWIG runtime support for pointer
|
|---|
| 137 | * type checking.
|
|---|
| 138 | * ----------------------------------------------------------------------------- */
|
|---|
| 139 |
|
|---|
| 140 | /* This should only be incremented when either the layout of swig_type_info changes,
|
|---|
| 141 | or for whatever reason, the runtime changes incompatibly */
|
|---|
| 142 | #define SWIG_RUNTIME_VERSION "4"
|
|---|
| 143 |
|
|---|
| 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 | /*
|
|---|
| 154 | You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
|
|---|
| 155 | creating a static or dynamic library from the SWIG runtime code.
|
|---|
| 156 | In 99.9% of the cases, SWIG just needs to declare them as 'static'.
|
|---|
| 157 |
|
|---|
| 158 | But only do this if strictly necessary, ie, if you have problems
|
|---|
| 159 | with your compiler or suchlike.
|
|---|
| 160 | */
|
|---|
| 161 |
|
|---|
| 162 | #ifndef SWIGRUNTIME
|
|---|
| 163 | # define SWIGRUNTIME SWIGINTERN
|
|---|
| 164 | #endif
|
|---|
| 165 |
|
|---|
| 166 | #ifndef SWIGRUNTIMEINLINE
|
|---|
| 167 | # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
|
|---|
| 168 | #endif
|
|---|
| 169 |
|
|---|
| 170 | /* Generic buffer size */
|
|---|
| 171 | #ifndef SWIG_BUFFER_SIZE
|
|---|
| 172 | # define SWIG_BUFFER_SIZE 1024
|
|---|
| 173 | #endif
|
|---|
| 174 |
|
|---|
| 175 | /* Flags for pointer conversions */
|
|---|
| 176 | #define SWIG_POINTER_DISOWN 0x1
|
|---|
| 177 | #define SWIG_CAST_NEW_MEMORY 0x2
|
|---|
| 178 |
|
|---|
| 179 | /* Flags for new pointer objects */
|
|---|
| 180 | #define SWIG_POINTER_OWN 0x1
|
|---|
| 181 |
|
|---|
| 182 |
|
|---|
| 183 | /*
|
|---|
| 184 | Flags/methods for returning states.
|
|---|
| 185 |
|
|---|
| 186 | The SWIG conversion methods, as ConvertPtr, return an integer
|
|---|
| 187 | that tells if the conversion was successful or not. And if not,
|
|---|
| 188 | an error code can be returned (see swigerrors.swg for the codes).
|
|---|
| 189 |
|
|---|
| 190 | Use the following macros/flags to set or process the returning
|
|---|
| 191 | states.
|
|---|
| 192 |
|
|---|
| 193 | In old versions of SWIG, code such as the following was usually written:
|
|---|
| 194 |
|
|---|
| 195 | if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
|
|---|
| 196 | // success code
|
|---|
| 197 | } else {
|
|---|
| 198 | //fail code
|
|---|
| 199 | }
|
|---|
| 200 |
|
|---|
| 201 | Now you can be more explicit:
|
|---|
| 202 |
|
|---|
| 203 | int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
|
|---|
| 204 | if (SWIG_IsOK(res)) {
|
|---|
| 205 | // success code
|
|---|
| 206 | } else {
|
|---|
| 207 | // fail code
|
|---|
| 208 | }
|
|---|
| 209 |
|
|---|
| 210 | which is the same really, but now you can also do
|
|---|
| 211 |
|
|---|
| 212 | Type *ptr;
|
|---|
| 213 | int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
|
|---|
| 214 | if (SWIG_IsOK(res)) {
|
|---|
| 215 | // success code
|
|---|
| 216 | if (SWIG_IsNewObj(res) {
|
|---|
| 217 | ...
|
|---|
| 218 | delete *ptr;
|
|---|
| 219 | } else {
|
|---|
| 220 | ...
|
|---|
| 221 | }
|
|---|
| 222 | } else {
|
|---|
| 223 | // fail code
|
|---|
| 224 | }
|
|---|
| 225 |
|
|---|
| 226 | I.e., now SWIG_ConvertPtr can return new objects and you can
|
|---|
| 227 | identify the case and take care of the deallocation. Of course that
|
|---|
| 228 | also requires SWIG_ConvertPtr to return new result values, such as
|
|---|
| 229 |
|
|---|
| 230 | int SWIG_ConvertPtr(obj, ptr,...) {
|
|---|
| 231 | if (<obj is ok>) {
|
|---|
| 232 | if (<need new object>) {
|
|---|
| 233 | *ptr = <ptr to new allocated object>;
|
|---|
| 234 | return SWIG_NEWOBJ;
|
|---|
| 235 | } else {
|
|---|
| 236 | *ptr = <ptr to old object>;
|
|---|
| 237 | return SWIG_OLDOBJ;
|
|---|
| 238 | }
|
|---|
| 239 | } else {
|
|---|
| 240 | return SWIG_BADOBJ;
|
|---|
| 241 | }
|
|---|
| 242 | }
|
|---|
| 243 |
|
|---|
| 244 | Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
|
|---|
| 245 | more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
|
|---|
| 246 | SWIG errors code.
|
|---|
| 247 |
|
|---|
| 248 | Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
|
|---|
| 249 | allows to return the 'cast rank', for example, if you have this
|
|---|
| 250 |
|
|---|
| 251 | int food(double)
|
|---|
| 252 | int fooi(int);
|
|---|
| 253 |
|
|---|
| 254 | and you call
|
|---|
| 255 |
|
|---|
| 256 | food(1) // cast rank '1' (1 -> 1.0)
|
|---|
| 257 | fooi(1) // cast rank '0'
|
|---|
| 258 |
|
|---|
| 259 | just use the SWIG_AddCast()/SWIG_CheckState()
|
|---|
| 260 | */
|
|---|
| 261 |
|
|---|
| 262 | #define SWIG_OK (0)
|
|---|
| 263 | #define SWIG_ERROR (-1)
|
|---|
| 264 | #define SWIG_IsOK(r) (r >= 0)
|
|---|
| 265 | #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
|
|---|
| 266 |
|
|---|
| 267 | /* The CastRankLimit says how many bits are used for the cast rank */
|
|---|
| 268 | #define SWIG_CASTRANKLIMIT (1 << 8)
|
|---|
| 269 | /* The NewMask denotes the object was created (using new/malloc) */
|
|---|
| 270 | #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
|
|---|
| 271 | /* The TmpMask is for in/out typemaps that use temporal objects */
|
|---|
| 272 | #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
|
|---|
| 273 | /* Simple returning values */
|
|---|
| 274 | #define SWIG_BADOBJ (SWIG_ERROR)
|
|---|
| 275 | #define SWIG_OLDOBJ (SWIG_OK)
|
|---|
| 276 | #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
|
|---|
| 277 | #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
|
|---|
| 278 | /* Check, add and del mask methods */
|
|---|
| 279 | #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
|
|---|
| 280 | #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
|
|---|
| 281 | #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
|
|---|
| 282 | #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
|
|---|
| 283 | #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
|
|---|
| 284 | #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
|
|---|
| 285 |
|
|---|
| 286 | /* Cast-Rank Mode */
|
|---|
| 287 | #if defined(SWIG_CASTRANK_MODE)
|
|---|
| 288 | # ifndef SWIG_TypeRank
|
|---|
| 289 | # define SWIG_TypeRank unsigned long
|
|---|
| 290 | # endif
|
|---|
| 291 | # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
|
|---|
| 292 | # define SWIG_MAXCASTRANK (2)
|
|---|
| 293 | # endif
|
|---|
| 294 | # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
|
|---|
| 295 | # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
|
|---|
| 296 | SWIGINTERNINLINE int SWIG_AddCast(int r) {
|
|---|
| 297 | return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
|
|---|
| 298 | }
|
|---|
| 299 | SWIGINTERNINLINE int SWIG_CheckState(int r) {
|
|---|
| 300 | return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
|
|---|
| 301 | }
|
|---|
| 302 | #else /* no cast-rank mode */
|
|---|
| 303 | # define SWIG_AddCast(r) (r)
|
|---|
| 304 | # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
|
|---|
| 305 | #endif
|
|---|
| 306 |
|
|---|
| 307 |
|
|---|
| 308 | #include <string.h>
|
|---|
| 309 |
|
|---|
| 310 | #ifdef __cplusplus
|
|---|
| 311 | extern "C" {
|
|---|
| 312 | #endif
|
|---|
| 313 |
|
|---|
| 314 | typedef void *(*swig_converter_func)(void *, int *);
|
|---|
| 315 | typedef struct swig_type_info *(*swig_dycast_func)(void **);
|
|---|
| 316 |
|
|---|
| 317 | /* Structure to store information on one type */
|
|---|
| 318 | typedef struct swig_type_info {
|
|---|
| 319 | const char *name; /* mangled name of this type */
|
|---|
| 320 | const char *str; /* human readable name of this type */
|
|---|
| 321 | swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
|
|---|
| 322 | struct swig_cast_info *cast; /* linked list of types that can cast into this type */
|
|---|
| 323 | void *clientdata; /* language specific type data */
|
|---|
| 324 | int owndata; /* flag if the structure owns the clientdata */
|
|---|
| 325 | } swig_type_info;
|
|---|
| 326 |
|
|---|
| 327 | /* Structure to store a type and conversion function used for casting */
|
|---|
| 328 | typedef struct swig_cast_info {
|
|---|
| 329 | swig_type_info *type; /* pointer to type that is equivalent to this type */
|
|---|
| 330 | swig_converter_func converter; /* function to cast the void pointers */
|
|---|
| 331 | struct swig_cast_info *next; /* pointer to next cast in linked list */
|
|---|
| 332 | struct swig_cast_info *prev; /* pointer to the previous cast */
|
|---|
| 333 | } swig_cast_info;
|
|---|
| 334 |
|
|---|
| 335 | /* Structure used to store module information
|
|---|
| 336 | * Each module generates one structure like this, and the runtime collects
|
|---|
| 337 | * all of these structures and stores them in a circularly linked list.*/
|
|---|
| 338 | typedef struct swig_module_info {
|
|---|
| 339 | swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
|
|---|
| 340 | size_t size; /* Number of types in this module */
|
|---|
| 341 | struct swig_module_info *next; /* Pointer to next element in circularly linked list */
|
|---|
| 342 | swig_type_info **type_initial; /* Array of initially generated type structures */
|
|---|
| 343 | swig_cast_info **cast_initial; /* Array of initially generated casting structures */
|
|---|
| 344 | void *clientdata; /* Language specific module data */
|
|---|
| 345 | } swig_module_info;
|
|---|
| 346 |
|
|---|
| 347 | /*
|
|---|
| 348 | Compare two type names skipping the space characters, therefore
|
|---|
| 349 | "char*" == "char *" and "Class<int>" == "Class<int >", etc.
|
|---|
| 350 |
|
|---|
| 351 | Return 0 when the two name types are equivalent, as in
|
|---|
| 352 | strncmp, but skipping ' '.
|
|---|
| 353 | */
|
|---|
| 354 | SWIGRUNTIME int
|
|---|
| 355 | SWIG_TypeNameComp(const char *f1, const char *l1,
|
|---|
| 356 | const char *f2, const char *l2) {
|
|---|
| 357 | for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
|
|---|
| 358 | while ((*f1 == ' ') && (f1 != l1)) ++f1;
|
|---|
| 359 | while ((*f2 == ' ') && (f2 != l2)) ++f2;
|
|---|
| 360 | if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
|
|---|
| 361 | }
|
|---|
| 362 | return (int)((l1 - f1) - (l2 - f2));
|
|---|
| 363 | }
|
|---|
| 364 |
|
|---|
| 365 | /*
|
|---|
| 366 | Check type equivalence in a name list like <name1>|<name2>|...
|
|---|
| 367 | Return 0 if equal, -1 if nb < tb, 1 if nb > tb
|
|---|
| 368 | */
|
|---|
| 369 | SWIGRUNTIME int
|
|---|
| 370 | SWIG_TypeCmp(const char *nb, const char *tb) {
|
|---|
| 371 | int equiv = 1;
|
|---|
| 372 | const char* te = tb + strlen(tb);
|
|---|
| 373 | const char* ne = nb;
|
|---|
| 374 | while (equiv != 0 && *ne) {
|
|---|
| 375 | for (nb = ne; *ne; ++ne) {
|
|---|
| 376 | if (*ne == '|') break;
|
|---|
| 377 | }
|
|---|
| 378 | equiv = SWIG_TypeNameComp(nb, ne, tb, te);
|
|---|
| 379 | if (*ne) ++ne;
|
|---|
| 380 | }
|
|---|
| 381 | return equiv;
|
|---|
| 382 | }
|
|---|
| 383 |
|
|---|
| 384 | /*
|
|---|
| 385 | Check type equivalence in a name list like <name1>|<name2>|...
|
|---|
| 386 | Return 0 if not equal, 1 if equal
|
|---|
| 387 | */
|
|---|
| 388 | SWIGRUNTIME int
|
|---|
| 389 | SWIG_TypeEquiv(const char *nb, const char *tb) {
|
|---|
| 390 | return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
|
|---|
| 391 | }
|
|---|
| 392 |
|
|---|
| 393 | /*
|
|---|
| 394 | Check the typename
|
|---|
| 395 | */
|
|---|
| 396 | SWIGRUNTIME swig_cast_info *
|
|---|
| 397 | SWIG_TypeCheck(const char *c, swig_type_info *ty) {
|
|---|
| 398 | if (ty) {
|
|---|
| 399 | swig_cast_info *iter = ty->cast;
|
|---|
| 400 | while (iter) {
|
|---|
| 401 | if (strcmp(iter->type->name, c) == 0) {
|
|---|
| 402 | if (iter == ty->cast)
|
|---|
| 403 | return iter;
|
|---|
| 404 | /* Move iter to the top of the linked list */
|
|---|
| 405 | iter->prev->next = iter->next;
|
|---|
| 406 | if (iter->next)
|
|---|
| 407 | iter->next->prev = iter->prev;
|
|---|
| 408 | iter->next = ty->cast;
|
|---|
| 409 | iter->prev = 0;
|
|---|
| 410 | if (ty->cast) ty->cast->prev = iter;
|
|---|
| 411 | ty->cast = iter;
|
|---|
| 412 | return iter;
|
|---|
| 413 | }
|
|---|
| 414 | iter = iter->next;
|
|---|
| 415 | }
|
|---|
| 416 | }
|
|---|
| 417 | return 0;
|
|---|
| 418 | }
|
|---|
| 419 |
|
|---|
| 420 | /*
|
|---|
| 421 | Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
|
|---|
| 422 | */
|
|---|
| 423 | SWIGRUNTIME swig_cast_info *
|
|---|
| 424 | SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
|
|---|
| 425 | if (ty) {
|
|---|
| 426 | swig_cast_info *iter = ty->cast;
|
|---|
| 427 | while (iter) {
|
|---|
| 428 | if (iter->type == from) {
|
|---|
| 429 | if (iter == ty->cast)
|
|---|
| 430 | return iter;
|
|---|
| 431 | /* Move iter to the top of the linked list */
|
|---|
| 432 | iter->prev->next = iter->next;
|
|---|
| 433 | if (iter->next)
|
|---|
| 434 | iter->next->prev = iter->prev;
|
|---|
| 435 | iter->next = ty->cast;
|
|---|
| 436 | iter->prev = 0;
|
|---|
| 437 | if (ty->cast) ty->cast->prev = iter;
|
|---|
| 438 | ty->cast = iter;
|
|---|
| 439 | return iter;
|
|---|
| 440 | }
|
|---|
| 441 | iter = iter->next;
|
|---|
| 442 | }
|
|---|
| 443 | }
|
|---|
| 444 | return 0;
|
|---|
| 445 | }
|
|---|
| 446 |
|
|---|
| 447 | /*
|
|---|
| 448 | Cast a pointer up an inheritance hierarchy
|
|---|
| 449 | */
|
|---|
| 450 | SWIGRUNTIMEINLINE void *
|
|---|
| 451 | SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
|
|---|
| 452 | return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
|
|---|
| 453 | }
|
|---|
| 454 |
|
|---|
| 455 | /*
|
|---|
| 456 | Dynamic pointer casting. Down an inheritance hierarchy
|
|---|
| 457 | */
|
|---|
| 458 | SWIGRUNTIME swig_type_info *
|
|---|
| 459 | SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
|
|---|
| 460 | swig_type_info *lastty = ty;
|
|---|
| 461 | if (!ty || !ty->dcast) return ty;
|
|---|
| 462 | while (ty && (ty->dcast)) {
|
|---|
| 463 | ty = (*ty->dcast)(ptr);
|
|---|
| 464 | if (ty) lastty = ty;
|
|---|
| 465 | }
|
|---|
| 466 | return lastty;
|
|---|
| 467 | }
|
|---|
| 468 |
|
|---|
| 469 | /*
|
|---|
| 470 | Return the name associated with this type
|
|---|
| 471 | */
|
|---|
| 472 | SWIGRUNTIMEINLINE const char *
|
|---|
| 473 | SWIG_TypeName(const swig_type_info *ty) {
|
|---|
| 474 | return ty->name;
|
|---|
| 475 | }
|
|---|
| 476 |
|
|---|
| 477 | /*
|
|---|
| 478 | Return the pretty name associated with this type,
|
|---|
| 479 | that is an unmangled type name in a form presentable to the user.
|
|---|
| 480 | */
|
|---|
| 481 | SWIGRUNTIME const char *
|
|---|
| 482 | SWIG_TypePrettyName(const swig_type_info *type) {
|
|---|
| 483 | /* The "str" field contains the equivalent pretty names of the
|
|---|
| 484 | type, separated by vertical-bar characters. We choose
|
|---|
| 485 | to print the last name, as it is often (?) the most
|
|---|
| 486 | specific. */
|
|---|
| 487 | if (!type) return NULL;
|
|---|
| 488 | if (type->str != NULL) {
|
|---|
| 489 | const char *last_name = type->str;
|
|---|
| 490 | const char *s;
|
|---|
| 491 | for (s = type->str; *s; s++)
|
|---|
| 492 | if (*s == '|') last_name = s+1;
|
|---|
| 493 | return last_name;
|
|---|
| 494 | }
|
|---|
| 495 | else
|
|---|
| 496 | return type->name;
|
|---|
| 497 | }
|
|---|
| 498 |
|
|---|
| 499 | /*
|
|---|
| 500 | Set the clientdata field for a type
|
|---|
| 501 | */
|
|---|
| 502 | SWIGRUNTIME void
|
|---|
| 503 | SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
|
|---|
| 504 | swig_cast_info *cast = ti->cast;
|
|---|
| 505 | /* if (ti->clientdata == clientdata) return; */
|
|---|
| 506 | ti->clientdata = clientdata;
|
|---|
| 507 |
|
|---|
| 508 | while (cast) {
|
|---|
| 509 | if (!cast->converter) {
|
|---|
| 510 | swig_type_info *tc = cast->type;
|
|---|
| 511 | if (!tc->clientdata) {
|
|---|
| 512 | SWIG_TypeClientData(tc, clientdata);
|
|---|
| 513 | }
|
|---|
| 514 | }
|
|---|
| 515 | cast = cast->next;
|
|---|
| 516 | }
|
|---|
| 517 | }
|
|---|
| 518 | SWIGRUNTIME void
|
|---|
| 519 | SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
|
|---|
| 520 | SWIG_TypeClientData(ti, clientdata);
|
|---|
| 521 | ti->owndata = 1;
|
|---|
| 522 | }
|
|---|
| 523 |
|
|---|
| 524 | /*
|
|---|
| 525 | Search for a swig_type_info structure only by mangled name
|
|---|
| 526 | Search is a O(log #types)
|
|---|
| 527 |
|
|---|
| 528 | We start searching at module start, and finish searching when start == end.
|
|---|
| 529 | Note: if start == end at the beginning of the function, we go all the way around
|
|---|
| 530 | the circular list.
|
|---|
| 531 | */
|
|---|
| 532 | SWIGRUNTIME swig_type_info *
|
|---|
| 533 | SWIG_MangledTypeQueryModule(swig_module_info *start,
|
|---|
| 534 | swig_module_info *end,
|
|---|
| 535 | const char *name) {
|
|---|
| 536 | swig_module_info *iter = start;
|
|---|
| 537 | do {
|
|---|
| 538 | if (iter->size) {
|
|---|
| 539 | size_t l = 0;
|
|---|
| 540 | size_t r = iter->size - 1;
|
|---|
| 541 | do {
|
|---|
| 542 | /* since l+r >= 0, we can (>> 1) instead (/ 2) */
|
|---|
| 543 | size_t i = (l + r) >> 1;
|
|---|
| 544 | const char *iname = iter->types[i]->name;
|
|---|
| 545 | if (iname) {
|
|---|
| 546 | int compare = strcmp(name, iname);
|
|---|
| 547 | if (compare == 0) {
|
|---|
| 548 | return iter->types[i];
|
|---|
| 549 | } else if (compare < 0) {
|
|---|
| 550 | if (i) {
|
|---|
| 551 | r = i - 1;
|
|---|
| 552 | } else {
|
|---|
| 553 | break;
|
|---|
| 554 | }
|
|---|
| 555 | } else if (compare > 0) {
|
|---|
| 556 | l = i + 1;
|
|---|
| 557 | }
|
|---|
| 558 | } else {
|
|---|
| 559 | break; /* should never happen */
|
|---|
| 560 | }
|
|---|
| 561 | } while (l <= r);
|
|---|
| 562 | }
|
|---|
| 563 | iter = iter->next;
|
|---|
| 564 | } while (iter != end);
|
|---|
| 565 | return 0;
|
|---|
| 566 | }
|
|---|
| 567 |
|
|---|
| 568 | /*
|
|---|
| 569 | Search for a swig_type_info structure for either a mangled name or a human readable name.
|
|---|
| 570 | It first searches the mangled names of the types, which is a O(log #types)
|
|---|
| 571 | If a type is not found it then searches the human readable names, which is O(#types).
|
|---|
| 572 |
|
|---|
| 573 | We start searching at module start, and finish searching when start == end.
|
|---|
| 574 | Note: if start == end at the beginning of the function, we go all the way around
|
|---|
| 575 | the circular list.
|
|---|
| 576 | */
|
|---|
| 577 | SWIGRUNTIME swig_type_info *
|
|---|
| 578 | SWIG_TypeQueryModule(swig_module_info *start,
|
|---|
| 579 | swig_module_info *end,
|
|---|
| 580 | const char *name) {
|
|---|
| 581 | /* STEP 1: Search the name field using binary search */
|
|---|
| 582 | swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
|
|---|
| 583 | if (ret) {
|
|---|
| 584 | return ret;
|
|---|
| 585 | } else {
|
|---|
| 586 | /* STEP 2: If the type hasn't been found, do a complete search
|
|---|
| 587 | of the str field (the human readable name) */
|
|---|
| 588 | swig_module_info *iter = start;
|
|---|
| 589 | do {
|
|---|
| 590 | size_t i = 0;
|
|---|
| 591 | for (; i < iter->size; ++i) {
|
|---|
| 592 | if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
|
|---|
| 593 | return iter->types[i];
|
|---|
| 594 | }
|
|---|
| 595 | iter = iter->next;
|
|---|
| 596 | } while (iter != end);
|
|---|
| 597 | }
|
|---|
| 598 |
|
|---|
| 599 | /* neither found a match */
|
|---|
| 600 | return 0;
|
|---|
| 601 | }
|
|---|
| 602 |
|
|---|
| 603 | /*
|
|---|
| 604 | Pack binary data into a string
|
|---|
| 605 | */
|
|---|
| 606 | SWIGRUNTIME char *
|
|---|
| 607 | SWIG_PackData(char *c, void *ptr, size_t sz) {
|
|---|
| 608 | static const char hex[17] = "0123456789abcdef";
|
|---|
| 609 | const unsigned char *u = (unsigned char *) ptr;
|
|---|
| 610 | const unsigned char *eu = u + sz;
|
|---|
| 611 | for (; u != eu; ++u) {
|
|---|
| 612 | unsigned char uu = *u;
|
|---|
| 613 | *(c++) = hex[(uu & 0xf0) >> 4];
|
|---|
| 614 | *(c++) = hex[uu & 0xf];
|
|---|
| 615 | }
|
|---|
| 616 | return c;
|
|---|
| 617 | }
|
|---|
| 618 |
|
|---|
| 619 | /*
|
|---|
| 620 | Unpack binary data from a string
|
|---|
| 621 | */
|
|---|
| 622 | SWIGRUNTIME const char *
|
|---|
| 623 | SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
|
|---|
| 624 | unsigned char *u = (unsigned char *) ptr;
|
|---|
| 625 | const unsigned char *eu = u + sz;
|
|---|
| 626 | for (; u != eu; ++u) {
|
|---|
| 627 | char d = *(c++);
|
|---|
| 628 | unsigned char uu;
|
|---|
| 629 | if ((d >= '0') && (d <= '9'))
|
|---|
| 630 | uu = ((d - '0') << 4);
|
|---|
| 631 | else if ((d >= 'a') && (d <= 'f'))
|
|---|
| 632 | uu = ((d - ('a'-10)) << 4);
|
|---|
| 633 | else
|
|---|
| 634 | return (char *) 0;
|
|---|
| 635 | d = *(c++);
|
|---|
| 636 | if ((d >= '0') && (d <= '9'))
|
|---|
| 637 | uu |= (d - '0');
|
|---|
| 638 | else if ((d >= 'a') && (d <= 'f'))
|
|---|
| 639 | uu |= (d - ('a'-10));
|
|---|
| 640 | else
|
|---|
| 641 | return (char *) 0;
|
|---|
| 642 | *u = uu;
|
|---|
| 643 | }
|
|---|
| 644 | return c;
|
|---|
| 645 | }
|
|---|
| 646 |
|
|---|
| 647 | /*
|
|---|
| 648 | Pack 'void *' into a string buffer.
|
|---|
| 649 | */
|
|---|
| 650 | SWIGRUNTIME char *
|
|---|
| 651 | SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
|
|---|
| 652 | char *r = buff;
|
|---|
| 653 | if ((2*sizeof(void *) + 2) > bsz) return 0;
|
|---|
| 654 | *(r++) = '_';
|
|---|
| 655 | r = SWIG_PackData(r,&ptr,sizeof(void *));
|
|---|
| 656 | if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
|
|---|
| 657 | strcpy(r,name);
|
|---|
| 658 | return buff;
|
|---|
| 659 | }
|
|---|
| 660 |
|
|---|
| 661 | SWIGRUNTIME const char *
|
|---|
| 662 | SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
|
|---|
| 663 | if (*c != '_') {
|
|---|
| 664 | if (strcmp(c,"NULL") == 0) {
|
|---|
| 665 | *ptr = (void *) 0;
|
|---|
| 666 | return name;
|
|---|
| 667 | } else {
|
|---|
| 668 | return 0;
|
|---|
| 669 | }
|
|---|
| 670 | }
|
|---|
| 671 | return SWIG_UnpackData(++c,ptr,sizeof(void *));
|
|---|
| 672 | }
|
|---|
| 673 |
|
|---|
| 674 | SWIGRUNTIME char *
|
|---|
| 675 | SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
|
|---|
| 676 | char *r = buff;
|
|---|
| 677 | size_t lname = (name ? strlen(name) : 0);
|
|---|
| 678 | if ((2*sz + 2 + lname) > bsz) return 0;
|
|---|
| 679 | *(r++) = '_';
|
|---|
| 680 | r = SWIG_PackData(r,ptr,sz);
|
|---|
| 681 | if (lname) {
|
|---|
| 682 | strncpy(r,name,lname+1);
|
|---|
| 683 | } else {
|
|---|
| 684 | *r = 0;
|
|---|
| 685 | }
|
|---|
| 686 | return buff;
|
|---|
| 687 | }
|
|---|
| 688 |
|
|---|
| 689 | SWIGRUNTIME const char *
|
|---|
| 690 | SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
|
|---|
| 691 | if (*c != '_') {
|
|---|
| 692 | if (strcmp(c,"NULL") == 0) {
|
|---|
| 693 | memset(ptr,0,sz);
|
|---|
| 694 | return name;
|
|---|
| 695 | } else {
|
|---|
| 696 | return 0;
|
|---|
| 697 | }
|
|---|
| 698 | }
|
|---|
| 699 | return SWIG_UnpackData(++c,ptr,sz);
|
|---|
| 700 | }
|
|---|
| 701 |
|
|---|
| 702 | #ifdef __cplusplus
|
|---|
| 703 | }
|
|---|
| 704 | #endif
|
|---|
| 705 |
|
|---|
| 706 | /* Errors in SWIG */
|
|---|
| 707 | #define SWIG_UnknownError -1
|
|---|
| 708 | #define SWIG_IOError -2
|
|---|
| 709 | #define SWIG_RuntimeError -3
|
|---|
| 710 | #define SWIG_IndexError -4
|
|---|
| 711 | #define SWIG_TypeError -5
|
|---|
| 712 | #define SWIG_DivisionByZero -6
|
|---|
| 713 | #define SWIG_OverflowError -7
|
|---|
| 714 | #define SWIG_SyntaxError -8
|
|---|
| 715 | #define SWIG_ValueError -9
|
|---|
| 716 | #define SWIG_SystemError -10
|
|---|
| 717 | #define SWIG_AttributeError -11
|
|---|
| 718 | #define SWIG_MemoryError -12
|
|---|
| 719 | #define SWIG_NullReferenceError -13
|
|---|
| 720 |
|
|---|
| 721 |
|
|---|
| 722 |
|
|---|
| 723 | /* Compatibility macros for Python 3 */
|
|---|
| 724 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 725 |
|
|---|
| 726 | #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
|
|---|
| 727 | #define PyInt_Check(x) PyLong_Check(x)
|
|---|
| 728 | #define PyInt_AsLong(x) PyLong_AsLong(x)
|
|---|
| 729 | #define PyInt_FromLong(x) PyLong_FromLong(x)
|
|---|
| 730 | #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
|
|---|
| 731 | #define PyString_Check(name) PyBytes_Check(name)
|
|---|
| 732 | #define PyString_FromString(x) PyUnicode_FromString(x)
|
|---|
| 733 | #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
|
|---|
| 734 | #define PyString_AsString(str) PyBytes_AsString(str)
|
|---|
| 735 | #define PyString_Size(str) PyBytes_Size(str)
|
|---|
| 736 | #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
|
|---|
| 737 | #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
|
|---|
| 738 | #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
|
|---|
| 739 | #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
|
|---|
| 740 |
|
|---|
| 741 | #endif
|
|---|
| 742 |
|
|---|
| 743 | #ifndef Py_TYPE
|
|---|
| 744 | # define Py_TYPE(op) ((op)->ob_type)
|
|---|
| 745 | #endif
|
|---|
| 746 |
|
|---|
| 747 | /* SWIG APIs for compatibility of both Python 2 & 3 */
|
|---|
| 748 |
|
|---|
| 749 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 750 | # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
|
|---|
| 751 | #else
|
|---|
| 752 | # define SWIG_Python_str_FromFormat PyString_FromFormat
|
|---|
| 753 | #endif
|
|---|
| 754 |
|
|---|
| 755 |
|
|---|
| 756 | /* Warning: This function will allocate a new string in Python 3,
|
|---|
| 757 | * so please call SWIG_Python_str_DelForPy3(x) to free the space.
|
|---|
| 758 | */
|
|---|
| 759 | SWIGINTERN char*
|
|---|
| 760 | SWIG_Python_str_AsChar(PyObject *str)
|
|---|
| 761 | {
|
|---|
| 762 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 763 | char *cstr;
|
|---|
| 764 | char *newstr;
|
|---|
| 765 | Py_ssize_t len;
|
|---|
| 766 | str = PyUnicode_AsUTF8String(str);
|
|---|
| 767 | PyBytes_AsStringAndSize(str, &cstr, &len);
|
|---|
| 768 | newstr = (char *) malloc(len+1);
|
|---|
| 769 | memcpy(newstr, cstr, len+1);
|
|---|
| 770 | Py_XDECREF(str);
|
|---|
| 771 | return newstr;
|
|---|
| 772 | #else
|
|---|
| 773 | return PyString_AsString(str);
|
|---|
| 774 | #endif
|
|---|
| 775 | }
|
|---|
| 776 |
|
|---|
| 777 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 778 | # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
|
|---|
| 779 | #else
|
|---|
| 780 | # define SWIG_Python_str_DelForPy3(x)
|
|---|
| 781 | #endif
|
|---|
| 782 |
|
|---|
| 783 |
|
|---|
| 784 | SWIGINTERN PyObject*
|
|---|
| 785 | SWIG_Python_str_FromChar(const char *c)
|
|---|
| 786 | {
|
|---|
| 787 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 788 | return PyUnicode_FromString(c);
|
|---|
| 789 | #else
|
|---|
| 790 | return PyString_FromString(c);
|
|---|
| 791 | #endif
|
|---|
| 792 | }
|
|---|
| 793 |
|
|---|
| 794 | /* Add PyOS_snprintf for old Pythons */
|
|---|
| 795 | #if PY_VERSION_HEX < 0x02020000
|
|---|
| 796 | # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
|
|---|
| 797 | # define PyOS_snprintf _snprintf
|
|---|
| 798 | # else
|
|---|
| 799 | # define PyOS_snprintf snprintf
|
|---|
| 800 | # endif
|
|---|
| 801 | #endif
|
|---|
| 802 |
|
|---|
| 803 | /* A crude PyString_FromFormat implementation for old Pythons */
|
|---|
| 804 | #if PY_VERSION_HEX < 0x02020000
|
|---|
| 805 |
|
|---|
| 806 | #ifndef SWIG_PYBUFFER_SIZE
|
|---|
| 807 | # define SWIG_PYBUFFER_SIZE 1024
|
|---|
| 808 | #endif
|
|---|
| 809 |
|
|---|
| 810 | static PyObject *
|
|---|
| 811 | PyString_FromFormat(const char *fmt, ...) {
|
|---|
| 812 | va_list ap;
|
|---|
| 813 | char buf[SWIG_PYBUFFER_SIZE * 2];
|
|---|
| 814 | int res;
|
|---|
| 815 | va_start(ap, fmt);
|
|---|
| 816 | res = vsnprintf(buf, sizeof(buf), fmt, ap);
|
|---|
| 817 | va_end(ap);
|
|---|
| 818 | return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
|
|---|
| 819 | }
|
|---|
| 820 | #endif
|
|---|
| 821 |
|
|---|
| 822 | /* Add PyObject_Del for old Pythons */
|
|---|
| 823 | #if PY_VERSION_HEX < 0x01060000
|
|---|
| 824 | # define PyObject_Del(op) PyMem_DEL((op))
|
|---|
| 825 | #endif
|
|---|
| 826 | #ifndef PyObject_DEL
|
|---|
| 827 | # define PyObject_DEL PyObject_Del
|
|---|
| 828 | #endif
|
|---|
| 829 |
|
|---|
| 830 | /* A crude PyExc_StopIteration exception for old Pythons */
|
|---|
| 831 | #if PY_VERSION_HEX < 0x02020000
|
|---|
| 832 | # ifndef PyExc_StopIteration
|
|---|
| 833 | # define PyExc_StopIteration PyExc_RuntimeError
|
|---|
| 834 | # endif
|
|---|
| 835 | # ifndef PyObject_GenericGetAttr
|
|---|
| 836 | # define PyObject_GenericGetAttr 0
|
|---|
| 837 | # endif
|
|---|
| 838 | #endif
|
|---|
| 839 |
|
|---|
| 840 | /* Py_NotImplemented is defined in 2.1 and up. */
|
|---|
| 841 | #if PY_VERSION_HEX < 0x02010000
|
|---|
| 842 | # ifndef Py_NotImplemented
|
|---|
| 843 | # define Py_NotImplemented PyExc_RuntimeError
|
|---|
| 844 | # endif
|
|---|
| 845 | #endif
|
|---|
| 846 |
|
|---|
| 847 | /* A crude PyString_AsStringAndSize implementation for old Pythons */
|
|---|
| 848 | #if PY_VERSION_HEX < 0x02010000
|
|---|
| 849 | # ifndef PyString_AsStringAndSize
|
|---|
| 850 | # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
|
|---|
| 851 | # endif
|
|---|
| 852 | #endif
|
|---|
| 853 |
|
|---|
| 854 | /* PySequence_Size for old Pythons */
|
|---|
| 855 | #if PY_VERSION_HEX < 0x02000000
|
|---|
| 856 | # ifndef PySequence_Size
|
|---|
| 857 | # define PySequence_Size PySequence_Length
|
|---|
| 858 | # endif
|
|---|
| 859 | #endif
|
|---|
| 860 |
|
|---|
| 861 | /* PyBool_FromLong for old Pythons */
|
|---|
| 862 | #if PY_VERSION_HEX < 0x02030000
|
|---|
| 863 | static
|
|---|
| 864 | PyObject *PyBool_FromLong(long ok)
|
|---|
| 865 | {
|
|---|
| 866 | PyObject *result = ok ? Py_True : Py_False;
|
|---|
| 867 | Py_INCREF(result);
|
|---|
| 868 | return result;
|
|---|
| 869 | }
|
|---|
| 870 | #endif
|
|---|
| 871 |
|
|---|
| 872 | /* Py_ssize_t for old Pythons */
|
|---|
| 873 | /* This code is as recommended by: */
|
|---|
| 874 | /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
|
|---|
| 875 | #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
|
|---|
| 876 | typedef int Py_ssize_t;
|
|---|
| 877 | # define PY_SSIZE_T_MAX INT_MAX
|
|---|
| 878 | # define PY_SSIZE_T_MIN INT_MIN
|
|---|
| 879 | typedef inquiry lenfunc;
|
|---|
| 880 | typedef intargfunc ssizeargfunc;
|
|---|
| 881 | typedef intintargfunc ssizessizeargfunc;
|
|---|
| 882 | typedef intobjargproc ssizeobjargproc;
|
|---|
| 883 | typedef intintobjargproc ssizessizeobjargproc;
|
|---|
| 884 | typedef getreadbufferproc readbufferproc;
|
|---|
| 885 | typedef getwritebufferproc writebufferproc;
|
|---|
| 886 | typedef getsegcountproc segcountproc;
|
|---|
| 887 | typedef getcharbufferproc charbufferproc;
|
|---|
| 888 | static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
|
|---|
| 889 | {
|
|---|
| 890 | long result = 0;
|
|---|
| 891 | PyObject *i = PyNumber_Int(x);
|
|---|
| 892 | if (i) {
|
|---|
| 893 | result = PyInt_AsLong(i);
|
|---|
| 894 | Py_DECREF(i);
|
|---|
| 895 | }
|
|---|
| 896 | return result;
|
|---|
| 897 | }
|
|---|
| 898 | #endif
|
|---|
| 899 |
|
|---|
| 900 | #if PY_VERSION_HEX < 0x02050000
|
|---|
| 901 | #define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
|
|---|
| 902 | #endif
|
|---|
| 903 |
|
|---|
| 904 | #if PY_VERSION_HEX < 0x02040000
|
|---|
| 905 | #define Py_VISIT(op) \
|
|---|
| 906 | do { \
|
|---|
| 907 | if (op) { \
|
|---|
| 908 | int vret = visit((op), arg); \
|
|---|
| 909 | if (vret) \
|
|---|
| 910 | return vret; \
|
|---|
| 911 | } \
|
|---|
| 912 | } while (0)
|
|---|
| 913 | #endif
|
|---|
| 914 |
|
|---|
| 915 | #if PY_VERSION_HEX < 0x02030000
|
|---|
| 916 | typedef struct {
|
|---|
| 917 | PyTypeObject type;
|
|---|
| 918 | PyNumberMethods as_number;
|
|---|
| 919 | PyMappingMethods as_mapping;
|
|---|
| 920 | PySequenceMethods as_sequence;
|
|---|
| 921 | PyBufferProcs as_buffer;
|
|---|
| 922 | PyObject *name, *slots;
|
|---|
| 923 | } PyHeapTypeObject;
|
|---|
| 924 | #endif
|
|---|
| 925 |
|
|---|
| 926 | #if PY_VERSION_HEX < 0x02030000
|
|---|
| 927 | typedef destructor freefunc;
|
|---|
| 928 | #endif
|
|---|
| 929 |
|
|---|
| 930 | #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
|
|---|
| 931 | (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
|
|---|
| 932 | (PY_MAJOR_VERSION > 3))
|
|---|
| 933 | # define SWIGPY_USE_CAPSULE
|
|---|
| 934 | # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
|
|---|
| 935 | #endif
|
|---|
| 936 |
|
|---|
| 937 | #if PY_VERSION_HEX < 0x03020000
|
|---|
| 938 | #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
|
|---|
| 939 | #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
|
|---|
| 940 | #endif
|
|---|
| 941 |
|
|---|
| 942 | /* -----------------------------------------------------------------------------
|
|---|
| 943 | * error manipulation
|
|---|
| 944 | * ----------------------------------------------------------------------------- */
|
|---|
| 945 |
|
|---|
| 946 | SWIGRUNTIME PyObject*
|
|---|
| 947 | SWIG_Python_ErrorType(int code) {
|
|---|
| 948 | PyObject* type = 0;
|
|---|
| 949 | switch(code) {
|
|---|
| 950 | case SWIG_MemoryError:
|
|---|
| 951 | type = PyExc_MemoryError;
|
|---|
| 952 | break;
|
|---|
| 953 | case SWIG_IOError:
|
|---|
| 954 | type = PyExc_IOError;
|
|---|
| 955 | break;
|
|---|
| 956 | case SWIG_RuntimeError:
|
|---|
| 957 | type = PyExc_RuntimeError;
|
|---|
| 958 | break;
|
|---|
| 959 | case SWIG_IndexError:
|
|---|
| 960 | type = PyExc_IndexError;
|
|---|
| 961 | break;
|
|---|
| 962 | case SWIG_TypeError:
|
|---|
| 963 | type = PyExc_TypeError;
|
|---|
| 964 | break;
|
|---|
| 965 | case SWIG_DivisionByZero:
|
|---|
| 966 | type = PyExc_ZeroDivisionError;
|
|---|
| 967 | break;
|
|---|
| 968 | case SWIG_OverflowError:
|
|---|
| 969 | type = PyExc_OverflowError;
|
|---|
| 970 | break;
|
|---|
| 971 | case SWIG_SyntaxError:
|
|---|
| 972 | type = PyExc_SyntaxError;
|
|---|
| 973 | break;
|
|---|
| 974 | case SWIG_ValueError:
|
|---|
| 975 | type = PyExc_ValueError;
|
|---|
| 976 | break;
|
|---|
| 977 | case SWIG_SystemError:
|
|---|
| 978 | type = PyExc_SystemError;
|
|---|
| 979 | break;
|
|---|
| 980 | case SWIG_AttributeError:
|
|---|
| 981 | type = PyExc_AttributeError;
|
|---|
| 982 | break;
|
|---|
| 983 | default:
|
|---|
| 984 | type = PyExc_RuntimeError;
|
|---|
| 985 | }
|
|---|
| 986 | return type;
|
|---|
| 987 | }
|
|---|
| 988 |
|
|---|
| 989 |
|
|---|
| 990 | SWIGRUNTIME void
|
|---|
| 991 | SWIG_Python_AddErrorMsg(const char* mesg)
|
|---|
| 992 | {
|
|---|
| 993 | PyObject *type = 0;
|
|---|
| 994 | PyObject *value = 0;
|
|---|
| 995 | PyObject *traceback = 0;
|
|---|
| 996 |
|
|---|
| 997 | if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
|
|---|
| 998 | if (value) {
|
|---|
| 999 | char *tmp;
|
|---|
| 1000 | PyObject *old_str = PyObject_Str(value);
|
|---|
| 1001 | PyErr_Clear();
|
|---|
| 1002 | Py_XINCREF(type);
|
|---|
| 1003 |
|
|---|
| 1004 | PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
|
|---|
| 1005 | SWIG_Python_str_DelForPy3(tmp);
|
|---|
| 1006 | Py_DECREF(old_str);
|
|---|
| 1007 | Py_DECREF(value);
|
|---|
| 1008 | } else {
|
|---|
| 1009 | PyErr_SetString(PyExc_RuntimeError, mesg);
|
|---|
| 1010 | }
|
|---|
| 1011 | }
|
|---|
| 1012 |
|
|---|
| 1013 | #if defined(SWIG_PYTHON_NO_THREADS)
|
|---|
| 1014 | # if defined(SWIG_PYTHON_THREADS)
|
|---|
| 1015 | # undef SWIG_PYTHON_THREADS
|
|---|
| 1016 | # endif
|
|---|
| 1017 | #endif
|
|---|
| 1018 | #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
|
|---|
| 1019 | # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
|
|---|
| 1020 | # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
|
|---|
| 1021 | # define SWIG_PYTHON_USE_GIL
|
|---|
| 1022 | # endif
|
|---|
| 1023 | # endif
|
|---|
| 1024 | # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
|
|---|
| 1025 | # ifndef SWIG_PYTHON_INITIALIZE_THREADS
|
|---|
| 1026 | # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
|
|---|
| 1027 | # endif
|
|---|
| 1028 | # ifdef __cplusplus /* C++ code */
|
|---|
| 1029 | class SWIG_Python_Thread_Block {
|
|---|
| 1030 | bool status;
|
|---|
| 1031 | PyGILState_STATE state;
|
|---|
| 1032 | public:
|
|---|
| 1033 | void end() { if (status) { PyGILState_Release(state); status = false;} }
|
|---|
| 1034 | SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
|
|---|
| 1035 | ~SWIG_Python_Thread_Block() { end(); }
|
|---|
| 1036 | };
|
|---|
| 1037 | class SWIG_Python_Thread_Allow {
|
|---|
| 1038 | bool status;
|
|---|
| 1039 | PyThreadState *save;
|
|---|
| 1040 | public:
|
|---|
| 1041 | void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
|
|---|
| 1042 | SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
|
|---|
| 1043 | ~SWIG_Python_Thread_Allow() { end(); }
|
|---|
| 1044 | };
|
|---|
| 1045 | # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
|
|---|
| 1046 | # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
|
|---|
| 1047 | # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
|
|---|
| 1048 | # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
|
|---|
| 1049 | # else /* C code */
|
|---|
| 1050 | # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
|
|---|
| 1051 | # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
|
|---|
| 1052 | # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
|
|---|
| 1053 | # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
|
|---|
| 1054 | # endif
|
|---|
| 1055 | # else /* Old thread way, not implemented, user must provide it */
|
|---|
| 1056 | # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
|
|---|
| 1057 | # define SWIG_PYTHON_INITIALIZE_THREADS
|
|---|
| 1058 | # endif
|
|---|
| 1059 | # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
|
|---|
| 1060 | # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
|
|---|
| 1061 | # endif
|
|---|
| 1062 | # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
|
|---|
| 1063 | # define SWIG_PYTHON_THREAD_END_BLOCK
|
|---|
| 1064 | # endif
|
|---|
| 1065 | # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
|
|---|
| 1066 | # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
|
|---|
| 1067 | # endif
|
|---|
| 1068 | # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
|
|---|
| 1069 | # define SWIG_PYTHON_THREAD_END_ALLOW
|
|---|
| 1070 | # endif
|
|---|
| 1071 | # endif
|
|---|
| 1072 | #else /* No thread support */
|
|---|
| 1073 | # define SWIG_PYTHON_INITIALIZE_THREADS
|
|---|
| 1074 | # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
|
|---|
| 1075 | # define SWIG_PYTHON_THREAD_END_BLOCK
|
|---|
| 1076 | # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
|
|---|
| 1077 | # define SWIG_PYTHON_THREAD_END_ALLOW
|
|---|
| 1078 | #endif
|
|---|
| 1079 |
|
|---|
| 1080 | /* -----------------------------------------------------------------------------
|
|---|
| 1081 | * Python API portion that goes into the runtime
|
|---|
| 1082 | * ----------------------------------------------------------------------------- */
|
|---|
| 1083 |
|
|---|
| 1084 | #ifdef __cplusplus
|
|---|
| 1085 | extern "C" {
|
|---|
| 1086 | #endif
|
|---|
| 1087 |
|
|---|
| 1088 | /* -----------------------------------------------------------------------------
|
|---|
| 1089 | * Constant declarations
|
|---|
| 1090 | * ----------------------------------------------------------------------------- */
|
|---|
| 1091 |
|
|---|
| 1092 | /* Constant Types */
|
|---|
| 1093 | #define SWIG_PY_POINTER 4
|
|---|
| 1094 | #define SWIG_PY_BINARY 5
|
|---|
| 1095 |
|
|---|
| 1096 | /* Constant information structure */
|
|---|
| 1097 | typedef struct swig_const_info {
|
|---|
| 1098 | int type;
|
|---|
| 1099 | char *name;
|
|---|
| 1100 | long lvalue;
|
|---|
| 1101 | double dvalue;
|
|---|
| 1102 | void *pvalue;
|
|---|
| 1103 | swig_type_info **ptype;
|
|---|
| 1104 | } swig_const_info;
|
|---|
| 1105 |
|
|---|
| 1106 |
|
|---|
| 1107 | /* -----------------------------------------------------------------------------
|
|---|
| 1108 | * Wrapper of PyInstanceMethod_New() used in Python 3
|
|---|
| 1109 | * It is exported to the generated module, used for -fastproxy
|
|---|
| 1110 | * ----------------------------------------------------------------------------- */
|
|---|
| 1111 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 1112 | SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
|
|---|
| 1113 | {
|
|---|
| 1114 | return PyInstanceMethod_New(func);
|
|---|
| 1115 | }
|
|---|
| 1116 | #else
|
|---|
| 1117 | SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
|
|---|
| 1118 | {
|
|---|
| 1119 | return NULL;
|
|---|
| 1120 | }
|
|---|
| 1121 | #endif
|
|---|
| 1122 |
|
|---|
| 1123 | #ifdef __cplusplus
|
|---|
| 1124 | }
|
|---|
| 1125 | #endif
|
|---|
| 1126 |
|
|---|
| 1127 |
|
|---|
| 1128 | /* -----------------------------------------------------------------------------
|
|---|
| 1129 | * pyrun.swg
|
|---|
| 1130 | *
|
|---|
| 1131 | * This file contains the runtime support for Python modules
|
|---|
| 1132 | * and includes code for managing global variables and pointer
|
|---|
| 1133 | * type checking.
|
|---|
| 1134 | *
|
|---|
| 1135 | * ----------------------------------------------------------------------------- */
|
|---|
| 1136 |
|
|---|
| 1137 | /* Common SWIG API */
|
|---|
| 1138 |
|
|---|
| 1139 | /* for raw pointers */
|
|---|
| 1140 | #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
|
|---|
| 1141 | #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
|
|---|
| 1142 | #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
|
|---|
| 1143 |
|
|---|
| 1144 | #ifdef SWIGPYTHON_BUILTIN
|
|---|
| 1145 | #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
|
|---|
| 1146 | #else
|
|---|
| 1147 | #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
|
|---|
| 1148 | #endif
|
|---|
| 1149 |
|
|---|
| 1150 | #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
|
|---|
| 1151 |
|
|---|
| 1152 | #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
|
|---|
| 1153 | #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
|
|---|
| 1154 | #define swig_owntype int
|
|---|
| 1155 |
|
|---|
| 1156 | /* for raw packed data */
|
|---|
| 1157 | #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
|
|---|
| 1158 | #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
|
|---|
| 1159 |
|
|---|
| 1160 | /* for class or struct pointers */
|
|---|
| 1161 | #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
|
|---|
| 1162 | #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
|
|---|
| 1163 |
|
|---|
| 1164 | /* for C or C++ function pointers */
|
|---|
| 1165 | #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
|
|---|
| 1166 | #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
|
|---|
| 1167 |
|
|---|
| 1168 | /* for C++ member pointers, ie, member methods */
|
|---|
| 1169 | #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
|
|---|
| 1170 | #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
|
|---|
| 1171 |
|
|---|
| 1172 |
|
|---|
| 1173 | /* Runtime API */
|
|---|
| 1174 |
|
|---|
| 1175 | #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
|
|---|
| 1176 | #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
|
|---|
| 1177 | #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
|
|---|
| 1178 |
|
|---|
| 1179 | #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
|
|---|
| 1180 | #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
|
|---|
| 1181 | #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
|
|---|
| 1182 | #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
|
|---|
| 1183 | #define SWIG_fail goto fail
|
|---|
| 1184 |
|
|---|
| 1185 |
|
|---|
| 1186 | /* Runtime API implementation */
|
|---|
| 1187 |
|
|---|
| 1188 | /* Error manipulation */
|
|---|
| 1189 |
|
|---|
| 1190 | SWIGINTERN void
|
|---|
| 1191 | SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
|
|---|
| 1192 | SWIG_PYTHON_THREAD_BEGIN_BLOCK;
|
|---|
| 1193 | PyErr_SetObject(errtype, obj);
|
|---|
| 1194 | Py_DECREF(obj);
|
|---|
| 1195 | SWIG_PYTHON_THREAD_END_BLOCK;
|
|---|
| 1196 | }
|
|---|
| 1197 |
|
|---|
| 1198 | SWIGINTERN void
|
|---|
| 1199 | SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
|
|---|
| 1200 | SWIG_PYTHON_THREAD_BEGIN_BLOCK;
|
|---|
| 1201 | PyErr_SetString(errtype, msg);
|
|---|
| 1202 | SWIG_PYTHON_THREAD_END_BLOCK;
|
|---|
| 1203 | }
|
|---|
| 1204 |
|
|---|
| 1205 | #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
|
|---|
| 1206 |
|
|---|
| 1207 | /* Set a constant value */
|
|---|
| 1208 |
|
|---|
| 1209 | #if defined(SWIGPYTHON_BUILTIN)
|
|---|
| 1210 |
|
|---|
| 1211 | SWIGINTERN void
|
|---|
| 1212 | SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
|
|---|
| 1213 | PyObject *s = PyString_InternFromString(key);
|
|---|
| 1214 | PyList_Append(seq, s);
|
|---|
| 1215 | Py_DECREF(s);
|
|---|
| 1216 | }
|
|---|
| 1217 |
|
|---|
| 1218 | SWIGINTERN void
|
|---|
| 1219 | SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
|
|---|
| 1220 | #if PY_VERSION_HEX < 0x02030000
|
|---|
| 1221 | PyDict_SetItemString(d, (char *)name, obj);
|
|---|
| 1222 | #else
|
|---|
| 1223 | PyDict_SetItemString(d, name, obj);
|
|---|
| 1224 | #endif
|
|---|
| 1225 | Py_DECREF(obj);
|
|---|
| 1226 | if (public_interface)
|
|---|
| 1227 | SwigPyBuiltin_AddPublicSymbol(public_interface, name);
|
|---|
| 1228 | }
|
|---|
| 1229 |
|
|---|
| 1230 | #else
|
|---|
| 1231 |
|
|---|
| 1232 | SWIGINTERN void
|
|---|
| 1233 | SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
|
|---|
| 1234 | #if PY_VERSION_HEX < 0x02030000
|
|---|
| 1235 | PyDict_SetItemString(d, (char *)name, obj);
|
|---|
| 1236 | #else
|
|---|
| 1237 | PyDict_SetItemString(d, name, obj);
|
|---|
| 1238 | #endif
|
|---|
| 1239 | Py_DECREF(obj);
|
|---|
| 1240 | }
|
|---|
| 1241 |
|
|---|
| 1242 | #endif
|
|---|
| 1243 |
|
|---|
| 1244 | /* Append a value to the result obj */
|
|---|
| 1245 |
|
|---|
| 1246 | SWIGINTERN PyObject*
|
|---|
| 1247 | SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
|
|---|
| 1248 | #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
|
|---|
| 1249 | if (!result) {
|
|---|
| 1250 | result = obj;
|
|---|
| 1251 | } else if (result == Py_None) {
|
|---|
| 1252 | Py_DECREF(result);
|
|---|
| 1253 | result = obj;
|
|---|
| 1254 | } else {
|
|---|
| 1255 | if (!PyList_Check(result)) {
|
|---|
| 1256 | PyObject *o2 = result;
|
|---|
| 1257 | result = PyList_New(1);
|
|---|
| 1258 | PyList_SetItem(result, 0, o2);
|
|---|
| 1259 | }
|
|---|
| 1260 | PyList_Append(result,obj);
|
|---|
| 1261 | Py_DECREF(obj);
|
|---|
| 1262 | }
|
|---|
| 1263 | return result;
|
|---|
| 1264 | #else
|
|---|
| 1265 | PyObject* o2;
|
|---|
| 1266 | PyObject* o3;
|
|---|
| 1267 | if (!result) {
|
|---|
| 1268 | result = obj;
|
|---|
| 1269 | } else if (result == Py_None) {
|
|---|
| 1270 | Py_DECREF(result);
|
|---|
| 1271 | result = obj;
|
|---|
| 1272 | } else {
|
|---|
| 1273 | if (!PyTuple_Check(result)) {
|
|---|
| 1274 | o2 = result;
|
|---|
| 1275 | result = PyTuple_New(1);
|
|---|
| 1276 | PyTuple_SET_ITEM(result, 0, o2);
|
|---|
| 1277 | }
|
|---|
| 1278 | o3 = PyTuple_New(1);
|
|---|
| 1279 | PyTuple_SET_ITEM(o3, 0, obj);
|
|---|
| 1280 | o2 = result;
|
|---|
| 1281 | result = PySequence_Concat(o2, o3);
|
|---|
| 1282 | Py_DECREF(o2);
|
|---|
| 1283 | Py_DECREF(o3);
|
|---|
| 1284 | }
|
|---|
| 1285 | return result;
|
|---|
| 1286 | #endif
|
|---|
| 1287 | }
|
|---|
| 1288 |
|
|---|
| 1289 | /* Unpack the argument tuple */
|
|---|
| 1290 |
|
|---|
| 1291 | SWIGINTERN int
|
|---|
| 1292 | SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
|
|---|
| 1293 | {
|
|---|
| 1294 | if (!args) {
|
|---|
| 1295 | if (!min && !max) {
|
|---|
| 1296 | return 1;
|
|---|
| 1297 | } else {
|
|---|
| 1298 | PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
|
|---|
| 1299 | name, (min == max ? "" : "at least "), (int)min);
|
|---|
| 1300 | return 0;
|
|---|
| 1301 | }
|
|---|
| 1302 | }
|
|---|
| 1303 | if (!PyTuple_Check(args)) {
|
|---|
| 1304 | if (min <= 1 && max >= 1) {
|
|---|
| 1305 | int i;
|
|---|
| 1306 | objs[0] = args;
|
|---|
| 1307 | for (i = 1; i < max; ++i) {
|
|---|
| 1308 | objs[i] = 0;
|
|---|
| 1309 | }
|
|---|
| 1310 | return 2;
|
|---|
| 1311 | }
|
|---|
| 1312 | PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
|
|---|
| 1313 | return 0;
|
|---|
| 1314 | } else {
|
|---|
| 1315 | Py_ssize_t l = PyTuple_GET_SIZE(args);
|
|---|
| 1316 | if (l < min) {
|
|---|
| 1317 | PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
|
|---|
| 1318 | name, (min == max ? "" : "at least "), (int)min, (int)l);
|
|---|
| 1319 | return 0;
|
|---|
| 1320 | } else if (l > max) {
|
|---|
| 1321 | PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
|
|---|
| 1322 | name, (min == max ? "" : "at most "), (int)max, (int)l);
|
|---|
| 1323 | return 0;
|
|---|
| 1324 | } else {
|
|---|
| 1325 | int i;
|
|---|
| 1326 | for (i = 0; i < l; ++i) {
|
|---|
| 1327 | objs[i] = PyTuple_GET_ITEM(args, i);
|
|---|
| 1328 | }
|
|---|
| 1329 | for (; l < max; ++l) {
|
|---|
| 1330 | objs[l] = 0;
|
|---|
| 1331 | }
|
|---|
| 1332 | return i + 1;
|
|---|
| 1333 | }
|
|---|
| 1334 | }
|
|---|
| 1335 | }
|
|---|
| 1336 |
|
|---|
| 1337 | /* A functor is a function object with one single object argument */
|
|---|
| 1338 | #if PY_VERSION_HEX >= 0x02020000
|
|---|
| 1339 | #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
|
|---|
| 1340 | #else
|
|---|
| 1341 | #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
|
|---|
| 1342 | #endif
|
|---|
| 1343 |
|
|---|
| 1344 | /*
|
|---|
| 1345 | Helper for static pointer initialization for both C and C++ code, for example
|
|---|
| 1346 | static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
|
|---|
| 1347 | */
|
|---|
| 1348 | #ifdef __cplusplus
|
|---|
| 1349 | #define SWIG_STATIC_POINTER(var) var
|
|---|
| 1350 | #else
|
|---|
| 1351 | #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
|
|---|
| 1352 | #endif
|
|---|
| 1353 |
|
|---|
| 1354 | /* -----------------------------------------------------------------------------
|
|---|
| 1355 | * Pointer declarations
|
|---|
| 1356 | * ----------------------------------------------------------------------------- */
|
|---|
| 1357 |
|
|---|
| 1358 | /* Flags for new pointer objects */
|
|---|
| 1359 | #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
|
|---|
| 1360 | #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
|
|---|
| 1361 |
|
|---|
| 1362 | #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
|
|---|
| 1363 |
|
|---|
| 1364 | #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
|
|---|
| 1365 | #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
|
|---|
| 1366 |
|
|---|
| 1367 | #ifdef __cplusplus
|
|---|
| 1368 | extern "C" {
|
|---|
| 1369 | #endif
|
|---|
| 1370 |
|
|---|
| 1371 | /* How to access Py_None */
|
|---|
| 1372 | #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
|
|---|
| 1373 | # ifndef SWIG_PYTHON_NO_BUILD_NONE
|
|---|
| 1374 | # ifndef SWIG_PYTHON_BUILD_NONE
|
|---|
| 1375 | # define SWIG_PYTHON_BUILD_NONE
|
|---|
| 1376 | # endif
|
|---|
| 1377 | # endif
|
|---|
| 1378 | #endif
|
|---|
| 1379 |
|
|---|
| 1380 | #ifdef SWIG_PYTHON_BUILD_NONE
|
|---|
| 1381 | # ifdef Py_None
|
|---|
| 1382 | # undef Py_None
|
|---|
| 1383 | # define Py_None SWIG_Py_None()
|
|---|
| 1384 | # endif
|
|---|
| 1385 | SWIGRUNTIMEINLINE PyObject *
|
|---|
| 1386 | _SWIG_Py_None(void)
|
|---|
| 1387 | {
|
|---|
| 1388 | PyObject *none = Py_BuildValue((char*)"");
|
|---|
| 1389 | Py_DECREF(none);
|
|---|
| 1390 | return none;
|
|---|
| 1391 | }
|
|---|
| 1392 | SWIGRUNTIME PyObject *
|
|---|
| 1393 | SWIG_Py_None(void)
|
|---|
| 1394 | {
|
|---|
| 1395 | static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
|
|---|
| 1396 | return none;
|
|---|
| 1397 | }
|
|---|
| 1398 | #endif
|
|---|
| 1399 |
|
|---|
| 1400 | /* The python void return value */
|
|---|
| 1401 |
|
|---|
| 1402 | SWIGRUNTIMEINLINE PyObject *
|
|---|
| 1403 | SWIG_Py_Void(void)
|
|---|
| 1404 | {
|
|---|
| 1405 | PyObject *none = Py_None;
|
|---|
| 1406 | Py_INCREF(none);
|
|---|
| 1407 | return none;
|
|---|
| 1408 | }
|
|---|
| 1409 |
|
|---|
| 1410 | /* SwigPyClientData */
|
|---|
| 1411 |
|
|---|
| 1412 | typedef struct {
|
|---|
| 1413 | PyObject *klass;
|
|---|
| 1414 | PyObject *newraw;
|
|---|
| 1415 | PyObject *newargs;
|
|---|
| 1416 | PyObject *destroy;
|
|---|
| 1417 | int delargs;
|
|---|
| 1418 | int implicitconv;
|
|---|
| 1419 | PyTypeObject *pytype;
|
|---|
| 1420 | } SwigPyClientData;
|
|---|
| 1421 |
|
|---|
| 1422 | SWIGRUNTIMEINLINE int
|
|---|
| 1423 | SWIG_Python_CheckImplicit(swig_type_info *ty)
|
|---|
| 1424 | {
|
|---|
| 1425 | SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
|
|---|
| 1426 | return data ? data->implicitconv : 0;
|
|---|
| 1427 | }
|
|---|
| 1428 |
|
|---|
| 1429 | SWIGRUNTIMEINLINE PyObject *
|
|---|
| 1430 | SWIG_Python_ExceptionType(swig_type_info *desc) {
|
|---|
| 1431 | SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
|
|---|
| 1432 | PyObject *klass = data ? data->klass : 0;
|
|---|
| 1433 | return (klass ? klass : PyExc_RuntimeError);
|
|---|
| 1434 | }
|
|---|
| 1435 |
|
|---|
| 1436 |
|
|---|
| 1437 | SWIGRUNTIME SwigPyClientData *
|
|---|
| 1438 | SwigPyClientData_New(PyObject* obj)
|
|---|
| 1439 | {
|
|---|
| 1440 | if (!obj) {
|
|---|
| 1441 | return 0;
|
|---|
| 1442 | } else {
|
|---|
| 1443 | SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
|
|---|
| 1444 | /* the klass element */
|
|---|
| 1445 | data->klass = obj;
|
|---|
| 1446 | Py_INCREF(data->klass);
|
|---|
| 1447 | /* the newraw method and newargs arguments used to create a new raw instance */
|
|---|
| 1448 | if (PyClass_Check(obj)) {
|
|---|
| 1449 | data->newraw = 0;
|
|---|
| 1450 | data->newargs = obj;
|
|---|
| 1451 | Py_INCREF(obj);
|
|---|
| 1452 | } else {
|
|---|
| 1453 | #if (PY_VERSION_HEX < 0x02020000)
|
|---|
| 1454 | data->newraw = 0;
|
|---|
| 1455 | #else
|
|---|
| 1456 | data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
|
|---|
| 1457 | #endif
|
|---|
| 1458 | if (data->newraw) {
|
|---|
| 1459 | Py_INCREF(data->newraw);
|
|---|
| 1460 | data->newargs = PyTuple_New(1);
|
|---|
| 1461 | PyTuple_SetItem(data->newargs, 0, obj);
|
|---|
| 1462 | } else {
|
|---|
| 1463 | data->newargs = obj;
|
|---|
| 1464 | }
|
|---|
| 1465 | Py_INCREF(data->newargs);
|
|---|
| 1466 | }
|
|---|
| 1467 | /* the destroy method, aka as the C++ delete method */
|
|---|
| 1468 | data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
|
|---|
| 1469 | if (PyErr_Occurred()) {
|
|---|
| 1470 | PyErr_Clear();
|
|---|
| 1471 | data->destroy = 0;
|
|---|
| 1472 | }
|
|---|
| 1473 | if (data->destroy) {
|
|---|
| 1474 | int flags;
|
|---|
| 1475 | Py_INCREF(data->destroy);
|
|---|
| 1476 | flags = PyCFunction_GET_FLAGS(data->destroy);
|
|---|
| 1477 | #ifdef METH_O
|
|---|
| 1478 | data->delargs = !(flags & (METH_O));
|
|---|
| 1479 | #else
|
|---|
| 1480 | data->delargs = 0;
|
|---|
| 1481 | #endif
|
|---|
| 1482 | } else {
|
|---|
| 1483 | data->delargs = 0;
|
|---|
| 1484 | }
|
|---|
| 1485 | data->implicitconv = 0;
|
|---|
| 1486 | data->pytype = 0;
|
|---|
| 1487 | return data;
|
|---|
| 1488 | }
|
|---|
| 1489 | }
|
|---|
| 1490 |
|
|---|
| 1491 | SWIGRUNTIME void
|
|---|
| 1492 | SwigPyClientData_Del(SwigPyClientData *data) {
|
|---|
| 1493 | Py_XDECREF(data->newraw);
|
|---|
| 1494 | Py_XDECREF(data->newargs);
|
|---|
| 1495 | Py_XDECREF(data->destroy);
|
|---|
| 1496 | }
|
|---|
| 1497 |
|
|---|
| 1498 | /* =============== SwigPyObject =====================*/
|
|---|
| 1499 |
|
|---|
| 1500 | typedef struct {
|
|---|
| 1501 | PyObject_HEAD
|
|---|
| 1502 | void *ptr;
|
|---|
| 1503 | swig_type_info *ty;
|
|---|
| 1504 | int own;
|
|---|
| 1505 | PyObject *next;
|
|---|
| 1506 | #ifdef SWIGPYTHON_BUILTIN
|
|---|
| 1507 | PyObject *dict;
|
|---|
| 1508 | #endif
|
|---|
| 1509 | } SwigPyObject;
|
|---|
| 1510 |
|
|---|
| 1511 | SWIGRUNTIME PyObject *
|
|---|
| 1512 | SwigPyObject_long(SwigPyObject *v)
|
|---|
| 1513 | {
|
|---|
| 1514 | return PyLong_FromVoidPtr(v->ptr);
|
|---|
| 1515 | }
|
|---|
| 1516 |
|
|---|
| 1517 | SWIGRUNTIME PyObject *
|
|---|
| 1518 | SwigPyObject_format(const char* fmt, SwigPyObject *v)
|
|---|
| 1519 | {
|
|---|
| 1520 | PyObject *res = NULL;
|
|---|
| 1521 | PyObject *args = PyTuple_New(1);
|
|---|
| 1522 | if (args) {
|
|---|
| 1523 | if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
|
|---|
| 1524 | PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
|
|---|
| 1525 | if (ofmt) {
|
|---|
| 1526 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 1527 | res = PyUnicode_Format(ofmt,args);
|
|---|
| 1528 | #else
|
|---|
| 1529 | res = PyString_Format(ofmt,args);
|
|---|
| 1530 | #endif
|
|---|
| 1531 | Py_DECREF(ofmt);
|
|---|
| 1532 | }
|
|---|
| 1533 | Py_DECREF(args);
|
|---|
| 1534 | }
|
|---|
| 1535 | }
|
|---|
| 1536 | return res;
|
|---|
| 1537 | }
|
|---|
| 1538 |
|
|---|
| 1539 | SWIGRUNTIME PyObject *
|
|---|
| 1540 | SwigPyObject_oct(SwigPyObject *v)
|
|---|
| 1541 | {
|
|---|
| 1542 | return SwigPyObject_format("%o",v);
|
|---|
| 1543 | }
|
|---|
| 1544 |
|
|---|
| 1545 | SWIGRUNTIME PyObject *
|
|---|
| 1546 | SwigPyObject_hex(SwigPyObject *v)
|
|---|
| 1547 | {
|
|---|
| 1548 | return SwigPyObject_format("%x",v);
|
|---|
| 1549 | }
|
|---|
| 1550 |
|
|---|
| 1551 | SWIGRUNTIME PyObject *
|
|---|
| 1552 | #ifdef METH_NOARGS
|
|---|
| 1553 | SwigPyObject_repr(SwigPyObject *v)
|
|---|
| 1554 | #else
|
|---|
| 1555 | SwigPyObject_repr(SwigPyObject *v, PyObject *args)
|
|---|
| 1556 | #endif
|
|---|
| 1557 | {
|
|---|
| 1558 | const char *name = SWIG_TypePrettyName(v->ty);
|
|---|
| 1559 | PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
|
|---|
| 1560 | if (v->next) {
|
|---|
| 1561 | # ifdef METH_NOARGS
|
|---|
| 1562 | PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
|
|---|
| 1563 | # else
|
|---|
| 1564 | PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
|
|---|
| 1565 | # endif
|
|---|
| 1566 | # if PY_VERSION_HEX >= 0x03000000
|
|---|
| 1567 | PyObject *joined = PyUnicode_Concat(repr, nrep);
|
|---|
| 1568 | Py_DecRef(repr);
|
|---|
| 1569 | Py_DecRef(nrep);
|
|---|
| 1570 | repr = joined;
|
|---|
| 1571 | # else
|
|---|
| 1572 | PyString_ConcatAndDel(&repr,nrep);
|
|---|
| 1573 | # endif
|
|---|
| 1574 | }
|
|---|
| 1575 | return repr;
|
|---|
| 1576 | }
|
|---|
| 1577 |
|
|---|
| 1578 | SWIGRUNTIME int
|
|---|
| 1579 | SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
|
|---|
| 1580 | {
|
|---|
| 1581 | void *i = v->ptr;
|
|---|
| 1582 | void *j = w->ptr;
|
|---|
| 1583 | return (i < j) ? -1 : ((i > j) ? 1 : 0);
|
|---|
| 1584 | }
|
|---|
| 1585 |
|
|---|
| 1586 | /* Added for Python 3.x, would it also be useful for Python 2.x? */
|
|---|
| 1587 | SWIGRUNTIME PyObject*
|
|---|
| 1588 | SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
|
|---|
| 1589 | {
|
|---|
| 1590 | PyObject* res;
|
|---|
| 1591 | if( op != Py_EQ && op != Py_NE ) {
|
|---|
| 1592 | Py_INCREF(Py_NotImplemented);
|
|---|
| 1593 | return Py_NotImplemented;
|
|---|
| 1594 | }
|
|---|
| 1595 | res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
|
|---|
| 1596 | return res;
|
|---|
| 1597 | }
|
|---|
| 1598 |
|
|---|
| 1599 |
|
|---|
| 1600 | SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
|
|---|
| 1601 |
|
|---|
| 1602 | #ifdef SWIGPYTHON_BUILTIN
|
|---|
| 1603 | static swig_type_info *SwigPyObject_stype = 0;
|
|---|
| 1604 | SWIGRUNTIME PyTypeObject*
|
|---|
| 1605 | SwigPyObject_type(void) {
|
|---|
| 1606 | SwigPyClientData *cd;
|
|---|
| 1607 | assert(SwigPyObject_stype);
|
|---|
| 1608 | cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
|
|---|
| 1609 | assert(cd);
|
|---|
| 1610 | assert(cd->pytype);
|
|---|
| 1611 | return cd->pytype;
|
|---|
| 1612 | }
|
|---|
| 1613 | #else
|
|---|
| 1614 | SWIGRUNTIME PyTypeObject*
|
|---|
| 1615 | SwigPyObject_type(void) {
|
|---|
| 1616 | static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
|
|---|
| 1617 | return type;
|
|---|
| 1618 | }
|
|---|
| 1619 | #endif
|
|---|
| 1620 |
|
|---|
| 1621 | SWIGRUNTIMEINLINE int
|
|---|
| 1622 | SwigPyObject_Check(PyObject *op) {
|
|---|
| 1623 | #ifdef SWIGPYTHON_BUILTIN
|
|---|
| 1624 | PyTypeObject *target_tp = SwigPyObject_type();
|
|---|
| 1625 | if (PyType_IsSubtype(op->ob_type, target_tp))
|
|---|
| 1626 | return 1;
|
|---|
| 1627 | return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
|
|---|
| 1628 | #else
|
|---|
| 1629 | return (Py_TYPE(op) == SwigPyObject_type())
|
|---|
| 1630 | || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
|
|---|
| 1631 | #endif
|
|---|
| 1632 | }
|
|---|
| 1633 |
|
|---|
| 1634 | SWIGRUNTIME PyObject *
|
|---|
| 1635 | SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
|
|---|
| 1636 |
|
|---|
| 1637 | SWIGRUNTIME void
|
|---|
| 1638 | SwigPyObject_dealloc(PyObject *v)
|
|---|
| 1639 | {
|
|---|
| 1640 | SwigPyObject *sobj = (SwigPyObject *) v;
|
|---|
| 1641 | PyObject *next = sobj->next;
|
|---|
| 1642 | if (sobj->own == SWIG_POINTER_OWN) {
|
|---|
| 1643 | swig_type_info *ty = sobj->ty;
|
|---|
| 1644 | SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
|
|---|
| 1645 | PyObject *destroy = data ? data->destroy : 0;
|
|---|
| 1646 | if (destroy) {
|
|---|
| 1647 | /* destroy is always a VARARGS method */
|
|---|
| 1648 | PyObject *res;
|
|---|
| 1649 | if (data->delargs) {
|
|---|
| 1650 | /* we need to create a temporary object to carry the destroy operation */
|
|---|
| 1651 | PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
|
|---|
| 1652 | res = SWIG_Python_CallFunctor(destroy, tmp);
|
|---|
| 1653 | Py_DECREF(tmp);
|
|---|
| 1654 | } else {
|
|---|
| 1655 | PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
|
|---|
| 1656 | PyObject *mself = PyCFunction_GET_SELF(destroy);
|
|---|
| 1657 | res = ((*meth)(mself, v));
|
|---|
| 1658 | }
|
|---|
| 1659 | Py_XDECREF(res);
|
|---|
| 1660 | }
|
|---|
| 1661 | #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
|
|---|
| 1662 | else {
|
|---|
| 1663 | const char *name = SWIG_TypePrettyName(ty);
|
|---|
| 1664 | printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
|
|---|
| 1665 | }
|
|---|
| 1666 | #endif
|
|---|
| 1667 | }
|
|---|
| 1668 | Py_XDECREF(next);
|
|---|
| 1669 | PyObject_DEL(v);
|
|---|
| 1670 | }
|
|---|
| 1671 |
|
|---|
| 1672 | SWIGRUNTIME PyObject*
|
|---|
| 1673 | SwigPyObject_append(PyObject* v, PyObject* next)
|
|---|
| 1674 | {
|
|---|
| 1675 | SwigPyObject *sobj = (SwigPyObject *) v;
|
|---|
| 1676 | #ifndef METH_O
|
|---|
| 1677 | PyObject *tmp = 0;
|
|---|
| 1678 | if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
|
|---|
| 1679 | next = tmp;
|
|---|
| 1680 | #endif
|
|---|
| 1681 | if (!SwigPyObject_Check(next)) {
|
|---|
| 1682 | return NULL;
|
|---|
| 1683 | }
|
|---|
| 1684 | sobj->next = next;
|
|---|
| 1685 | Py_INCREF(next);
|
|---|
| 1686 | return SWIG_Py_Void();
|
|---|
| 1687 | }
|
|---|
| 1688 |
|
|---|
| 1689 | SWIGRUNTIME PyObject*
|
|---|
| 1690 | #ifdef METH_NOARGS
|
|---|
| 1691 | SwigPyObject_next(PyObject* v)
|
|---|
| 1692 | #else
|
|---|
| 1693 | SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
|
|---|
| 1694 | #endif
|
|---|
| 1695 | {
|
|---|
| 1696 | SwigPyObject *sobj = (SwigPyObject *) v;
|
|---|
| 1697 | if (sobj->next) {
|
|---|
| 1698 | Py_INCREF(sobj->next);
|
|---|
| 1699 | return sobj->next;
|
|---|
| 1700 | } else {
|
|---|
| 1701 | return SWIG_Py_Void();
|
|---|
| 1702 | }
|
|---|
| 1703 | }
|
|---|
| 1704 |
|
|---|
| 1705 | SWIGINTERN PyObject*
|
|---|
| 1706 | #ifdef METH_NOARGS
|
|---|
| 1707 | SwigPyObject_disown(PyObject *v)
|
|---|
| 1708 | #else
|
|---|
| 1709 | SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
|
|---|
| 1710 | #endif
|
|---|
| 1711 | {
|
|---|
| 1712 | SwigPyObject *sobj = (SwigPyObject *)v;
|
|---|
| 1713 | sobj->own = 0;
|
|---|
| 1714 | return SWIG_Py_Void();
|
|---|
| 1715 | }
|
|---|
| 1716 |
|
|---|
| 1717 | SWIGINTERN PyObject*
|
|---|
| 1718 | #ifdef METH_NOARGS
|
|---|
| 1719 | SwigPyObject_acquire(PyObject *v)
|
|---|
| 1720 | #else
|
|---|
| 1721 | SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
|
|---|
| 1722 | #endif
|
|---|
| 1723 | {
|
|---|
| 1724 | SwigPyObject *sobj = (SwigPyObject *)v;
|
|---|
| 1725 | sobj->own = SWIG_POINTER_OWN;
|
|---|
| 1726 | return SWIG_Py_Void();
|
|---|
| 1727 | }
|
|---|
| 1728 |
|
|---|
| 1729 | SWIGINTERN PyObject*
|
|---|
| 1730 | SwigPyObject_own(PyObject *v, PyObject *args)
|
|---|
| 1731 | {
|
|---|
| 1732 | PyObject *val = 0;
|
|---|
| 1733 | #if (PY_VERSION_HEX < 0x02020000)
|
|---|
| 1734 | if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
|
|---|
| 1735 | #elif (PY_VERSION_HEX < 0x02050000)
|
|---|
| 1736 | if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
|
|---|
| 1737 | #else
|
|---|
| 1738 | if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
|
|---|
| 1739 | #endif
|
|---|
| 1740 | {
|
|---|
| 1741 | return NULL;
|
|---|
| 1742 | }
|
|---|
| 1743 | else
|
|---|
| 1744 | {
|
|---|
| 1745 | SwigPyObject *sobj = (SwigPyObject *)v;
|
|---|
| 1746 | PyObject *obj = PyBool_FromLong(sobj->own);
|
|---|
| 1747 | if (val) {
|
|---|
| 1748 | #ifdef METH_NOARGS
|
|---|
| 1749 | if (PyObject_IsTrue(val)) {
|
|---|
| 1750 | SwigPyObject_acquire(v);
|
|---|
| 1751 | } else {
|
|---|
| 1752 | SwigPyObject_disown(v);
|
|---|
| 1753 | }
|
|---|
| 1754 | #else
|
|---|
| 1755 | if (PyObject_IsTrue(val)) {
|
|---|
| 1756 | SwigPyObject_acquire(v,args);
|
|---|
| 1757 | } else {
|
|---|
| 1758 | SwigPyObject_disown(v,args);
|
|---|
| 1759 | }
|
|---|
| 1760 | #endif
|
|---|
| 1761 | }
|
|---|
| 1762 | return obj;
|
|---|
| 1763 | }
|
|---|
| 1764 | }
|
|---|
| 1765 |
|
|---|
| 1766 | #ifdef METH_O
|
|---|
| 1767 | static PyMethodDef
|
|---|
| 1768 | swigobject_methods[] = {
|
|---|
| 1769 | {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
|
|---|
| 1770 | {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
|
|---|
| 1771 | {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
|
|---|
| 1772 | {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
|
|---|
| 1773 | {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
|
|---|
| 1774 | {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
|
|---|
| 1775 | {0, 0, 0, 0}
|
|---|
| 1776 | };
|
|---|
| 1777 | #else
|
|---|
| 1778 | static PyMethodDef
|
|---|
| 1779 | swigobject_methods[] = {
|
|---|
| 1780 | {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
|
|---|
| 1781 | {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"aquires ownership of the pointer"},
|
|---|
| 1782 | {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
|
|---|
| 1783 | {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
|
|---|
| 1784 | {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
|
|---|
| 1785 | {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
|
|---|
| 1786 | {0, 0, 0, 0}
|
|---|
| 1787 | };
|
|---|
| 1788 | #endif
|
|---|
| 1789 |
|
|---|
| 1790 | #if PY_VERSION_HEX < 0x02020000
|
|---|
| 1791 | SWIGINTERN PyObject *
|
|---|
| 1792 | SwigPyObject_getattr(SwigPyObject *sobj,char *name)
|
|---|
| 1793 | {
|
|---|
| 1794 | return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
|
|---|
| 1795 | }
|
|---|
| 1796 | #endif
|
|---|
| 1797 |
|
|---|
| 1798 | SWIGRUNTIME PyTypeObject*
|
|---|
| 1799 | SwigPyObject_TypeOnce(void) {
|
|---|
| 1800 | static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
|
|---|
| 1801 |
|
|---|
| 1802 | static PyNumberMethods SwigPyObject_as_number = {
|
|---|
| 1803 | (binaryfunc)0, /*nb_add*/
|
|---|
| 1804 | (binaryfunc)0, /*nb_subtract*/
|
|---|
| 1805 | (binaryfunc)0, /*nb_multiply*/
|
|---|
| 1806 | /* nb_divide removed in Python 3 */
|
|---|
| 1807 | #if PY_VERSION_HEX < 0x03000000
|
|---|
| 1808 | (binaryfunc)0, /*nb_divide*/
|
|---|
| 1809 | #endif
|
|---|
| 1810 | (binaryfunc)0, /*nb_remainder*/
|
|---|
| 1811 | (binaryfunc)0, /*nb_divmod*/
|
|---|
| 1812 | (ternaryfunc)0,/*nb_power*/
|
|---|
| 1813 | (unaryfunc)0, /*nb_negative*/
|
|---|
| 1814 | (unaryfunc)0, /*nb_positive*/
|
|---|
| 1815 | (unaryfunc)0, /*nb_absolute*/
|
|---|
| 1816 | (inquiry)0, /*nb_nonzero*/
|
|---|
| 1817 | 0, /*nb_invert*/
|
|---|
| 1818 | 0, /*nb_lshift*/
|
|---|
| 1819 | 0, /*nb_rshift*/
|
|---|
| 1820 | 0, /*nb_and*/
|
|---|
| 1821 | 0, /*nb_xor*/
|
|---|
| 1822 | 0, /*nb_or*/
|
|---|
| 1823 | #if PY_VERSION_HEX < 0x03000000
|
|---|
| 1824 | 0, /*nb_coerce*/
|
|---|
| 1825 | #endif
|
|---|
| 1826 | (unaryfunc)SwigPyObject_long, /*nb_int*/
|
|---|
| 1827 | #if PY_VERSION_HEX < 0x03000000
|
|---|
| 1828 | (unaryfunc)SwigPyObject_long, /*nb_long*/
|
|---|
| 1829 | #else
|
|---|
| 1830 | 0, /*nb_reserved*/
|
|---|
| 1831 | #endif
|
|---|
| 1832 | (unaryfunc)0, /*nb_float*/
|
|---|
| 1833 | #if PY_VERSION_HEX < 0x03000000
|
|---|
| 1834 | (unaryfunc)SwigPyObject_oct, /*nb_oct*/
|
|---|
| 1835 | (unaryfunc)SwigPyObject_hex, /*nb_hex*/
|
|---|
| 1836 | #endif
|
|---|
| 1837 | #if PY_VERSION_HEX >= 0x03000000 /* 3.0 */
|
|---|
| 1838 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
|
|---|
| 1839 | #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
|
|---|
| 1840 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
|
|---|
| 1841 | #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
|
|---|
| 1842 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
|
|---|
| 1843 | #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
|
|---|
| 1844 | 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
|
|---|
| 1845 | #endif
|
|---|
| 1846 | };
|
|---|
| 1847 |
|
|---|
| 1848 | static PyTypeObject swigpyobject_type;
|
|---|
| 1849 | static int type_init = 0;
|
|---|
| 1850 | if (!type_init) {
|
|---|
| 1851 | const PyTypeObject tmp = {
|
|---|
| 1852 | /* PyObject header changed in Python 3 */
|
|---|
| 1853 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 1854 | PyVarObject_HEAD_INIT(NULL, 0)
|
|---|
| 1855 | #else
|
|---|
| 1856 | PyObject_HEAD_INIT(NULL)
|
|---|
| 1857 | 0, /* ob_size */
|
|---|
| 1858 | #endif
|
|---|
| 1859 | (char *)"SwigPyObject", /* tp_name */
|
|---|
| 1860 | sizeof(SwigPyObject), /* tp_basicsize */
|
|---|
| 1861 | 0, /* tp_itemsize */
|
|---|
| 1862 | (destructor)SwigPyObject_dealloc, /* tp_dealloc */
|
|---|
| 1863 | 0, /* tp_print */
|
|---|
| 1864 | #if PY_VERSION_HEX < 0x02020000
|
|---|
| 1865 | (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
|
|---|
| 1866 | #else
|
|---|
| 1867 | (getattrfunc)0, /* tp_getattr */
|
|---|
| 1868 | #endif
|
|---|
| 1869 | (setattrfunc)0, /* tp_setattr */
|
|---|
| 1870 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 1871 | 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
|
|---|
| 1872 | #else
|
|---|
| 1873 | (cmpfunc)SwigPyObject_compare, /* tp_compare */
|
|---|
| 1874 | #endif
|
|---|
| 1875 | (reprfunc)SwigPyObject_repr, /* tp_repr */
|
|---|
| 1876 | &SwigPyObject_as_number, /* tp_as_number */
|
|---|
| 1877 | 0, /* tp_as_sequence */
|
|---|
| 1878 | 0, /* tp_as_mapping */
|
|---|
| 1879 | (hashfunc)0, /* tp_hash */
|
|---|
| 1880 | (ternaryfunc)0, /* tp_call */
|
|---|
| 1881 | 0, /* tp_str */
|
|---|
| 1882 | PyObject_GenericGetAttr, /* tp_getattro */
|
|---|
| 1883 | 0, /* tp_setattro */
|
|---|
| 1884 | 0, /* tp_as_buffer */
|
|---|
| 1885 | Py_TPFLAGS_DEFAULT, /* tp_flags */
|
|---|
| 1886 | swigobject_doc, /* tp_doc */
|
|---|
| 1887 | 0, /* tp_traverse */
|
|---|
| 1888 | 0, /* tp_clear */
|
|---|
| 1889 | (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
|
|---|
| 1890 | 0, /* tp_weaklistoffset */
|
|---|
| 1891 | #if PY_VERSION_HEX >= 0x02020000
|
|---|
| 1892 | 0, /* tp_iter */
|
|---|
| 1893 | 0, /* tp_iternext */
|
|---|
| 1894 | swigobject_methods, /* tp_methods */
|
|---|
| 1895 | 0, /* tp_members */
|
|---|
| 1896 | 0, /* tp_getset */
|
|---|
| 1897 | 0, /* tp_base */
|
|---|
| 1898 | 0, /* tp_dict */
|
|---|
| 1899 | 0, /* tp_descr_get */
|
|---|
| 1900 | 0, /* tp_descr_set */
|
|---|
| 1901 | 0, /* tp_dictoffset */
|
|---|
| 1902 | 0, /* tp_init */
|
|---|
| 1903 | 0, /* tp_alloc */
|
|---|
| 1904 | 0, /* tp_new */
|
|---|
| 1905 | 0, /* tp_free */
|
|---|
| 1906 | 0, /* tp_is_gc */
|
|---|
| 1907 | 0, /* tp_bases */
|
|---|
| 1908 | 0, /* tp_mro */
|
|---|
| 1909 | 0, /* tp_cache */
|
|---|
| 1910 | 0, /* tp_subclasses */
|
|---|
| 1911 | 0, /* tp_weaklist */
|
|---|
| 1912 | #endif
|
|---|
| 1913 | #if PY_VERSION_HEX >= 0x02030000
|
|---|
| 1914 | 0, /* tp_del */
|
|---|
| 1915 | #endif
|
|---|
| 1916 | #if PY_VERSION_HEX >= 0x02060000
|
|---|
| 1917 | 0, /* tp_version */
|
|---|
| 1918 | #endif
|
|---|
| 1919 | #ifdef COUNT_ALLOCS
|
|---|
| 1920 | 0,0,0,0 /* tp_alloc -> tp_next */
|
|---|
| 1921 | #endif
|
|---|
| 1922 | };
|
|---|
| 1923 | swigpyobject_type = tmp;
|
|---|
| 1924 | type_init = 1;
|
|---|
| 1925 | #if PY_VERSION_HEX < 0x02020000
|
|---|
| 1926 | swigpyobject_type.ob_type = &PyType_Type;
|
|---|
| 1927 | #else
|
|---|
| 1928 | if (PyType_Ready(&swigpyobject_type) < 0)
|
|---|
| 1929 | return NULL;
|
|---|
| 1930 | #endif
|
|---|
| 1931 | }
|
|---|
| 1932 | return &swigpyobject_type;
|
|---|
| 1933 | }
|
|---|
| 1934 |
|
|---|
| 1935 | SWIGRUNTIME PyObject *
|
|---|
| 1936 | SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
|
|---|
| 1937 | {
|
|---|
| 1938 | SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
|
|---|
| 1939 | if (sobj) {
|
|---|
| 1940 | sobj->ptr = ptr;
|
|---|
| 1941 | sobj->ty = ty;
|
|---|
| 1942 | sobj->own = own;
|
|---|
| 1943 | sobj->next = 0;
|
|---|
| 1944 | }
|
|---|
| 1945 | return (PyObject *)sobj;
|
|---|
| 1946 | }
|
|---|
| 1947 |
|
|---|
| 1948 | /* -----------------------------------------------------------------------------
|
|---|
| 1949 | * Implements a simple Swig Packed type, and use it instead of string
|
|---|
| 1950 | * ----------------------------------------------------------------------------- */
|
|---|
| 1951 |
|
|---|
| 1952 | typedef struct {
|
|---|
| 1953 | PyObject_HEAD
|
|---|
| 1954 | void *pack;
|
|---|
| 1955 | swig_type_info *ty;
|
|---|
| 1956 | size_t size;
|
|---|
| 1957 | } SwigPyPacked;
|
|---|
| 1958 |
|
|---|
| 1959 | SWIGRUNTIME int
|
|---|
| 1960 | SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
|
|---|
| 1961 | {
|
|---|
| 1962 | char result[SWIG_BUFFER_SIZE];
|
|---|
| 1963 | fputs("<Swig Packed ", fp);
|
|---|
| 1964 | if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
|
|---|
| 1965 | fputs("at ", fp);
|
|---|
| 1966 | fputs(result, fp);
|
|---|
| 1967 | }
|
|---|
| 1968 | fputs(v->ty->name,fp);
|
|---|
| 1969 | fputs(">", fp);
|
|---|
| 1970 | return 0;
|
|---|
| 1971 | }
|
|---|
| 1972 |
|
|---|
| 1973 | SWIGRUNTIME PyObject *
|
|---|
| 1974 | SwigPyPacked_repr(SwigPyPacked *v)
|
|---|
| 1975 | {
|
|---|
| 1976 | char result[SWIG_BUFFER_SIZE];
|
|---|
| 1977 | if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
|
|---|
| 1978 | return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
|
|---|
| 1979 | } else {
|
|---|
| 1980 | return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
|
|---|
| 1981 | }
|
|---|
| 1982 | }
|
|---|
| 1983 |
|
|---|
| 1984 | SWIGRUNTIME PyObject *
|
|---|
| 1985 | SwigPyPacked_str(SwigPyPacked *v)
|
|---|
| 1986 | {
|
|---|
| 1987 | char result[SWIG_BUFFER_SIZE];
|
|---|
| 1988 | if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
|
|---|
| 1989 | return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
|
|---|
| 1990 | } else {
|
|---|
| 1991 | return SWIG_Python_str_FromChar(v->ty->name);
|
|---|
| 1992 | }
|
|---|
| 1993 | }
|
|---|
| 1994 |
|
|---|
| 1995 | SWIGRUNTIME int
|
|---|
| 1996 | SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
|
|---|
| 1997 | {
|
|---|
| 1998 | size_t i = v->size;
|
|---|
| 1999 | size_t j = w->size;
|
|---|
| 2000 | int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
|
|---|
| 2001 | return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
|
|---|
| 2002 | }
|
|---|
| 2003 |
|
|---|
| 2004 | SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
|
|---|
| 2005 |
|
|---|
| 2006 | SWIGRUNTIME PyTypeObject*
|
|---|
| 2007 | SwigPyPacked_type(void) {
|
|---|
| 2008 | static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
|
|---|
| 2009 | return type;
|
|---|
| 2010 | }
|
|---|
| 2011 |
|
|---|
| 2012 | SWIGRUNTIMEINLINE int
|
|---|
| 2013 | SwigPyPacked_Check(PyObject *op) {
|
|---|
| 2014 | return ((op)->ob_type == SwigPyPacked_TypeOnce())
|
|---|
| 2015 | || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
|
|---|
| 2016 | }
|
|---|
| 2017 |
|
|---|
| 2018 | SWIGRUNTIME void
|
|---|
| 2019 | SwigPyPacked_dealloc(PyObject *v)
|
|---|
| 2020 | {
|
|---|
| 2021 | if (SwigPyPacked_Check(v)) {
|
|---|
| 2022 | SwigPyPacked *sobj = (SwigPyPacked *) v;
|
|---|
| 2023 | free(sobj->pack);
|
|---|
| 2024 | }
|
|---|
| 2025 | PyObject_DEL(v);
|
|---|
| 2026 | }
|
|---|
| 2027 |
|
|---|
| 2028 | SWIGRUNTIME PyTypeObject*
|
|---|
| 2029 | SwigPyPacked_TypeOnce(void) {
|
|---|
| 2030 | static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
|
|---|
| 2031 | static PyTypeObject swigpypacked_type;
|
|---|
| 2032 | static int type_init = 0;
|
|---|
| 2033 | if (!type_init) {
|
|---|
| 2034 | const PyTypeObject tmp = {
|
|---|
| 2035 | /* PyObject header changed in Python 3 */
|
|---|
| 2036 | #if PY_VERSION_HEX>=0x03000000
|
|---|
| 2037 | PyVarObject_HEAD_INIT(NULL, 0)
|
|---|
| 2038 | #else
|
|---|
| 2039 | PyObject_HEAD_INIT(NULL)
|
|---|
| 2040 | 0, /* ob_size */
|
|---|
| 2041 | #endif
|
|---|
| 2042 | (char *)"SwigPyPacked", /* tp_name */
|
|---|
| 2043 | sizeof(SwigPyPacked), /* tp_basicsize */
|
|---|
| 2044 | 0, /* tp_itemsize */
|
|---|
| 2045 | (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
|
|---|
| 2046 | (printfunc)SwigPyPacked_print, /* tp_print */
|
|---|
| 2047 | (getattrfunc)0, /* tp_getattr */
|
|---|
| 2048 | (setattrfunc)0, /* tp_setattr */
|
|---|
| 2049 | #if PY_VERSION_HEX>=0x03000000
|
|---|
| 2050 | 0, /* tp_reserved in 3.0.1 */
|
|---|
| 2051 | #else
|
|---|
| 2052 | (cmpfunc)SwigPyPacked_compare, /* tp_compare */
|
|---|
| 2053 | #endif
|
|---|
| 2054 | (reprfunc)SwigPyPacked_repr, /* tp_repr */
|
|---|
| 2055 | 0, /* tp_as_number */
|
|---|
| 2056 | 0, /* tp_as_sequence */
|
|---|
| 2057 | 0, /* tp_as_mapping */
|
|---|
| 2058 | (hashfunc)0, /* tp_hash */
|
|---|
| 2059 | (ternaryfunc)0, /* tp_call */
|
|---|
| 2060 | (reprfunc)SwigPyPacked_str, /* tp_str */
|
|---|
| 2061 | PyObject_GenericGetAttr, /* tp_getattro */
|
|---|
| 2062 | 0, /* tp_setattro */
|
|---|
| 2063 | 0, /* tp_as_buffer */
|
|---|
| 2064 | Py_TPFLAGS_DEFAULT, /* tp_flags */
|
|---|
| 2065 | swigpacked_doc, /* tp_doc */
|
|---|
| 2066 | 0, /* tp_traverse */
|
|---|
| 2067 | 0, /* tp_clear */
|
|---|
| 2068 | 0, /* tp_richcompare */
|
|---|
| 2069 | 0, /* tp_weaklistoffset */
|
|---|
| 2070 | #if PY_VERSION_HEX >= 0x02020000
|
|---|
| 2071 | 0, /* tp_iter */
|
|---|
| 2072 | 0, /* tp_iternext */
|
|---|
| 2073 | 0, /* tp_methods */
|
|---|
| 2074 | 0, /* tp_members */
|
|---|
| 2075 | 0, /* tp_getset */
|
|---|
| 2076 | 0, /* tp_base */
|
|---|
| 2077 | 0, /* tp_dict */
|
|---|
| 2078 | 0, /* tp_descr_get */
|
|---|
| 2079 | 0, /* tp_descr_set */
|
|---|
| 2080 | 0, /* tp_dictoffset */
|
|---|
| 2081 | 0, /* tp_init */
|
|---|
| 2082 | 0, /* tp_alloc */
|
|---|
| 2083 | 0, /* tp_new */
|
|---|
| 2084 | 0, /* tp_free */
|
|---|
| 2085 | 0, /* tp_is_gc */
|
|---|
| 2086 | 0, /* tp_bases */
|
|---|
| 2087 | 0, /* tp_mro */
|
|---|
| 2088 | 0, /* tp_cache */
|
|---|
| 2089 | 0, /* tp_subclasses */
|
|---|
| 2090 | 0, /* tp_weaklist */
|
|---|
| 2091 | #endif
|
|---|
| 2092 | #if PY_VERSION_HEX >= 0x02030000
|
|---|
| 2093 | 0, /* tp_del */
|
|---|
| 2094 | #endif
|
|---|
| 2095 | #if PY_VERSION_HEX >= 0x02060000
|
|---|
| 2096 | 0, /* tp_version */
|
|---|
| 2097 | #endif
|
|---|
| 2098 | #ifdef COUNT_ALLOCS
|
|---|
| 2099 | 0,0,0,0 /* tp_alloc -> tp_next */
|
|---|
| 2100 | #endif
|
|---|
| 2101 | };
|
|---|
| 2102 | swigpypacked_type = tmp;
|
|---|
| 2103 | type_init = 1;
|
|---|
| 2104 | #if PY_VERSION_HEX < 0x02020000
|
|---|
| 2105 | swigpypacked_type.ob_type = &PyType_Type;
|
|---|
| 2106 | #else
|
|---|
| 2107 | if (PyType_Ready(&swigpypacked_type) < 0)
|
|---|
| 2108 | return NULL;
|
|---|
| 2109 | #endif
|
|---|
| 2110 | }
|
|---|
| 2111 | return &swigpypacked_type;
|
|---|
| 2112 | }
|
|---|
| 2113 |
|
|---|
| 2114 | SWIGRUNTIME PyObject *
|
|---|
| 2115 | SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
|
|---|
| 2116 | {
|
|---|
| 2117 | SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
|
|---|
| 2118 | if (sobj) {
|
|---|
| 2119 | void *pack = malloc(size);
|
|---|
| 2120 | if (pack) {
|
|---|
| 2121 | memcpy(pack, ptr, size);
|
|---|
| 2122 | sobj->pack = pack;
|
|---|
| 2123 | sobj->ty = ty;
|
|---|
| 2124 | sobj->size = size;
|
|---|
| 2125 | } else {
|
|---|
| 2126 | PyObject_DEL((PyObject *) sobj);
|
|---|
| 2127 | sobj = 0;
|
|---|
| 2128 | }
|
|---|
| 2129 | }
|
|---|
| 2130 | return (PyObject *) sobj;
|
|---|
| 2131 | }
|
|---|
| 2132 |
|
|---|
| 2133 | SWIGRUNTIME swig_type_info *
|
|---|
| 2134 | SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
|
|---|
| 2135 | {
|
|---|
| 2136 | if (SwigPyPacked_Check(obj)) {
|
|---|
| 2137 | SwigPyPacked *sobj = (SwigPyPacked *)obj;
|
|---|
| 2138 | if (sobj->size != size) return 0;
|
|---|
| 2139 | memcpy(ptr, sobj->pack, size);
|
|---|
| 2140 | return sobj->ty;
|
|---|
| 2141 | } else {
|
|---|
| 2142 | return 0;
|
|---|
| 2143 | }
|
|---|
| 2144 | }
|
|---|
| 2145 |
|
|---|
| 2146 | /* -----------------------------------------------------------------------------
|
|---|
| 2147 | * pointers/data manipulation
|
|---|
| 2148 | * ----------------------------------------------------------------------------- */
|
|---|
| 2149 |
|
|---|
| 2150 | SWIGRUNTIMEINLINE PyObject *
|
|---|
| 2151 | _SWIG_This(void)
|
|---|
| 2152 | {
|
|---|
| 2153 | return SWIG_Python_str_FromChar("this");
|
|---|
| 2154 | }
|
|---|
| 2155 |
|
|---|
| 2156 | static PyObject *swig_this = NULL;
|
|---|
| 2157 |
|
|---|
| 2158 | SWIGRUNTIME PyObject *
|
|---|
| 2159 | SWIG_This(void)
|
|---|
| 2160 | {
|
|---|
| 2161 | if (swig_this == NULL)
|
|---|
| 2162 | swig_this = _SWIG_This();
|
|---|
| 2163 | return swig_this;
|
|---|
| 2164 | }
|
|---|
| 2165 |
|
|---|
| 2166 | /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
|
|---|
| 2167 |
|
|---|
| 2168 | /* TODO: I don't know how to implement the fast getset in Python 3 right now */
|
|---|
| 2169 | #if PY_VERSION_HEX>=0x03000000
|
|---|
| 2170 | #define SWIG_PYTHON_SLOW_GETSET_THIS
|
|---|
| 2171 | #endif
|
|---|
| 2172 |
|
|---|
| 2173 | SWIGRUNTIME SwigPyObject *
|
|---|
| 2174 | SWIG_Python_GetSwigThis(PyObject *pyobj)
|
|---|
| 2175 | {
|
|---|
| 2176 | PyObject *obj;
|
|---|
| 2177 |
|
|---|
| 2178 | if (SwigPyObject_Check(pyobj))
|
|---|
| 2179 | return (SwigPyObject *) pyobj;
|
|---|
| 2180 |
|
|---|
| 2181 | #ifdef SWIGPYTHON_BUILTIN
|
|---|
| 2182 | (void)obj;
|
|---|
| 2183 | # ifdef PyWeakref_CheckProxy
|
|---|
| 2184 | if (PyWeakref_CheckProxy(pyobj)) {
|
|---|
| 2185 | pyobj = PyWeakref_GET_OBJECT(pyobj);
|
|---|
| 2186 | if (pyobj && SwigPyObject_Check(pyobj))
|
|---|
| 2187 | return (SwigPyObject*) pyobj;
|
|---|
| 2188 | }
|
|---|
| 2189 | # endif
|
|---|
| 2190 | return NULL;
|
|---|
| 2191 | #else
|
|---|
| 2192 |
|
|---|
| 2193 | obj = 0;
|
|---|
| 2194 |
|
|---|
| 2195 | #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
|
|---|
| 2196 | if (PyInstance_Check(pyobj)) {
|
|---|
| 2197 | obj = _PyInstance_Lookup(pyobj, SWIG_This());
|
|---|
| 2198 | } else {
|
|---|
| 2199 | PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
|
|---|
| 2200 | if (dictptr != NULL) {
|
|---|
| 2201 | PyObject *dict = *dictptr;
|
|---|
| 2202 | obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
|
|---|
| 2203 | } else {
|
|---|
| 2204 | #ifdef PyWeakref_CheckProxy
|
|---|
| 2205 | if (PyWeakref_CheckProxy(pyobj)) {
|
|---|
| 2206 | PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
|
|---|
| 2207 | return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
|
|---|
| 2208 | }
|
|---|
| 2209 | #endif
|
|---|
| 2210 | obj = PyObject_GetAttr(pyobj,SWIG_This());
|
|---|
| 2211 | if (obj) {
|
|---|
| 2212 | Py_DECREF(obj);
|
|---|
| 2213 | } else {
|
|---|
| 2214 | if (PyErr_Occurred()) PyErr_Clear();
|
|---|
| 2215 | return 0;
|
|---|
| 2216 | }
|
|---|
| 2217 | }
|
|---|
| 2218 | }
|
|---|
| 2219 | #else
|
|---|
| 2220 | obj = PyObject_GetAttr(pyobj,SWIG_This());
|
|---|
| 2221 | if (obj) {
|
|---|
| 2222 | Py_DECREF(obj);
|
|---|
| 2223 | } else {
|
|---|
| 2224 | if (PyErr_Occurred()) PyErr_Clear();
|
|---|
| 2225 | return 0;
|
|---|
| 2226 | }
|
|---|
| 2227 | #endif
|
|---|
| 2228 | if (obj && !SwigPyObject_Check(obj)) {
|
|---|
| 2229 | /* a PyObject is called 'this', try to get the 'real this'
|
|---|
| 2230 | SwigPyObject from it */
|
|---|
| 2231 | return SWIG_Python_GetSwigThis(obj);
|
|---|
| 2232 | }
|
|---|
| 2233 | return (SwigPyObject *)obj;
|
|---|
| 2234 | #endif
|
|---|
| 2235 | }
|
|---|
| 2236 |
|
|---|
| 2237 | /* Acquire a pointer value */
|
|---|
| 2238 |
|
|---|
| 2239 | SWIGRUNTIME int
|
|---|
| 2240 | SWIG_Python_AcquirePtr(PyObject *obj, int own) {
|
|---|
| 2241 | if (own == SWIG_POINTER_OWN) {
|
|---|
| 2242 | SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
|
|---|
| 2243 | if (sobj) {
|
|---|
| 2244 | int oldown = sobj->own;
|
|---|
| 2245 | sobj->own = own;
|
|---|
| 2246 | return oldown;
|
|---|
| 2247 | }
|
|---|
| 2248 | }
|
|---|
| 2249 | return 0;
|
|---|
| 2250 | }
|
|---|
| 2251 |
|
|---|
| 2252 | /* Convert a pointer value */
|
|---|
| 2253 |
|
|---|
| 2254 | SWIGRUNTIME int
|
|---|
| 2255 | SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
|
|---|
| 2256 | int res;
|
|---|
| 2257 | SwigPyObject *sobj;
|
|---|
| 2258 | int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
|
|---|
| 2259 |
|
|---|
| 2260 | if (!obj)
|
|---|
| 2261 | return SWIG_ERROR;
|
|---|
| 2262 | if (obj == Py_None && !implicit_conv) {
|
|---|
| 2263 | if (ptr)
|
|---|
| 2264 | *ptr = 0;
|
|---|
| 2265 | return SWIG_OK;
|
|---|
| 2266 | }
|
|---|
| 2267 |
|
|---|
| 2268 | res = SWIG_ERROR;
|
|---|
| 2269 |
|
|---|
| 2270 | sobj = SWIG_Python_GetSwigThis(obj);
|
|---|
| 2271 | if (own)
|
|---|
| 2272 | *own = 0;
|
|---|
| 2273 | while (sobj) {
|
|---|
| 2274 | void *vptr = sobj->ptr;
|
|---|
| 2275 | if (ty) {
|
|---|
| 2276 | swig_type_info *to = sobj->ty;
|
|---|
| 2277 | if (to == ty) {
|
|---|
| 2278 | /* no type cast needed */
|
|---|
| 2279 | if (ptr) *ptr = vptr;
|
|---|
| 2280 | break;
|
|---|
| 2281 | } else {
|
|---|
| 2282 | swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
|
|---|
| 2283 | if (!tc) {
|
|---|
| 2284 | sobj = (SwigPyObject *)sobj->next;
|
|---|
| 2285 | } else {
|
|---|
| 2286 | if (ptr) {
|
|---|
| 2287 | int newmemory = 0;
|
|---|
| 2288 | *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
|
|---|
| 2289 | if (newmemory == SWIG_CAST_NEW_MEMORY) {
|
|---|
| 2290 | assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
|
|---|
| 2291 | if (own)
|
|---|
| 2292 | *own = *own | SWIG_CAST_NEW_MEMORY;
|
|---|
| 2293 | }
|
|---|
| 2294 | }
|
|---|
| 2295 | break;
|
|---|
| 2296 | }
|
|---|
| 2297 | }
|
|---|
| 2298 | } else {
|
|---|
| 2299 | if (ptr) *ptr = vptr;
|
|---|
| 2300 | break;
|
|---|
| 2301 | }
|
|---|
| 2302 | }
|
|---|
| 2303 | if (sobj) {
|
|---|
| 2304 | if (own)
|
|---|
| 2305 | *own = *own | sobj->own;
|
|---|
| 2306 | if (flags & SWIG_POINTER_DISOWN) {
|
|---|
| 2307 | sobj->own = 0;
|
|---|
| 2308 | }
|
|---|
| 2309 | res = SWIG_OK;
|
|---|
| 2310 | } else {
|
|---|
| 2311 | if (implicit_conv) {
|
|---|
| 2312 | SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
|
|---|
| 2313 | if (data && !data->implicitconv) {
|
|---|
| 2314 | PyObject *klass = data->klass;
|
|---|
| 2315 | if (klass) {
|
|---|
| 2316 | PyObject *impconv;
|
|---|
| 2317 | data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
|
|---|
| 2318 | impconv = SWIG_Python_CallFunctor(klass, obj);
|
|---|
| 2319 | data->implicitconv = 0;
|
|---|
| 2320 | if (PyErr_Occurred()) {
|
|---|
| 2321 | PyErr_Clear();
|
|---|
| 2322 | impconv = 0;
|
|---|
| 2323 | }
|
|---|
| 2324 | if (impconv) {
|
|---|
| 2325 | SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
|
|---|
| 2326 | if (iobj) {
|
|---|
| 2327 | void *vptr;
|
|---|
| 2328 | res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
|
|---|
| 2329 | if (SWIG_IsOK(res)) {
|
|---|
| 2330 | if (ptr) {
|
|---|
| 2331 | *ptr = vptr;
|
|---|
| 2332 | /* transfer the ownership to 'ptr' */
|
|---|
| 2333 | iobj->own = 0;
|
|---|
| 2334 | res = SWIG_AddCast(res);
|
|---|
| 2335 | res = SWIG_AddNewMask(res);
|
|---|
| 2336 | } else {
|
|---|
| 2337 | res = SWIG_AddCast(res);
|
|---|
| 2338 | }
|
|---|
| 2339 | }
|
|---|
| 2340 | }
|
|---|
| 2341 | Py_DECREF(impconv);
|
|---|
| 2342 | }
|
|---|
| 2343 | }
|
|---|
| 2344 | }
|
|---|
| 2345 | }
|
|---|
| 2346 | if (!SWIG_IsOK(res) && obj == Py_None) {
|
|---|
| 2347 | if (ptr)
|
|---|
| 2348 | *ptr = 0;
|
|---|
| 2349 | if (PyErr_Occurred())
|
|---|
| 2350 | PyErr_Clear();
|
|---|
| 2351 | res = SWIG_OK;
|
|---|
| 2352 | }
|
|---|
| 2353 | }
|
|---|
| 2354 | return res;
|
|---|
| 2355 | }
|
|---|
| 2356 |
|
|---|
| 2357 | /* Convert a function ptr value */
|
|---|
| 2358 |
|
|---|
| 2359 | SWIGRUNTIME int
|
|---|
| 2360 | SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
|
|---|
| 2361 | if (!PyCFunction_Check(obj)) {
|
|---|
| 2362 | return SWIG_ConvertPtr(obj, ptr, ty, 0);
|
|---|
| 2363 | } else {
|
|---|
| 2364 | void *vptr = 0;
|
|---|
| 2365 |
|
|---|
| 2366 | /* here we get the method pointer for callbacks */
|
|---|
| 2367 | const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
|
|---|
| 2368 | const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
|
|---|
| 2369 | if (desc)
|
|---|
| 2370 | desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
|
|---|
| 2371 | if (!desc)
|
|---|
| 2372 | return SWIG_ERROR;
|
|---|
| 2373 | if (ty) {
|
|---|
| 2374 | swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
|
|---|
| 2375 | if (tc) {
|
|---|
| 2376 | int newmemory = 0;
|
|---|
| 2377 | *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
|
|---|
| 2378 | assert(!newmemory); /* newmemory handling not yet implemented */
|
|---|
| 2379 | } else {
|
|---|
| 2380 | return SWIG_ERROR;
|
|---|
| 2381 | }
|
|---|
| 2382 | } else {
|
|---|
| 2383 | *ptr = vptr;
|
|---|
| 2384 | }
|
|---|
| 2385 | return SWIG_OK;
|
|---|
| 2386 | }
|
|---|
| 2387 | }
|
|---|
| 2388 |
|
|---|
| 2389 | /* Convert a packed value value */
|
|---|
| 2390 |
|
|---|
| 2391 | SWIGRUNTIME int
|
|---|
| 2392 | SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
|
|---|
| 2393 | swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
|
|---|
| 2394 | if (!to) return SWIG_ERROR;
|
|---|
| 2395 | if (ty) {
|
|---|
| 2396 | if (to != ty) {
|
|---|
| 2397 | /* check type cast? */
|
|---|
| 2398 | swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
|
|---|
| 2399 | if (!tc) return SWIG_ERROR;
|
|---|
| 2400 | }
|
|---|
| 2401 | }
|
|---|
| 2402 | return SWIG_OK;
|
|---|
| 2403 | }
|
|---|
| 2404 |
|
|---|
| 2405 | /* -----------------------------------------------------------------------------
|
|---|
| 2406 | * Create a new pointer object
|
|---|
| 2407 | * ----------------------------------------------------------------------------- */
|
|---|
| 2408 |
|
|---|
| 2409 | /*
|
|---|
| 2410 | Create a new instance object, without calling __init__, and set the
|
|---|
| 2411 | 'this' attribute.
|
|---|
| 2412 | */
|
|---|
| 2413 |
|
|---|
| 2414 | SWIGRUNTIME PyObject*
|
|---|
| 2415 | SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
|
|---|
| 2416 | {
|
|---|
| 2417 | #if (PY_VERSION_HEX >= 0x02020000)
|
|---|
| 2418 | PyObject *inst = 0;
|
|---|
| 2419 | PyObject *newraw = data->newraw;
|
|---|
| 2420 | if (newraw) {
|
|---|
| 2421 | inst = PyObject_Call(newraw, data->newargs, NULL);
|
|---|
| 2422 | if (inst) {
|
|---|
| 2423 | #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
|
|---|
| 2424 | PyObject **dictptr = _PyObject_GetDictPtr(inst);
|
|---|
| 2425 | if (dictptr != NULL) {
|
|---|
| 2426 | PyObject *dict = *dictptr;
|
|---|
| 2427 | if (dict == NULL) {
|
|---|
| 2428 | dict = PyDict_New();
|
|---|
| 2429 | *dictptr = dict;
|
|---|
| 2430 | PyDict_SetItem(dict, SWIG_This(), swig_this);
|
|---|
| 2431 | }
|
|---|
| 2432 | }
|
|---|
| 2433 | #else
|
|---|
| 2434 | PyObject *key = SWIG_This();
|
|---|
| 2435 | PyObject_SetAttr(inst, key, swig_this);
|
|---|
| 2436 | #endif
|
|---|
| 2437 | }
|
|---|
| 2438 | } else {
|
|---|
| 2439 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 2440 | inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
|
|---|
| 2441 | if (inst) {
|
|---|
| 2442 | PyObject_SetAttr(inst, SWIG_This(), swig_this);
|
|---|
| 2443 | Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
|
|---|
| 2444 | }
|
|---|
| 2445 | #else
|
|---|
| 2446 | PyObject *dict = PyDict_New();
|
|---|
| 2447 | if (dict) {
|
|---|
| 2448 | PyDict_SetItem(dict, SWIG_This(), swig_this);
|
|---|
| 2449 | inst = PyInstance_NewRaw(data->newargs, dict);
|
|---|
| 2450 | Py_DECREF(dict);
|
|---|
| 2451 | }
|
|---|
| 2452 | #endif
|
|---|
| 2453 | }
|
|---|
| 2454 | return inst;
|
|---|
| 2455 | #else
|
|---|
| 2456 | #if (PY_VERSION_HEX >= 0x02010000)
|
|---|
| 2457 | PyObject *inst = 0;
|
|---|
| 2458 | PyObject *dict = PyDict_New();
|
|---|
| 2459 | if (dict) {
|
|---|
| 2460 | PyDict_SetItem(dict, SWIG_This(), swig_this);
|
|---|
| 2461 | inst = PyInstance_NewRaw(data->newargs, dict);
|
|---|
| 2462 | Py_DECREF(dict);
|
|---|
| 2463 | }
|
|---|
| 2464 | return (PyObject *) inst;
|
|---|
| 2465 | #else
|
|---|
| 2466 | PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
|
|---|
| 2467 | if (inst == NULL) {
|
|---|
| 2468 | return NULL;
|
|---|
| 2469 | }
|
|---|
| 2470 | inst->in_class = (PyClassObject *)data->newargs;
|
|---|
| 2471 | Py_INCREF(inst->in_class);
|
|---|
| 2472 | inst->in_dict = PyDict_New();
|
|---|
| 2473 | if (inst->in_dict == NULL) {
|
|---|
| 2474 | Py_DECREF(inst);
|
|---|
| 2475 | return NULL;
|
|---|
| 2476 | }
|
|---|
| 2477 | #ifdef Py_TPFLAGS_HAVE_WEAKREFS
|
|---|
| 2478 | inst->in_weakreflist = NULL;
|
|---|
| 2479 | #endif
|
|---|
| 2480 | #ifdef Py_TPFLAGS_GC
|
|---|
| 2481 | PyObject_GC_Init(inst);
|
|---|
| 2482 | #endif
|
|---|
| 2483 | PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
|
|---|
| 2484 | return (PyObject *) inst;
|
|---|
| 2485 | #endif
|
|---|
| 2486 | #endif
|
|---|
| 2487 | }
|
|---|
| 2488 |
|
|---|
| 2489 | SWIGRUNTIME void
|
|---|
| 2490 | SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
|
|---|
| 2491 | {
|
|---|
| 2492 | PyObject *dict;
|
|---|
| 2493 | #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
|
|---|
| 2494 | PyObject **dictptr = _PyObject_GetDictPtr(inst);
|
|---|
| 2495 | if (dictptr != NULL) {
|
|---|
| 2496 | dict = *dictptr;
|
|---|
| 2497 | if (dict == NULL) {
|
|---|
| 2498 | dict = PyDict_New();
|
|---|
| 2499 | *dictptr = dict;
|
|---|
| 2500 | }
|
|---|
| 2501 | PyDict_SetItem(dict, SWIG_This(), swig_this);
|
|---|
| 2502 | return;
|
|---|
| 2503 | }
|
|---|
| 2504 | #endif
|
|---|
| 2505 | dict = PyObject_GetAttrString(inst, (char*)"__dict__");
|
|---|
| 2506 | PyDict_SetItem(dict, SWIG_This(), swig_this);
|
|---|
| 2507 | Py_DECREF(dict);
|
|---|
| 2508 | }
|
|---|
| 2509 |
|
|---|
| 2510 |
|
|---|
| 2511 | SWIGINTERN PyObject *
|
|---|
| 2512 | SWIG_Python_InitShadowInstance(PyObject *args) {
|
|---|
| 2513 | PyObject *obj[2];
|
|---|
| 2514 | if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
|
|---|
| 2515 | return NULL;
|
|---|
| 2516 | } else {
|
|---|
| 2517 | SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
|
|---|
| 2518 | if (sthis) {
|
|---|
| 2519 | SwigPyObject_append((PyObject*) sthis, obj[1]);
|
|---|
| 2520 | } else {
|
|---|
| 2521 | SWIG_Python_SetSwigThis(obj[0], obj[1]);
|
|---|
| 2522 | }
|
|---|
| 2523 | return SWIG_Py_Void();
|
|---|
| 2524 | }
|
|---|
| 2525 | }
|
|---|
| 2526 |
|
|---|
| 2527 | /* Create a new pointer object */
|
|---|
| 2528 |
|
|---|
| 2529 | SWIGRUNTIME PyObject *
|
|---|
| 2530 | SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
|
|---|
| 2531 | SwigPyClientData *clientdata;
|
|---|
| 2532 | PyObject * robj;
|
|---|
| 2533 | int own;
|
|---|
| 2534 |
|
|---|
| 2535 | if (!ptr)
|
|---|
| 2536 | return SWIG_Py_Void();
|
|---|
| 2537 |
|
|---|
| 2538 | clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
|
|---|
| 2539 | own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
|
|---|
| 2540 | if (clientdata && clientdata->pytype) {
|
|---|
| 2541 | SwigPyObject *newobj;
|
|---|
| 2542 | if (flags & SWIG_BUILTIN_TP_INIT) {
|
|---|
| 2543 | newobj = (SwigPyObject*) self;
|
|---|
| 2544 | if (newobj->ptr) {
|
|---|
| 2545 | PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
|
|---|
| 2546 | while (newobj->next)
|
|---|
| 2547 | newobj = (SwigPyObject *) newobj->next;
|
|---|
| 2548 | newobj->next = next_self;
|
|---|
| 2549 | newobj = (SwigPyObject *)next_self;
|
|---|
| 2550 | }
|
|---|
| 2551 | } else {
|
|---|
| 2552 | newobj = PyObject_New(SwigPyObject, clientdata->pytype);
|
|---|
| 2553 | }
|
|---|
| 2554 | if (newobj) {
|
|---|
| 2555 | newobj->ptr = ptr;
|
|---|
| 2556 | newobj->ty = type;
|
|---|
| 2557 | newobj->own = own;
|
|---|
| 2558 | newobj->next = 0;
|
|---|
| 2559 | #ifdef SWIGPYTHON_BUILTIN
|
|---|
| 2560 | newobj->dict = 0;
|
|---|
| 2561 | #endif
|
|---|
| 2562 | return (PyObject*) newobj;
|
|---|
| 2563 | }
|
|---|
| 2564 | return SWIG_Py_Void();
|
|---|
| 2565 | }
|
|---|
| 2566 |
|
|---|
| 2567 | assert(!(flags & SWIG_BUILTIN_TP_INIT));
|
|---|
| 2568 |
|
|---|
| 2569 | robj = SwigPyObject_New(ptr, type, own);
|
|---|
| 2570 | if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
|
|---|
| 2571 | PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
|
|---|
| 2572 | Py_DECREF(robj);
|
|---|
| 2573 | robj = inst;
|
|---|
| 2574 | }
|
|---|
| 2575 | return robj;
|
|---|
| 2576 | }
|
|---|
| 2577 |
|
|---|
| 2578 | /* Create a new packed object */
|
|---|
| 2579 |
|
|---|
| 2580 | SWIGRUNTIMEINLINE PyObject *
|
|---|
| 2581 | SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
|
|---|
| 2582 | return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
|
|---|
| 2583 | }
|
|---|
| 2584 |
|
|---|
| 2585 | /* -----------------------------------------------------------------------------*
|
|---|
| 2586 | * Get type list
|
|---|
| 2587 | * -----------------------------------------------------------------------------*/
|
|---|
| 2588 |
|
|---|
| 2589 | #ifdef SWIG_LINK_RUNTIME
|
|---|
| 2590 | void *SWIG_ReturnGlobalTypeList(void *);
|
|---|
| 2591 | #endif
|
|---|
| 2592 |
|
|---|
| 2593 | SWIGRUNTIME swig_module_info *
|
|---|
| 2594 | SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
|
|---|
| 2595 | static void *type_pointer = (void *)0;
|
|---|
| 2596 | /* first check if module already created */
|
|---|
| 2597 | if (!type_pointer) {
|
|---|
| 2598 | #ifdef SWIG_LINK_RUNTIME
|
|---|
| 2599 | type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
|
|---|
| 2600 | #else
|
|---|
| 2601 | # ifdef SWIGPY_USE_CAPSULE
|
|---|
| 2602 | type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
|
|---|
| 2603 | # else
|
|---|
| 2604 | type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
|
|---|
| 2605 | (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
|
|---|
| 2606 | # endif
|
|---|
| 2607 | if (PyErr_Occurred()) {
|
|---|
| 2608 | PyErr_Clear();
|
|---|
| 2609 | type_pointer = (void *)0;
|
|---|
| 2610 | }
|
|---|
| 2611 | #endif
|
|---|
| 2612 | }
|
|---|
| 2613 | return (swig_module_info *) type_pointer;
|
|---|
| 2614 | }
|
|---|
| 2615 |
|
|---|
| 2616 | #if PY_MAJOR_VERSION < 2
|
|---|
| 2617 | /* PyModule_AddObject function was introduced in Python 2.0. The following function
|
|---|
| 2618 | is copied out of Python/modsupport.c in python version 2.3.4 */
|
|---|
| 2619 | SWIGINTERN int
|
|---|
| 2620 | PyModule_AddObject(PyObject *m, char *name, PyObject *o)
|
|---|
| 2621 | {
|
|---|
| 2622 | PyObject *dict;
|
|---|
| 2623 | if (!PyModule_Check(m)) {
|
|---|
| 2624 | PyErr_SetString(PyExc_TypeError,
|
|---|
| 2625 | "PyModule_AddObject() needs module as first arg");
|
|---|
| 2626 | return SWIG_ERROR;
|
|---|
| 2627 | }
|
|---|
| 2628 | if (!o) {
|
|---|
| 2629 | PyErr_SetString(PyExc_TypeError,
|
|---|
| 2630 | "PyModule_AddObject() needs non-NULL value");
|
|---|
| 2631 | return SWIG_ERROR;
|
|---|
| 2632 | }
|
|---|
| 2633 |
|
|---|
| 2634 | dict = PyModule_GetDict(m);
|
|---|
| 2635 | if (dict == NULL) {
|
|---|
| 2636 | /* Internal error -- modules must have a dict! */
|
|---|
| 2637 | PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
|
|---|
| 2638 | PyModule_GetName(m));
|
|---|
| 2639 | return SWIG_ERROR;
|
|---|
| 2640 | }
|
|---|
| 2641 | if (PyDict_SetItemString(dict, name, o))
|
|---|
| 2642 | return SWIG_ERROR;
|
|---|
| 2643 | Py_DECREF(o);
|
|---|
| 2644 | return SWIG_OK;
|
|---|
| 2645 | }
|
|---|
| 2646 | #endif
|
|---|
| 2647 |
|
|---|
| 2648 | SWIGRUNTIME void
|
|---|
| 2649 | #ifdef SWIGPY_USE_CAPSULE
|
|---|
| 2650 | SWIG_Python_DestroyModule(PyObject *obj)
|
|---|
| 2651 | #else
|
|---|
| 2652 | SWIG_Python_DestroyModule(void *vptr)
|
|---|
| 2653 | #endif
|
|---|
| 2654 | {
|
|---|
| 2655 | #ifdef SWIGPY_USE_CAPSULE
|
|---|
| 2656 | swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
|
|---|
| 2657 | #else
|
|---|
| 2658 | swig_module_info *swig_module = (swig_module_info *) vptr;
|
|---|
| 2659 | #endif
|
|---|
| 2660 | swig_type_info **types = swig_module->types;
|
|---|
| 2661 | size_t i;
|
|---|
| 2662 | for (i =0; i < swig_module->size; ++i) {
|
|---|
| 2663 | swig_type_info *ty = types[i];
|
|---|
| 2664 | if (ty->owndata) {
|
|---|
| 2665 | SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
|
|---|
| 2666 | if (data) SwigPyClientData_Del(data);
|
|---|
| 2667 | }
|
|---|
| 2668 | }
|
|---|
| 2669 | Py_DECREF(SWIG_This());
|
|---|
| 2670 | swig_this = NULL;
|
|---|
| 2671 | }
|
|---|
| 2672 |
|
|---|
| 2673 | SWIGRUNTIME void
|
|---|
| 2674 | SWIG_Python_SetModule(swig_module_info *swig_module) {
|
|---|
| 2675 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 2676 | /* Add a dummy module object into sys.modules */
|
|---|
| 2677 | PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
|
|---|
| 2678 | #else
|
|---|
| 2679 | static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
|
|---|
| 2680 | PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
|
|---|
| 2681 | #endif
|
|---|
| 2682 | #ifdef SWIGPY_USE_CAPSULE
|
|---|
| 2683 | PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
|
|---|
| 2684 | if (pointer && module) {
|
|---|
| 2685 | PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
|
|---|
| 2686 | } else {
|
|---|
| 2687 | Py_XDECREF(pointer);
|
|---|
| 2688 | }
|
|---|
| 2689 | #else
|
|---|
| 2690 | PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
|
|---|
| 2691 | if (pointer && module) {
|
|---|
| 2692 | PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
|
|---|
| 2693 | } else {
|
|---|
| 2694 | Py_XDECREF(pointer);
|
|---|
| 2695 | }
|
|---|
| 2696 | #endif
|
|---|
| 2697 | }
|
|---|
| 2698 |
|
|---|
| 2699 | /* The python cached type query */
|
|---|
| 2700 | SWIGRUNTIME PyObject *
|
|---|
| 2701 | SWIG_Python_TypeCache(void) {
|
|---|
| 2702 | static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
|
|---|
| 2703 | return cache;
|
|---|
| 2704 | }
|
|---|
| 2705 |
|
|---|
| 2706 | SWIGRUNTIME swig_type_info *
|
|---|
| 2707 | SWIG_Python_TypeQuery(const char *type)
|
|---|
| 2708 | {
|
|---|
| 2709 | PyObject *cache = SWIG_Python_TypeCache();
|
|---|
| 2710 | PyObject *key = SWIG_Python_str_FromChar(type);
|
|---|
| 2711 | PyObject *obj = PyDict_GetItem(cache, key);
|
|---|
| 2712 | swig_type_info *descriptor;
|
|---|
| 2713 | if (obj) {
|
|---|
| 2714 | #ifdef SWIGPY_USE_CAPSULE
|
|---|
| 2715 | descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
|
|---|
| 2716 | #else
|
|---|
| 2717 | descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
|
|---|
| 2718 | #endif
|
|---|
| 2719 | } else {
|
|---|
| 2720 | swig_module_info *swig_module = SWIG_GetModule(0);
|
|---|
| 2721 | descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
|
|---|
| 2722 | if (descriptor) {
|
|---|
| 2723 | #ifdef SWIGPY_USE_CAPSULE
|
|---|
| 2724 | obj = PyCapsule_New((void*) descriptor, NULL, NULL);
|
|---|
| 2725 | #else
|
|---|
| 2726 | obj = PyCObject_FromVoidPtr(descriptor, NULL);
|
|---|
| 2727 | #endif
|
|---|
| 2728 | PyDict_SetItem(cache, key, obj);
|
|---|
| 2729 | Py_DECREF(obj);
|
|---|
| 2730 | }
|
|---|
| 2731 | }
|
|---|
| 2732 | Py_DECREF(key);
|
|---|
| 2733 | return descriptor;
|
|---|
| 2734 | }
|
|---|
| 2735 |
|
|---|
| 2736 | /*
|
|---|
| 2737 | For backward compatibility only
|
|---|
| 2738 | */
|
|---|
| 2739 | #define SWIG_POINTER_EXCEPTION 0
|
|---|
| 2740 | #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
|
|---|
| 2741 | #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
|
|---|
| 2742 |
|
|---|
| 2743 | SWIGRUNTIME int
|
|---|
| 2744 | SWIG_Python_AddErrMesg(const char* mesg, int infront)
|
|---|
| 2745 | {
|
|---|
| 2746 | if (PyErr_Occurred()) {
|
|---|
| 2747 | PyObject *type = 0;
|
|---|
| 2748 | PyObject *value = 0;
|
|---|
| 2749 | PyObject *traceback = 0;
|
|---|
| 2750 | PyErr_Fetch(&type, &value, &traceback);
|
|---|
| 2751 | if (value) {
|
|---|
| 2752 | char *tmp;
|
|---|
| 2753 | PyObject *old_str = PyObject_Str(value);
|
|---|
| 2754 | Py_XINCREF(type);
|
|---|
| 2755 | PyErr_Clear();
|
|---|
| 2756 | if (infront) {
|
|---|
| 2757 | PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
|
|---|
| 2758 | } else {
|
|---|
| 2759 | PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
|
|---|
| 2760 | }
|
|---|
| 2761 | SWIG_Python_str_DelForPy3(tmp);
|
|---|
| 2762 | Py_DECREF(old_str);
|
|---|
| 2763 | }
|
|---|
| 2764 | return 1;
|
|---|
| 2765 | } else {
|
|---|
| 2766 | return 0;
|
|---|
| 2767 | }
|
|---|
| 2768 | }
|
|---|
| 2769 |
|
|---|
| 2770 | SWIGRUNTIME int
|
|---|
| 2771 | SWIG_Python_ArgFail(int argnum)
|
|---|
| 2772 | {
|
|---|
| 2773 | if (PyErr_Occurred()) {
|
|---|
| 2774 | /* add information about failing argument */
|
|---|
| 2775 | char mesg[256];
|
|---|
| 2776 | PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
|
|---|
| 2777 | return SWIG_Python_AddErrMesg(mesg, 1);
|
|---|
| 2778 | } else {
|
|---|
| 2779 | return 0;
|
|---|
| 2780 | }
|
|---|
| 2781 | }
|
|---|
| 2782 |
|
|---|
| 2783 | SWIGRUNTIMEINLINE const char *
|
|---|
| 2784 | SwigPyObject_GetDesc(PyObject *self)
|
|---|
| 2785 | {
|
|---|
| 2786 | SwigPyObject *v = (SwigPyObject *)self;
|
|---|
| 2787 | swig_type_info *ty = v ? v->ty : 0;
|
|---|
| 2788 | return ty ? ty->str : "";
|
|---|
| 2789 | }
|
|---|
| 2790 |
|
|---|
| 2791 | SWIGRUNTIME void
|
|---|
| 2792 | SWIG_Python_TypeError(const char *type, PyObject *obj)
|
|---|
| 2793 | {
|
|---|
| 2794 | if (type) {
|
|---|
| 2795 | #if defined(SWIG_COBJECT_TYPES)
|
|---|
| 2796 | if (obj && SwigPyObject_Check(obj)) {
|
|---|
| 2797 | const char *otype = (const char *) SwigPyObject_GetDesc(obj);
|
|---|
| 2798 | if (otype) {
|
|---|
| 2799 | PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
|
|---|
| 2800 | type, otype);
|
|---|
| 2801 | return;
|
|---|
| 2802 | }
|
|---|
| 2803 | } else
|
|---|
| 2804 | #endif
|
|---|
| 2805 | {
|
|---|
| 2806 | const char *otype = (obj ? obj->ob_type->tp_name : 0);
|
|---|
| 2807 | if (otype) {
|
|---|
| 2808 | PyObject *str = PyObject_Str(obj);
|
|---|
| 2809 | const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
|
|---|
| 2810 | if (cstr) {
|
|---|
| 2811 | PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
|
|---|
| 2812 | type, otype, cstr);
|
|---|
| 2813 | SWIG_Python_str_DelForPy3(cstr);
|
|---|
| 2814 | } else {
|
|---|
| 2815 | PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
|
|---|
| 2816 | type, otype);
|
|---|
| 2817 | }
|
|---|
| 2818 | Py_XDECREF(str);
|
|---|
| 2819 | return;
|
|---|
| 2820 | }
|
|---|
| 2821 | }
|
|---|
| 2822 | PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
|
|---|
| 2823 | } else {
|
|---|
| 2824 | PyErr_Format(PyExc_TypeError, "unexpected type is received");
|
|---|
| 2825 | }
|
|---|
| 2826 | }
|
|---|
| 2827 |
|
|---|
| 2828 |
|
|---|
| 2829 | /* Convert a pointer value, signal an exception on a type mismatch */
|
|---|
| 2830 | SWIGRUNTIME void *
|
|---|
| 2831 | SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
|
|---|
| 2832 | void *result;
|
|---|
| 2833 | if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
|
|---|
| 2834 | PyErr_Clear();
|
|---|
| 2835 | #if SWIG_POINTER_EXCEPTION
|
|---|
| 2836 | if (flags) {
|
|---|
| 2837 | SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
|
|---|
| 2838 | SWIG_Python_ArgFail(argnum);
|
|---|
| 2839 | }
|
|---|
| 2840 | #endif
|
|---|
| 2841 | }
|
|---|
| 2842 | return result;
|
|---|
| 2843 | }
|
|---|
| 2844 |
|
|---|
| 2845 | #ifdef SWIGPYTHON_BUILTIN
|
|---|
| 2846 | SWIGRUNTIME int
|
|---|
| 2847 | SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
|
|---|
| 2848 | PyTypeObject *tp = obj->ob_type;
|
|---|
| 2849 | PyObject *descr;
|
|---|
| 2850 | PyObject *encoded_name;
|
|---|
| 2851 | descrsetfunc f;
|
|---|
| 2852 | int res = -1;
|
|---|
| 2853 |
|
|---|
| 2854 | # ifdef Py_USING_UNICODE
|
|---|
| 2855 | if (PyString_Check(name)) {
|
|---|
| 2856 | name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
|
|---|
| 2857 | if (!name)
|
|---|
| 2858 | return -1;
|
|---|
| 2859 | } else if (!PyUnicode_Check(name))
|
|---|
| 2860 | # else
|
|---|
| 2861 | if (!PyString_Check(name))
|
|---|
| 2862 | # endif
|
|---|
| 2863 | {
|
|---|
| 2864 | PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
|
|---|
| 2865 | return -1;
|
|---|
| 2866 | } else {
|
|---|
| 2867 | Py_INCREF(name);
|
|---|
| 2868 | }
|
|---|
| 2869 |
|
|---|
| 2870 | if (!tp->tp_dict) {
|
|---|
| 2871 | if (PyType_Ready(tp) < 0)
|
|---|
| 2872 | goto done;
|
|---|
| 2873 | }
|
|---|
| 2874 |
|
|---|
| 2875 | descr = _PyType_Lookup(tp, name);
|
|---|
| 2876 | f = NULL;
|
|---|
| 2877 | if (descr != NULL)
|
|---|
| 2878 | f = descr->ob_type->tp_descr_set;
|
|---|
| 2879 | if (!f) {
|
|---|
| 2880 | if (PyString_Check(name)) {
|
|---|
| 2881 | encoded_name = name;
|
|---|
| 2882 | Py_INCREF(name);
|
|---|
| 2883 | } else {
|
|---|
| 2884 | encoded_name = PyUnicode_AsUTF8String(name);
|
|---|
| 2885 | }
|
|---|
| 2886 | PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
|
|---|
| 2887 | Py_DECREF(encoded_name);
|
|---|
| 2888 | } else {
|
|---|
| 2889 | res = f(descr, obj, value);
|
|---|
| 2890 | }
|
|---|
| 2891 |
|
|---|
| 2892 | done:
|
|---|
| 2893 | Py_DECREF(name);
|
|---|
| 2894 | return res;
|
|---|
| 2895 | }
|
|---|
| 2896 | #endif
|
|---|
| 2897 |
|
|---|
| 2898 |
|
|---|
| 2899 | #ifdef __cplusplus
|
|---|
| 2900 | }
|
|---|
| 2901 | #endif
|
|---|
| 2902 |
|
|---|
| 2903 |
|
|---|
| 2904 |
|
|---|
| 2905 | #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
|
|---|
| 2906 |
|
|---|
| 2907 | #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
|
|---|
| 2908 |
|
|---|
| 2909 |
|
|---|
| 2910 |
|
|---|
| 2911 | #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0)
|
|---|
| 2912 |
|
|---|
| 2913 |
|
|---|
| 2914 | /* -------- TYPES TABLE (BEGIN) -------- */
|
|---|
| 2915 |
|
|---|
| 2916 | #define SWIGTYPE_p_char swig_types[0]
|
|---|
| 2917 | #define SWIGTYPE_p_double swig_types[1]
|
|---|
| 2918 | #define SWIGTYPE_p_double_complex swig_types[2]
|
|---|
| 2919 | #define SWIGTYPE_p_int swig_types[3]
|
|---|
| 2920 | #define SWIGTYPE_p_shtns_info swig_types[4]
|
|---|
| 2921 | static swig_type_info *swig_types[6];
|
|---|
| 2922 | static swig_module_info swig_module = {swig_types, 5, 0, 0, 0, 0};
|
|---|
| 2923 | #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
|
|---|
| 2924 | #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
|
|---|
| 2925 |
|
|---|
| 2926 | /* -------- TYPES TABLE (END) -------- */
|
|---|
| 2927 |
|
|---|
| 2928 | #if (PY_VERSION_HEX <= 0x02000000)
|
|---|
| 2929 | # if !defined(SWIG_PYTHON_CLASSIC)
|
|---|
| 2930 | # error "This python version requires swig to be run with the '-classic' option"
|
|---|
| 2931 | # endif
|
|---|
| 2932 | #endif
|
|---|
| 2933 |
|
|---|
| 2934 | /*-----------------------------------------------
|
|---|
| 2935 | @(target):= _shtns.so
|
|---|
| 2936 | ------------------------------------------------*/
|
|---|
| 2937 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 2938 | # define SWIG_init PyInit__shtns
|
|---|
| 2939 |
|
|---|
| 2940 | #else
|
|---|
| 2941 | # define SWIG_init init_shtns
|
|---|
| 2942 |
|
|---|
| 2943 | #endif
|
|---|
| 2944 | #define SWIG_name "_shtns"
|
|---|
| 2945 |
|
|---|
| 2946 | #define SWIGVERSION 0x030005
|
|---|
| 2947 | #define SWIG_VERSION SWIGVERSION
|
|---|
| 2948 |
|
|---|
| 2949 |
|
|---|
| 2950 | #define SWIG_as_voidptr(a) (void *)((const void *)(a))
|
|---|
| 2951 | #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a))
|
|---|
| 2952 |
|
|---|
| 2953 |
|
|---|
| 2954 |
|
|---|
| 2955 | #include <numpy/arrayobject.h>
|
|---|
| 2956 | #include "sht_private.h"
|
|---|
| 2957 |
|
|---|
| 2958 | // variables used for exception handling.
|
|---|
| 2959 | static int shtns_error = 0;
|
|---|
| 2960 | static char* shtns_err_msg;
|
|---|
| 2961 | static char msg_buffer[128];
|
|---|
| 2962 | static char msg_grid_err[] = "Grid not set. Call .set_grid() mehtod.";
|
|---|
| 2963 | static char msg_numpy_arr[] = "Numpy array expected.";
|
|---|
| 2964 | static char msg_rot_err[] = "truncation must be triangular (lmax=mmax, mres=1)";
|
|---|
| 2965 |
|
|---|
| 2966 | static void throw_exception(int error, int iarg, char* msg)
|
|---|
| 2967 | {
|
|---|
| 2968 | shtns_error = error;
|
|---|
| 2969 | shtns_err_msg = msg;
|
|---|
| 2970 | if (iarg > 0) {
|
|---|
| 2971 | sprintf(msg_buffer, "arg #%d : %.100s", iarg, msg);
|
|---|
| 2972 | shtns_err_msg = msg_buffer;
|
|---|
| 2973 | }
|
|---|
| 2974 | }
|
|---|
| 2975 |
|
|---|
| 2976 | static int check_spatial(int i, PyObject *a, int size) {
|
|---|
| 2977 | if (size == 0) {
|
|---|
| 2978 | throw_exception(SWIG_RuntimeError,0,msg_grid_err); return 0;
|
|---|
| 2979 | }
|
|---|
| 2980 | if (!PyArray_Check(a)) {
|
|---|
| 2981 | throw_exception(SWIG_TypeError,i,msg_numpy_arr); return 0;
|
|---|
| 2982 | }
|
|---|
| 2983 | if (PyArray_TYPE(a) != PyArray_DOUBLE) {
|
|---|
| 2984 | throw_exception(SWIG_TypeError,i,"spatial array must consist of float."); return 0;
|
|---|
| 2985 | }
|
|---|
| 2986 | if (!PyArray_ISCONTIGUOUS(a)) {
|
|---|
| 2987 | throw_exception(SWIG_RuntimeError,i,"spatial array not contiguous. Use 'b=a.copy()' to copy a to a contiguous array b."); return 0;
|
|---|
| 2988 | }
|
|---|
| 2989 | if (PyArray_SIZE(a) != size) {
|
|---|
| 2990 | throw_exception(SWIG_RuntimeError,i,"spatial array has wrong size"); return 0;
|
|---|
| 2991 | }
|
|---|
| 2992 | return 1;
|
|---|
| 2993 | }
|
|---|
| 2994 |
|
|---|
| 2995 | static int check_spectral(int i, PyObject *a, int size) {
|
|---|
| 2996 | if (!PyArray_Check(a)) {
|
|---|
| 2997 | throw_exception(SWIG_RuntimeError,i,msg_numpy_arr); return 0;
|
|---|
| 2998 | }
|
|---|
| 2999 | if (PyArray_TYPE(a) != PyArray_CDOUBLE) {
|
|---|
| 3000 | throw_exception(SWIG_RuntimeError,i,"spectral array must consist of complex float. Create with: 'sh.spec_array()'"); return 0;
|
|---|
| 3001 | }
|
|---|
| 3002 | if (!PyArray_ISCONTIGUOUS(a)) {
|
|---|
| 3003 | throw_exception(SWIG_RuntimeError,i,"spactral array not contiguous. Use .copy() to copy to a contiguous array."); return 0;
|
|---|
| 3004 | }
|
|---|
| 3005 | if (PyArray_SIZE(a) != size) {
|
|---|
| 3006 | throw_exception(SWIG_RuntimeError,i,"spectral array has wrong size"); return 0;
|
|---|
| 3007 | }
|
|---|
| 3008 | return 1;
|
|---|
| 3009 | }
|
|---|
| 3010 |
|
|---|
| 3011 | inline PyObject* SpecArray_New(int size) {
|
|---|
| 3012 | npy_intp dims = size;
|
|---|
| 3013 | npy_intp strides = sizeof(cplx);
|
|---|
| 3014 | return PyArray_New(&PyArray_Type, 1, &dims, PyArray_CDOUBLE, &strides, NULL, strides, 0, NULL);
|
|---|
| 3015 | }
|
|---|
| 3016 |
|
|---|
| 3017 | inline PyObject* SpatArray_New(int size) {
|
|---|
| 3018 | npy_intp dims = size;
|
|---|
| 3019 | npy_intp strides = sizeof(double);
|
|---|
| 3020 | return PyArray_New(&PyArray_Type, 1, &dims, PyArray_DOUBLE, &strides, NULL, strides, 0, NULL);
|
|---|
| 3021 | }
|
|---|
| 3022 |
|
|---|
| 3023 |
|
|---|
| 3024 |
|
|---|
| 3025 | SWIGINTERNINLINE PyObject*
|
|---|
| 3026 | SWIG_From_int (int value)
|
|---|
| 3027 | {
|
|---|
| 3028 | return PyInt_FromLong((long) value);
|
|---|
| 3029 | }
|
|---|
| 3030 |
|
|---|
| 3031 |
|
|---|
| 3032 | SWIGINTERNINLINE PyObject*
|
|---|
| 3033 | SWIG_From_unsigned_SS_int (unsigned int value)
|
|---|
| 3034 | {
|
|---|
| 3035 | return PyInt_FromSize_t((size_t) value);
|
|---|
| 3036 | }
|
|---|
| 3037 |
|
|---|
| 3038 |
|
|---|
| 3039 | #define SWIG_From_long PyLong_FromLong
|
|---|
| 3040 |
|
|---|
| 3041 |
|
|---|
| 3042 | SWIGINTERNINLINE PyObject*
|
|---|
| 3043 | SWIG_From_unsigned_SS_long (unsigned long value)
|
|---|
| 3044 | {
|
|---|
| 3045 | return (value > LONG_MAX) ?
|
|---|
| 3046 | PyLong_FromUnsignedLong(value) : PyLong_FromLong((long)(value));
|
|---|
| 3047 | }
|
|---|
| 3048 |
|
|---|
| 3049 |
|
|---|
| 3050 | SWIGINTERNINLINE PyObject *
|
|---|
| 3051 | SWIG_From_unsigned_SS_short (unsigned short value)
|
|---|
| 3052 | {
|
|---|
| 3053 | return SWIG_From_unsigned_SS_long (value);
|
|---|
| 3054 | }
|
|---|
| 3055 |
|
|---|
| 3056 |
|
|---|
| 3057 | #include <limits.h>
|
|---|
| 3058 | #if !defined(SWIG_NO_LLONG_MAX)
|
|---|
| 3059 | # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
|
|---|
| 3060 | # define LLONG_MAX __LONG_LONG_MAX__
|
|---|
| 3061 | # define LLONG_MIN (-LLONG_MAX - 1LL)
|
|---|
| 3062 | # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
|
|---|
| 3063 | # endif
|
|---|
| 3064 | #endif
|
|---|
| 3065 |
|
|---|
| 3066 |
|
|---|
| 3067 | SWIGINTERN int
|
|---|
| 3068 | SWIG_AsVal_double (PyObject *obj, double *val)
|
|---|
| 3069 | {
|
|---|
| 3070 | int res = SWIG_TypeError;
|
|---|
| 3071 | if (PyFloat_Check(obj)) {
|
|---|
| 3072 | if (val) *val = PyFloat_AsDouble(obj);
|
|---|
| 3073 | return SWIG_OK;
|
|---|
| 3074 | } else if (PyInt_Check(obj)) {
|
|---|
| 3075 | if (val) *val = PyInt_AsLong(obj);
|
|---|
| 3076 | return SWIG_OK;
|
|---|
| 3077 | } else if (PyLong_Check(obj)) {
|
|---|
| 3078 | double v = PyLong_AsDouble(obj);
|
|---|
| 3079 | if (!PyErr_Occurred()) {
|
|---|
| 3080 | if (val) *val = v;
|
|---|
| 3081 | return SWIG_OK;
|
|---|
| 3082 | } else {
|
|---|
| 3083 | PyErr_Clear();
|
|---|
| 3084 | }
|
|---|
| 3085 | }
|
|---|
| 3086 | #ifdef SWIG_PYTHON_CAST_MODE
|
|---|
| 3087 | {
|
|---|
| 3088 | int dispatch = 0;
|
|---|
| 3089 | double d = PyFloat_AsDouble(obj);
|
|---|
| 3090 | if (!PyErr_Occurred()) {
|
|---|
| 3091 | if (val) *val = d;
|
|---|
| 3092 | return SWIG_AddCast(SWIG_OK);
|
|---|
| 3093 | } else {
|
|---|
| 3094 | PyErr_Clear();
|
|---|
| 3095 | }
|
|---|
| 3096 | if (!dispatch) {
|
|---|
| 3097 | long v = PyLong_AsLong(obj);
|
|---|
| 3098 | if (!PyErr_Occurred()) {
|
|---|
| 3099 | if (val) *val = v;
|
|---|
| 3100 | return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
|
|---|
| 3101 | } else {
|
|---|
| 3102 | PyErr_Clear();
|
|---|
| 3103 | }
|
|---|
| 3104 | }
|
|---|
| 3105 | }
|
|---|
| 3106 | #endif
|
|---|
| 3107 | return res;
|
|---|
| 3108 | }
|
|---|
| 3109 |
|
|---|
| 3110 |
|
|---|
| 3111 | #include <float.h>
|
|---|
| 3112 |
|
|---|
| 3113 |
|
|---|
| 3114 | #include <math.h>
|
|---|
| 3115 |
|
|---|
| 3116 |
|
|---|
| 3117 | SWIGINTERNINLINE int
|
|---|
| 3118 | SWIG_CanCastAsInteger(double *d, double min, double max) {
|
|---|
| 3119 | double x = *d;
|
|---|
| 3120 | if ((min <= x && x <= max)) {
|
|---|
| 3121 | double fx = floor(x);
|
|---|
| 3122 | double cx = ceil(x);
|
|---|
| 3123 | double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
|
|---|
| 3124 | if ((errno == EDOM) || (errno == ERANGE)) {
|
|---|
| 3125 | errno = 0;
|
|---|
| 3126 | } else {
|
|---|
| 3127 | double summ, reps, diff;
|
|---|
| 3128 | if (rd < x) {
|
|---|
| 3129 | diff = x - rd;
|
|---|
| 3130 | } else if (rd > x) {
|
|---|
| 3131 | diff = rd - x;
|
|---|
| 3132 | } else {
|
|---|
| 3133 | return 1;
|
|---|
| 3134 | }
|
|---|
| 3135 | summ = rd + x;
|
|---|
| 3136 | reps = diff/summ;
|
|---|
| 3137 | if (reps < 8*DBL_EPSILON) {
|
|---|
| 3138 | *d = rd;
|
|---|
| 3139 | return 1;
|
|---|
| 3140 | }
|
|---|
| 3141 | }
|
|---|
| 3142 | }
|
|---|
| 3143 | return 0;
|
|---|
| 3144 | }
|
|---|
| 3145 |
|
|---|
| 3146 |
|
|---|
| 3147 | SWIGINTERN int
|
|---|
| 3148 | SWIG_AsVal_long (PyObject *obj, long* val)
|
|---|
| 3149 | {
|
|---|
| 3150 | if (PyInt_Check(obj)) {
|
|---|
| 3151 | if (val) *val = PyInt_AsLong(obj);
|
|---|
| 3152 | return SWIG_OK;
|
|---|
| 3153 | } else if (PyLong_Check(obj)) {
|
|---|
| 3154 | long v = PyLong_AsLong(obj);
|
|---|
| 3155 | if (!PyErr_Occurred()) {
|
|---|
| 3156 | if (val) *val = v;
|
|---|
| 3157 | return SWIG_OK;
|
|---|
| 3158 | } else {
|
|---|
| 3159 | PyErr_Clear();
|
|---|
| 3160 | }
|
|---|
| 3161 | }
|
|---|
| 3162 | #ifdef SWIG_PYTHON_CAST_MODE
|
|---|
| 3163 | {
|
|---|
| 3164 | int dispatch = 0;
|
|---|
| 3165 | long v = PyInt_AsLong(obj);
|
|---|
| 3166 | if (!PyErr_Occurred()) {
|
|---|
| 3167 | if (val) *val = v;
|
|---|
| 3168 | return SWIG_AddCast(SWIG_OK);
|
|---|
| 3169 | } else {
|
|---|
| 3170 | PyErr_Clear();
|
|---|
| 3171 | }
|
|---|
| 3172 | if (!dispatch) {
|
|---|
| 3173 | double d;
|
|---|
| 3174 | int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
|
|---|
| 3175 | if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
|
|---|
| 3176 | if (val) *val = (long)(d);
|
|---|
| 3177 | return res;
|
|---|
| 3178 | }
|
|---|
| 3179 | }
|
|---|
| 3180 | }
|
|---|
| 3181 | #endif
|
|---|
| 3182 | return SWIG_TypeError;
|
|---|
| 3183 | }
|
|---|
| 3184 |
|
|---|
| 3185 |
|
|---|
| 3186 | SWIGINTERN int
|
|---|
| 3187 | SWIG_AsVal_int (PyObject * obj, int *val)
|
|---|
| 3188 | {
|
|---|
| 3189 | long v;
|
|---|
| 3190 | int res = SWIG_AsVal_long (obj, &v);
|
|---|
| 3191 | if (SWIG_IsOK(res)) {
|
|---|
| 3192 | if ((v < INT_MIN || v > INT_MAX)) {
|
|---|
| 3193 | return SWIG_OverflowError;
|
|---|
| 3194 | } else {
|
|---|
| 3195 | if (val) *val = (int)(v);
|
|---|
| 3196 | }
|
|---|
| 3197 | }
|
|---|
| 3198 | return res;
|
|---|
| 3199 | }
|
|---|
| 3200 |
|
|---|
| 3201 | SWIGINTERN struct shtns_info *new_shtns_info(int lmax,int mmax,int mres,int norm,int nthreads){ // default arguments : mmax, mres and norm
|
|---|
| 3202 | if (lmax < 2) {
|
|---|
| 3203 | throw_exception(SWIG_ValueError,1,"lmax < 2 not allowed"); return NULL;
|
|---|
| 3204 | }
|
|---|
| 3205 | if (mres <= 0) {
|
|---|
| 3206 | throw_exception(SWIG_ValueError,3,"mres <= 0 invalid"); return NULL;
|
|---|
| 3207 | }
|
|---|
| 3208 | if (mmax < 0) mmax = lmax/mres; // default mmax
|
|---|
| 3209 | if (mmax*mres > lmax) {
|
|---|
| 3210 | throw_exception(SWIG_ValueError,1,"lmax < mmax*mres invalid"); return NULL;
|
|---|
| 3211 | }
|
|---|
| 3212 | shtns_use_threads(nthreads); // use nthreads openmp threads if available (0 means auto)
|
|---|
| 3213 | return shtns_create(lmax, mmax, mres, norm);
|
|---|
| 3214 | }
|
|---|
| 3215 | SWIGINTERN void delete_shtns_info(struct shtns_info *self){
|
|---|
| 3216 | shtns_destroy(self); // free memory.
|
|---|
| 3217 | }
|
|---|
| 3218 | SWIGINTERN void shtns_info_set_grid(struct shtns_info *self,int nlat,int nphi,int flags,double polar_opt,int nl_order,int *nlat_out,int *nphi_out){ // default arguments
|
|---|
| 3219 | if (nlat != 0) {
|
|---|
| 3220 | if (nlat <= self->lmax) { // nlat too small
|
|---|
| 3221 | throw_exception(SWIG_ValueError,1,"nlat <= lmax"); return;
|
|---|
| 3222 | }
|
|---|
| 3223 | if (nlat & 1) { // nlat must be even
|
|---|
| 3224 | throw_exception(SWIG_ValueError,1,"nlat must be even"); return;
|
|---|
| 3225 | }
|
|---|
| 3226 | }
|
|---|
| 3227 | if ((nphi != 0) && (nphi <= self->mmax *2)) { // nphi too small
|
|---|
| 3228 | throw_exception(SWIG_ValueError,2,"nphi <= 2*mmax"); return;
|
|---|
| 3229 | }
|
|---|
| 3230 | if (!(flags & 256)) flags |= (256*2); // default to SHT_PHI_CONTIGUOUS.
|
|---|
| 3231 | *nlat_out = nlat; *nphi_out = nphi;
|
|---|
| 3232 | shtns_set_grid_auto(self, flags, polar_opt, nl_order, nlat_out, nphi_out);
|
|---|
| 3233 | }
|
|---|
| 3234 | SWIGINTERN void shtns_info_print_info(struct shtns_info *self){
|
|---|
| 3235 | shtns_print_cfg(self);
|
|---|
| 3236 | }
|
|---|
| 3237 | SWIGINTERN double shtns_info_sh00_1(struct shtns_info *self){
|
|---|
| 3238 | return sh00_1(self);
|
|---|
| 3239 | }
|
|---|
| 3240 |
|
|---|
| 3241 | #define SWIG_From_double PyFloat_FromDouble
|
|---|
| 3242 |
|
|---|
| 3243 | SWIGINTERN double shtns_info_sh10_ct(struct shtns_info *self){
|
|---|
| 3244 | return sh10_ct(self);
|
|---|
| 3245 | }
|
|---|
| 3246 | SWIGINTERN double shtns_info_sh11_st(struct shtns_info *self){
|
|---|
| 3247 | return sh11_st(self);
|
|---|
| 3248 | }
|
|---|
| 3249 |
|
|---|
| 3250 | SWIGINTERN int
|
|---|
| 3251 | SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
|
|---|
| 3252 | {
|
|---|
| 3253 | #if PY_VERSION_HEX < 0x03000000
|
|---|
| 3254 | if (PyInt_Check(obj)) {
|
|---|
| 3255 | long v = PyInt_AsLong(obj);
|
|---|
| 3256 | if (v >= 0) {
|
|---|
| 3257 | if (val) *val = v;
|
|---|
| 3258 | return SWIG_OK;
|
|---|
| 3259 | } else {
|
|---|
| 3260 | return SWIG_OverflowError;
|
|---|
| 3261 | }
|
|---|
| 3262 | } else
|
|---|
| 3263 | #endif
|
|---|
| 3264 | if (PyLong_Check(obj)) {
|
|---|
| 3265 | unsigned long v = PyLong_AsUnsignedLong(obj);
|
|---|
| 3266 | if (!PyErr_Occurred()) {
|
|---|
| 3267 | if (val) *val = v;
|
|---|
| 3268 | return SWIG_OK;
|
|---|
| 3269 | } else {
|
|---|
| 3270 | PyErr_Clear();
|
|---|
| 3271 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 3272 | {
|
|---|
| 3273 | long v = PyLong_AsLong(obj);
|
|---|
| 3274 | if (!PyErr_Occurred()) {
|
|---|
| 3275 | if (v < 0) {
|
|---|
| 3276 | return SWIG_OverflowError;
|
|---|
| 3277 | }
|
|---|
| 3278 | } else {
|
|---|
| 3279 | PyErr_Clear();
|
|---|
| 3280 | }
|
|---|
| 3281 | }
|
|---|
| 3282 | #endif
|
|---|
| 3283 | }
|
|---|
| 3284 | }
|
|---|
| 3285 | #ifdef SWIG_PYTHON_CAST_MODE
|
|---|
| 3286 | {
|
|---|
| 3287 | int dispatch = 0;
|
|---|
| 3288 | unsigned long v = PyLong_AsUnsignedLong(obj);
|
|---|
| 3289 | if (!PyErr_Occurred()) {
|
|---|
| 3290 | if (val) *val = v;
|
|---|
| 3291 | return SWIG_AddCast(SWIG_OK);
|
|---|
| 3292 | } else {
|
|---|
| 3293 | PyErr_Clear();
|
|---|
| 3294 | }
|
|---|
| 3295 | if (!dispatch) {
|
|---|
| 3296 | double d;
|
|---|
| 3297 | int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
|
|---|
| 3298 | if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
|
|---|
| 3299 | if (val) *val = (unsigned long)(d);
|
|---|
| 3300 | return res;
|
|---|
| 3301 | }
|
|---|
| 3302 | }
|
|---|
| 3303 | }
|
|---|
| 3304 | #endif
|
|---|
| 3305 | return SWIG_TypeError;
|
|---|
| 3306 | }
|
|---|
| 3307 |
|
|---|
| 3308 |
|
|---|
| 3309 | SWIGINTERN int
|
|---|
| 3310 | SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
|
|---|
| 3311 | {
|
|---|
| 3312 | unsigned long v;
|
|---|
| 3313 | int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
|
|---|
| 3314 | if (SWIG_IsOK(res)) {
|
|---|
| 3315 | if ((v > UINT_MAX)) {
|
|---|
| 3316 | return SWIG_OverflowError;
|
|---|
| 3317 | } else {
|
|---|
| 3318 | if (val) *val = (unsigned int)(v);
|
|---|
| 3319 | }
|
|---|
| 3320 | }
|
|---|
| 3321 | return res;
|
|---|
| 3322 | }
|
|---|
| 3323 |
|
|---|
| 3324 | SWIGINTERN double shtns_info_shlm_e1(struct shtns_info *self,unsigned int l,unsigned int m){
|
|---|
| 3325 | return shlm_e1(self, l, m);
|
|---|
| 3326 | }
|
|---|
| 3327 | SWIGINTERN PyObject *shtns_info___ct(struct shtns_info *self){ // grid must have been initialized.
|
|---|
| 3328 | PyObject *obj;
|
|---|
| 3329 | double *ct;
|
|---|
| 3330 | int i;
|
|---|
| 3331 | if (self->nlat == 0) { // no grid
|
|---|
| 3332 | throw_exception(SWIG_RuntimeError,0,msg_grid_err);
|
|---|
| 3333 | return NULL;
|
|---|
| 3334 | }
|
|---|
| 3335 | obj = SpatArray_New(self->nlat);
|
|---|
| 3336 | ct = (double*) PyArray_DATA(obj);
|
|---|
| 3337 | for (i=0; i<self->nlat; i++) ct[i] = self->ct[i]; // copy
|
|---|
| 3338 | return obj;
|
|---|
| 3339 | }
|
|---|
| 3340 | SWIGINTERN PyObject *shtns_info_gauss_wts(struct shtns_info *self){ // gauss grid must have been initialized.
|
|---|
| 3341 | PyObject *obj;
|
|---|
| 3342 | if (self->nlat == 0) { // no grid
|
|---|
| 3343 | throw_exception(SWIG_RuntimeError,0,msg_grid_err);
|
|---|
| 3344 | return NULL;
|
|---|
| 3345 | }
|
|---|
| 3346 | if (self->wg == NULL) {
|
|---|
| 3347 | throw_exception(SWIG_RuntimeError,0,"not a gauss grid");
|
|---|
| 3348 | return NULL;
|
|---|
| 3349 | }
|
|---|
| 3350 | obj = SpatArray_New(self->nlat_2);
|
|---|
| 3351 | shtns_gauss_wts(self, PyArray_DATA(obj));
|
|---|
| 3352 | return obj;
|
|---|
| 3353 | }
|
|---|
| 3354 | SWIGINTERN PyObject *shtns_info_mul_ct_matrix(struct shtns_info *self){
|
|---|
| 3355 | PyObject *mx = SpatArray_New(2*self->nlm);
|
|---|
| 3356 | mul_ct_matrix(self, PyArray_DATA(mx));
|
|---|
| 3357 | return mx;
|
|---|
| 3358 | }
|
|---|
| 3359 | SWIGINTERN PyObject *shtns_info_st_dt_matrix(struct shtns_info *self){
|
|---|
| 3360 | PyObject *mx = SpatArray_New(2*self->nlm);
|
|---|
| 3361 | st_dt_matrix(self, PyArray_DATA(mx));
|
|---|
| 3362 | return mx;
|
|---|
| 3363 | }
|
|---|
| 3364 | SWIGINTERN void shtns_info___spat_shape(struct shtns_info *self,int *dim0,int *dim1){
|
|---|
| 3365 | *dim0 = self->nphi; *dim1 = self->nlat;
|
|---|
| 3366 | if (self->fftc_mode == 1) { // phi-contiguous
|
|---|
| 3367 | *dim0 = self->nlat; *dim1 = self->nphi;
|
|---|
| 3368 | }
|
|---|
| 3369 | }
|
|---|
| 3370 | SWIGINTERN int shtns_info_idx(struct shtns_info *self,unsigned int l,unsigned int m){
|
|---|
| 3371 | if (l > self->lmax) {
|
|---|
| 3372 | throw_exception(SWIG_ValueError,1,"l invalid"); return 0;
|
|---|
| 3373 | }
|
|---|
| 3374 | if ( (m > l) || (m > self->mmax * self->mres) || (m % self->mres != 0) ) {
|
|---|
| 3375 | throw_exception(SWIG_ValueError,2,"m invalid"); return 0;
|
|---|
| 3376 | }
|
|---|
| 3377 | return ( self->lmidx[((unsigned)(m))/self->mres] + (l) );
|
|---|
| 3378 | }
|
|---|
| 3379 | SWIGINTERN void shtns_info_spat_to_SH(struct shtns_info *self,PyObject *Vr,PyObject *Qlm){
|
|---|
| 3380 | if (check_spatial(1,Vr, self->nspat) && check_spectral(2,Qlm, self->nlm))
|
|---|
| 3381 | spat_to_SH(self, PyArray_DATA(Vr), PyArray_DATA(Qlm));
|
|---|
| 3382 | }
|
|---|
| 3383 | SWIGINTERN void shtns_info_SH_to_spat(struct shtns_info *self,PyObject *Qlm,PyObject *Vr){
|
|---|
| 3384 | if (check_spatial(2,Vr, self->nspat) && check_spectral(1,Qlm, self->nlm))
|
|---|
| 3385 | SH_to_spat(self, PyArray_DATA(Qlm), PyArray_DATA(Vr));
|
|---|
| 3386 | }
|
|---|
| 3387 | SWIGINTERN void shtns_info_spat_cplx_to_SH(struct shtns_info *self,PyObject *z,PyObject *alm){
|
|---|
| 3388 | int n = self->lmax + 1;
|
|---|
| 3389 | if (check_spectral(1,z, self->nspat) && check_spectral(2,alm, n*n))
|
|---|
| 3390 | spat_cplx_to_SH(self, PyArray_DATA(z), PyArray_DATA(alm));
|
|---|
| 3391 | }
|
|---|
| 3392 | SWIGINTERN void shtns_info_SH_to_spat_cplx(struct shtns_info *self,PyObject *alm,PyObject *z){
|
|---|
| 3393 | int n = self->lmax + 1;
|
|---|
| 3394 | if (check_spectral(2,z, self->nspat) && check_spectral(1,alm, n*n))
|
|---|
| 3395 | SH_to_spat_cplx(self, PyArray_DATA(alm), PyArray_DATA(z));
|
|---|
| 3396 | }
|
|---|
| 3397 | SWIGINTERN void shtns_info_spat_to_SHsphtor(struct shtns_info *self,PyObject *Vt,PyObject *Vp,PyObject *Slm,PyObject *Tlm){
|
|---|
| 3398 | if (check_spatial(1,Vt, self->nspat) && check_spatial(2,Vp, self->nspat) && check_spectral(3,Slm, self->nlm) && check_spectral(4,Tlm, self->nlm))
|
|---|
| 3399 | spat_to_SHsphtor(self, PyArray_DATA(Vt), PyArray_DATA(Vp), PyArray_DATA(Slm), PyArray_DATA(Tlm));
|
|---|
| 3400 | }
|
|---|
| 3401 | SWIGINTERN void shtns_info_SHsphtor_to_spat(struct shtns_info *self,PyObject *Slm,PyObject *Tlm,PyObject *Vt,PyObject *Vp){
|
|---|
| 3402 | if (check_spatial(3,Vt, self->nspat) && check_spatial(4,Vp, self->nspat) && check_spectral(1,Slm, self->nlm) && check_spectral(2,Tlm, self->nlm))
|
|---|
| 3403 | SHsphtor_to_spat(self, PyArray_DATA(Slm), PyArray_DATA(Tlm), PyArray_DATA(Vt), PyArray_DATA(Vp));
|
|---|
| 3404 | }
|
|---|
| 3405 | SWIGINTERN void shtns_info_SHsph_to_spat(struct shtns_info *self,PyObject *Slm,PyObject *Vt,PyObject *Vp){
|
|---|
| 3406 | if (check_spatial(2,Vt, self->nspat) && check_spatial(3,Vp, self->nspat) && check_spectral(1,Slm, self->nlm))
|
|---|
| 3407 | SHsph_to_spat(self, PyArray_DATA(Slm), PyArray_DATA(Vt), PyArray_DATA(Vp));
|
|---|
| 3408 | }
|
|---|
| 3409 | SWIGINTERN void shtns_info_SHtor_to_spat(struct shtns_info *self,PyObject *Tlm,PyObject *Vt,PyObject *Vp){
|
|---|
| 3410 | if (check_spatial(2,Vt, self->nspat) && check_spatial(3,Vp, self->nspat) && check_spectral(1,Tlm, self->nlm))
|
|---|
| 3411 | SHtor_to_spat(self, PyArray_DATA(Tlm), PyArray_DATA(Vt), PyArray_DATA(Vp));
|
|---|
| 3412 | }
|
|---|
| 3413 | SWIGINTERN void shtns_info_spat_to_SHqst(struct shtns_info *self,PyObject *Vr,PyObject *Vt,PyObject *Vp,PyObject *Qlm,PyObject *Slm,PyObject *Tlm){
|
|---|
| 3414 | if (check_spatial(1,Vr, self->nspat) && check_spatial(2,Vt, self->nspat) && check_spatial(3,Vp, self->nspat)
|
|---|
| 3415 | && check_spectral(4,Qlm, self->nlm) && check_spectral(5,Slm, self->nlm) && check_spectral(6,Tlm, self->nlm))
|
|---|
| 3416 | spat_to_SHqst(self, PyArray_DATA(Vr), PyArray_DATA(Vt), PyArray_DATA(Vp), PyArray_DATA(Qlm), PyArray_DATA(Slm), PyArray_DATA(Tlm));
|
|---|
| 3417 | }
|
|---|
| 3418 | SWIGINTERN void shtns_info_SHqst_to_spat(struct shtns_info *self,PyObject *Qlm,PyObject *Slm,PyObject *Tlm,PyObject *Vr,PyObject *Vt,PyObject *Vp){
|
|---|
| 3419 | if (check_spatial(4,Vr, self->nspat) && check_spatial(5,Vt, self->nspat) && check_spatial(6,Vp, self->nspat)
|
|---|
| 3420 | && check_spectral(1,Qlm, self->nlm) && check_spectral(2,Slm, self->nlm) && check_spectral(3,Tlm, self->nlm))
|
|---|
| 3421 | SHqst_to_spat(self, PyArray_DATA(Qlm), PyArray_DATA(Slm), PyArray_DATA(Tlm), PyArray_DATA(Vr), PyArray_DATA(Vt), PyArray_DATA(Vp));
|
|---|
| 3422 | }
|
|---|
| 3423 | SWIGINTERN double shtns_info_SH_to_point(struct shtns_info *self,PyObject *Qlm,double cost,double phi){
|
|---|
| 3424 | if (check_spectral(1,Qlm, self->nlm)) return SH_to_point(self, PyArray_DATA(Qlm), cost, phi);
|
|---|
| 3425 | return 0.0;
|
|---|
| 3426 | }
|
|---|
| 3427 | SWIGINTERN void shtns_info_SH_to_grad_point(struct shtns_info *self,PyObject *DrSlm,PyObject *Slm,double cost,double phi,double *vr,double *vt,double *vp){
|
|---|
| 3428 | if (check_spectral(1,DrSlm, self->nlm) && check_spectral(2,Slm, self->nlm))
|
|---|
| 3429 | SH_to_grad_point(self, PyArray_DATA(DrSlm), PyArray_DATA(Slm), cost, phi, vr, vt, vp);
|
|---|
| 3430 | }
|
|---|
| 3431 | SWIGINTERN void shtns_info_SHqst_to_point(struct shtns_info *self,PyObject *Qlm,PyObject *Slm,PyObject *Tlm,double cost,double phi,double *vr,double *vt,double *vp){
|
|---|
| 3432 | if (check_spectral(1,Qlm, self->nlm) && check_spectral(2,Slm, self->nlm) && check_spectral(3,Tlm, self->nlm))
|
|---|
| 3433 | SHqst_to_point(self, PyArray_DATA(Qlm), PyArray_DATA(Slm), PyArray_DATA(Tlm), cost, phi, vr, vt, vp);
|
|---|
| 3434 | }
|
|---|
| 3435 | SWIGINTERN PyObject *shtns_info_Zrotate(struct shtns_info *self,PyObject *Qlm,double alpha){
|
|---|
| 3436 | if (check_spectral(1,Qlm, self->nlm)) {
|
|---|
| 3437 | PyObject *Rlm = SpecArray_New(self->nlm);
|
|---|
| 3438 | SH_Zrotate(self, PyArray_DATA(Qlm), alpha, PyArray_DATA(Rlm));
|
|---|
| 3439 | return Rlm;
|
|---|
| 3440 | }
|
|---|
| 3441 | return NULL;
|
|---|
| 3442 | }
|
|---|
| 3443 | SWIGINTERN PyObject *shtns_info_Yrotate(struct shtns_info *self,PyObject *Qlm,double alpha){
|
|---|
| 3444 | if ((self->mres != 1)||(self->mmax != self->lmax)) {
|
|---|
| 3445 | throw_exception(SWIG_RuntimeError,0,msg_rot_err); return NULL;
|
|---|
| 3446 | }
|
|---|
| 3447 | if (check_spectral(1,Qlm, self->nlm)) {
|
|---|
| 3448 | PyObject *Rlm = SpecArray_New(self->nlm);
|
|---|
| 3449 | SH_Yrotate(self, PyArray_DATA(Qlm), alpha, PyArray_DATA(Rlm));
|
|---|
| 3450 | return Rlm;
|
|---|
| 3451 | }
|
|---|
| 3452 | return NULL;
|
|---|
| 3453 | }
|
|---|
| 3454 | SWIGINTERN PyObject *shtns_info_Yrotate90(struct shtns_info *self,PyObject *Qlm){
|
|---|
| 3455 | if ((self->mres != 1)||(self->mmax != self->lmax)) {
|
|---|
| 3456 | throw_exception(SWIG_RuntimeError,0,msg_rot_err); return NULL;
|
|---|
| 3457 | }
|
|---|
| 3458 | if (check_spectral(1,Qlm, self->nlm)) {
|
|---|
| 3459 | PyObject *Rlm = SpecArray_New(self->nlm);
|
|---|
| 3460 | SH_Yrotate90(self, PyArray_DATA(Qlm), PyArray_DATA(Rlm));
|
|---|
| 3461 | return Rlm;
|
|---|
| 3462 | }
|
|---|
| 3463 | return NULL;
|
|---|
| 3464 | }
|
|---|
| 3465 | SWIGINTERN PyObject *shtns_info_Xrotate90(struct shtns_info *self,PyObject *Qlm){
|
|---|
| 3466 | if ((self->mres != 1)||(self->mmax != self->lmax)) {
|
|---|
| 3467 | throw_exception(SWIG_RuntimeError,0,msg_rot_err); return NULL;
|
|---|
| 3468 | }
|
|---|
| 3469 | if (check_spectral(1,Qlm, self->nlm)) {
|
|---|
| 3470 | PyObject *Rlm = SpecArray_New(self->nlm);
|
|---|
| 3471 | SH_Xrotate90(self, PyArray_DATA(Qlm), PyArray_DATA(Rlm));
|
|---|
| 3472 | return Rlm;
|
|---|
| 3473 | }
|
|---|
| 3474 | return NULL;
|
|---|
| 3475 | }
|
|---|
| 3476 | SWIGINTERN PyObject *shtns_info_SH_mul_mx(struct shtns_info *self,PyObject *mx,PyObject *Qlm){
|
|---|
| 3477 | if (check_spectral(2,Qlm, self->nlm) && check_spatial(1, mx, 2* self->nlm)) {
|
|---|
| 3478 | PyObject *Rlm = SpecArray_New(self->nlm);
|
|---|
| 3479 | SH_mul_mx(self, PyArray_DATA(mx), PyArray_DATA(Qlm), PyArray_DATA(Rlm));
|
|---|
| 3480 | return Rlm;
|
|---|
| 3481 | }
|
|---|
| 3482 | return NULL;
|
|---|
| 3483 | }
|
|---|
| 3484 | SWIGINTERN void shtns_info_spat_to_SH_m(struct shtns_info *self,PyObject *Vr,PyObject *Qlm,PyObject *im){
|
|---|
| 3485 | int im_ = PyLong_AsLong(im); int ltr = self->lmax;
|
|---|
| 3486 | if ((im_ >= 0) && check_spectral(1,Vr, self->nlat) && check_spectral(2,Qlm, ltr+1 - im_*self->mres))
|
|---|
| 3487 | spat_to_SH_ml(self, im_, PyArray_DATA(Vr), PyArray_DATA(Qlm), ltr);
|
|---|
| 3488 | }
|
|---|
| 3489 | SWIGINTERN void shtns_info_SH_to_spat_m(struct shtns_info *self,PyObject *Qlm,PyObject *Vr,PyObject *im){
|
|---|
| 3490 | int im_ = PyLong_AsLong(im); int ltr = self->lmax;
|
|---|
| 3491 | if ((im_ >= 0) && check_spectral(2,Vr, self->nlat) && check_spectral(1,Qlm, ltr+1 - im_*self->mres))
|
|---|
| 3492 | SH_to_spat_ml(self, im_, PyArray_DATA(Qlm), PyArray_DATA(Vr), ltr);
|
|---|
| 3493 | }
|
|---|
| 3494 | SWIGINTERN void shtns_info_spat_to_SHsphtor_m(struct shtns_info *self,PyObject *Vt,PyObject *Vp,PyObject *Slm,PyObject *Tlm,PyObject *im){
|
|---|
| 3495 | int im_ = PyLong_AsLong(im); int ltr = self->lmax; int nelem = ltr+1 - im_*self->mres;
|
|---|
| 3496 | if ((im_ >= 0) && check_spectral(1,Vt, self->nlat) && check_spectral(2,Vp, self->nlat) && check_spectral(3,Slm, nelem) && check_spectral(4,Tlm, nelem))
|
|---|
| 3497 | spat_to_SHsphtor_ml(self, im_, PyArray_DATA(Vt), PyArray_DATA(Vp), PyArray_DATA(Slm), PyArray_DATA(Tlm), ltr);
|
|---|
| 3498 | }
|
|---|
| 3499 | SWIGINTERN void shtns_info_SHsphtor_to_spat_m(struct shtns_info *self,PyObject *Slm,PyObject *Tlm,PyObject *Vt,PyObject *Vp,PyObject *im){
|
|---|
| 3500 | int im_ = PyLong_AsLong(im); int ltr = self->lmax; int nelem = ltr+1 - im_*self->mres;
|
|---|
| 3501 | if ((im_ >= 0) && check_spectral(3,Vt, self->nlat) && check_spectral(4,Vp, self->nlat) && check_spectral(1,Slm, nelem) && check_spectral(2,Tlm, nelem))
|
|---|
| 3502 | SHsphtor_to_spat_ml(self, im_, PyArray_DATA(Slm), PyArray_DATA(Tlm), PyArray_DATA(Vt), PyArray_DATA(Vp), ltr);
|
|---|
| 3503 | }
|
|---|
| 3504 | SWIGINTERN void shtns_info_SHsph_to_spat_m(struct shtns_info *self,PyObject *Slm,PyObject *Vt,PyObject *Vp,PyObject *im){
|
|---|
| 3505 | int im_ = PyLong_AsLong(im); int ltr = self->lmax; int nelem = ltr+1 - im_*self->mres;
|
|---|
| 3506 | if ((im_ >= 0) && check_spectral(2,Vt, self->nlat) && check_spectral(3,Vp, self->nlat) && check_spectral(1,Slm, nelem))
|
|---|
| 3507 | SHsph_to_spat_ml(self, im_, PyArray_DATA(Slm), PyArray_DATA(Vt), PyArray_DATA(Vp), ltr);
|
|---|
| 3508 | }
|
|---|
| 3509 | SWIGINTERN void shtns_info_SHtor_to_spat_m(struct shtns_info *self,PyObject *Tlm,PyObject *Vt,PyObject *Vp,PyObject *im){
|
|---|
| 3510 | int im_ = PyLong_AsLong(im); int ltr = self->lmax; int nelem = ltr+1 - im_*self->mres;
|
|---|
| 3511 | if ((im_ >= 0) && check_spectral(2,Vt, self->nlat) && check_spectral(3,Vp, self->nlat) && check_spectral(1,Tlm, nelem))
|
|---|
| 3512 | SHtor_to_spat_ml(self, im_, PyArray_DATA(Tlm), PyArray_DATA(Vt), PyArray_DATA(Vp), ltr);
|
|---|
| 3513 | }
|
|---|
| 3514 | SWIGINTERN void shtns_info_spat_to_SHqst_m(struct shtns_info *self,PyObject *Vr,PyObject *Vt,PyObject *Vp,PyObject *Qlm,PyObject *Slm,PyObject *Tlm,PyObject *im){
|
|---|
| 3515 | int im_ = PyLong_AsLong(im); int ltr = self->lmax; int nelem = ltr+1 - im_*self->mres;
|
|---|
| 3516 | if ((im_ >= 0) && check_spectral(1,Vr, self->nlat) && check_spectral(2,Vt, self->nlat) && check_spectral(3,Vp, self->nlat)
|
|---|
| 3517 | && check_spectral(4,Qlm, nelem) && check_spectral(5,Slm, nelem) && check_spectral(6,Tlm, nelem))
|
|---|
| 3518 | spat_to_SHqst_ml(self, im_, PyArray_DATA(Vr), PyArray_DATA(Vt), PyArray_DATA(Vp), PyArray_DATA(Qlm), PyArray_DATA(Slm), PyArray_DATA(Tlm), ltr);
|
|---|
| 3519 | }
|
|---|
| 3520 | SWIGINTERN void shtns_info_SHqst_to_spat_m(struct shtns_info *self,PyObject *Qlm,PyObject *Slm,PyObject *Tlm,PyObject *Vr,PyObject *Vt,PyObject *Vp,PyObject *im){
|
|---|
| 3521 | int im_ = PyLong_AsLong(im); int ltr = self->lmax; int nelem = ltr+1 - im_*self->mres;
|
|---|
| 3522 | if ((im_ >= 0) && check_spectral(4,Vr, self->nlat) && check_spectral(5,Vt, self->nlat) && check_spectral(6,Vp, self->nlat)
|
|---|
| 3523 | && check_spectral(1,Qlm, nelem) && check_spectral(2,Slm, nelem) && check_spectral(3,Tlm, nelem))
|
|---|
| 3524 | SHqst_to_spat_ml(self, im_, PyArray_DATA(Qlm), PyArray_DATA(Slm), PyArray_DATA(Tlm), PyArray_DATA(Vr), PyArray_DATA(Vt), PyArray_DATA(Vp), ltr);
|
|---|
| 3525 | }
|
|---|
| 3526 | #ifdef __cplusplus
|
|---|
| 3527 | extern "C" {
|
|---|
| 3528 | #endif
|
|---|
| 3529 | SWIGINTERN PyObject *sht_orthonormal_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3530 | PyObject *module;
|
|---|
| 3531 | PyObject *d;
|
|---|
| 3532 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3533 | d = PyModule_GetDict(module);
|
|---|
| 3534 | if (!d) return NULL;
|
|---|
| 3535 | SWIG_Python_SetConstant(d, "sht_orthonormal",SWIG_From_int((int)(sht_orthonormal)));
|
|---|
| 3536 | return SWIG_Py_Void();
|
|---|
| 3537 | }
|
|---|
| 3538 |
|
|---|
| 3539 |
|
|---|
| 3540 | SWIGINTERN PyObject *sht_fourpi_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3541 | PyObject *module;
|
|---|
| 3542 | PyObject *d;
|
|---|
| 3543 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3544 | d = PyModule_GetDict(module);
|
|---|
| 3545 | if (!d) return NULL;
|
|---|
| 3546 | SWIG_Python_SetConstant(d, "sht_fourpi",SWIG_From_int((int)(sht_fourpi)));
|
|---|
| 3547 | return SWIG_Py_Void();
|
|---|
| 3548 | }
|
|---|
| 3549 |
|
|---|
| 3550 |
|
|---|
| 3551 | SWIGINTERN PyObject *sht_schmidt_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3552 | PyObject *module;
|
|---|
| 3553 | PyObject *d;
|
|---|
| 3554 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3555 | d = PyModule_GetDict(module);
|
|---|
| 3556 | if (!d) return NULL;
|
|---|
| 3557 | SWIG_Python_SetConstant(d, "sht_schmidt",SWIG_From_int((int)(sht_schmidt)));
|
|---|
| 3558 | return SWIG_Py_Void();
|
|---|
| 3559 | }
|
|---|
| 3560 |
|
|---|
| 3561 |
|
|---|
| 3562 | SWIGINTERN PyObject *SHT_NO_CS_PHASE_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3563 | PyObject *module;
|
|---|
| 3564 | PyObject *d;
|
|---|
| 3565 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3566 | d = PyModule_GetDict(module);
|
|---|
| 3567 | if (!d) return NULL;
|
|---|
| 3568 | SWIG_Python_SetConstant(d, "SHT_NO_CS_PHASE",SWIG_From_int((int)((256*4))));
|
|---|
| 3569 | return SWIG_Py_Void();
|
|---|
| 3570 | }
|
|---|
| 3571 |
|
|---|
| 3572 |
|
|---|
| 3573 | SWIGINTERN PyObject *SHT_REAL_NORM_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3574 | PyObject *module;
|
|---|
| 3575 | PyObject *d;
|
|---|
| 3576 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3577 | d = PyModule_GetDict(module);
|
|---|
| 3578 | if (!d) return NULL;
|
|---|
| 3579 | SWIG_Python_SetConstant(d, "SHT_REAL_NORM",SWIG_From_int((int)((256*8))));
|
|---|
| 3580 | return SWIG_Py_Void();
|
|---|
| 3581 | }
|
|---|
| 3582 |
|
|---|
| 3583 |
|
|---|
| 3584 | SWIGINTERN PyObject *sht_gauss_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3585 | PyObject *module;
|
|---|
| 3586 | PyObject *d;
|
|---|
| 3587 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3588 | d = PyModule_GetDict(module);
|
|---|
| 3589 | if (!d) return NULL;
|
|---|
| 3590 | SWIG_Python_SetConstant(d, "sht_gauss",SWIG_From_int((int)(sht_gauss)));
|
|---|
| 3591 | return SWIG_Py_Void();
|
|---|
| 3592 | }
|
|---|
| 3593 |
|
|---|
| 3594 |
|
|---|
| 3595 | SWIGINTERN PyObject *sht_auto_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3596 | PyObject *module;
|
|---|
| 3597 | PyObject *d;
|
|---|
| 3598 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3599 | d = PyModule_GetDict(module);
|
|---|
| 3600 | if (!d) return NULL;
|
|---|
| 3601 | SWIG_Python_SetConstant(d, "sht_auto",SWIG_From_int((int)(sht_auto)));
|
|---|
| 3602 | return SWIG_Py_Void();
|
|---|
| 3603 | }
|
|---|
| 3604 |
|
|---|
| 3605 |
|
|---|
| 3606 | SWIGINTERN PyObject *sht_reg_fast_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3607 | PyObject *module;
|
|---|
| 3608 | PyObject *d;
|
|---|
| 3609 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3610 | d = PyModule_GetDict(module);
|
|---|
| 3611 | if (!d) return NULL;
|
|---|
| 3612 | SWIG_Python_SetConstant(d, "sht_reg_fast",SWIG_From_int((int)(sht_reg_fast)));
|
|---|
| 3613 | return SWIG_Py_Void();
|
|---|
| 3614 | }
|
|---|
| 3615 |
|
|---|
| 3616 |
|
|---|
| 3617 | SWIGINTERN PyObject *sht_reg_dct_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3618 | PyObject *module;
|
|---|
| 3619 | PyObject *d;
|
|---|
| 3620 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3621 | d = PyModule_GetDict(module);
|
|---|
| 3622 | if (!d) return NULL;
|
|---|
| 3623 | SWIG_Python_SetConstant(d, "sht_reg_dct",SWIG_From_int((int)(sht_reg_dct)));
|
|---|
| 3624 | return SWIG_Py_Void();
|
|---|
| 3625 | }
|
|---|
| 3626 |
|
|---|
| 3627 |
|
|---|
| 3628 | SWIGINTERN PyObject *sht_quick_init_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3629 | PyObject *module;
|
|---|
| 3630 | PyObject *d;
|
|---|
| 3631 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3632 | d = PyModule_GetDict(module);
|
|---|
| 3633 | if (!d) return NULL;
|
|---|
| 3634 | SWIG_Python_SetConstant(d, "sht_quick_init",SWIG_From_int((int)(sht_quick_init)));
|
|---|
| 3635 | return SWIG_Py_Void();
|
|---|
| 3636 | }
|
|---|
| 3637 |
|
|---|
| 3638 |
|
|---|
| 3639 | SWIGINTERN PyObject *sht_reg_poles_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3640 | PyObject *module;
|
|---|
| 3641 | PyObject *d;
|
|---|
| 3642 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3643 | d = PyModule_GetDict(module);
|
|---|
| 3644 | if (!d) return NULL;
|
|---|
| 3645 | SWIG_Python_SetConstant(d, "sht_reg_poles",SWIG_From_int((int)(sht_reg_poles)));
|
|---|
| 3646 | return SWIG_Py_Void();
|
|---|
| 3647 | }
|
|---|
| 3648 |
|
|---|
| 3649 |
|
|---|
| 3650 | SWIGINTERN PyObject *sht_gauss_fly_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3651 | PyObject *module;
|
|---|
| 3652 | PyObject *d;
|
|---|
| 3653 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3654 | d = PyModule_GetDict(module);
|
|---|
| 3655 | if (!d) return NULL;
|
|---|
| 3656 | SWIG_Python_SetConstant(d, "sht_gauss_fly",SWIG_From_int((int)(sht_gauss_fly)));
|
|---|
| 3657 | return SWIG_Py_Void();
|
|---|
| 3658 | }
|
|---|
| 3659 |
|
|---|
| 3660 |
|
|---|
| 3661 | SWIGINTERN PyObject *SHT_THETA_CONTIGUOUS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3662 | PyObject *module;
|
|---|
| 3663 | PyObject *d;
|
|---|
| 3664 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3665 | d = PyModule_GetDict(module);
|
|---|
| 3666 | if (!d) return NULL;
|
|---|
| 3667 | SWIG_Python_SetConstant(d, "SHT_THETA_CONTIGUOUS",SWIG_From_int((int)(256)));
|
|---|
| 3668 | return SWIG_Py_Void();
|
|---|
| 3669 | }
|
|---|
| 3670 |
|
|---|
| 3671 |
|
|---|
| 3672 | SWIGINTERN PyObject *SHT_PHI_CONTIGUOUS_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3673 | PyObject *module;
|
|---|
| 3674 | PyObject *d;
|
|---|
| 3675 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3676 | d = PyModule_GetDict(module);
|
|---|
| 3677 | if (!d) return NULL;
|
|---|
| 3678 | SWIG_Python_SetConstant(d, "SHT_PHI_CONTIGUOUS",SWIG_From_int((int)((256*2))));
|
|---|
| 3679 | return SWIG_Py_Void();
|
|---|
| 3680 | }
|
|---|
| 3681 |
|
|---|
| 3682 |
|
|---|
| 3683 | SWIGINTERN PyObject *SHT_SOUTH_POLE_FIRST_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3684 | PyObject *module;
|
|---|
| 3685 | PyObject *d;
|
|---|
| 3686 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3687 | d = PyModule_GetDict(module);
|
|---|
| 3688 | if (!d) return NULL;
|
|---|
| 3689 | SWIG_Python_SetConstant(d, "SHT_SOUTH_POLE_FIRST",SWIG_From_int((int)((256*32))));
|
|---|
| 3690 | return SWIG_Py_Void();
|
|---|
| 3691 | }
|
|---|
| 3692 |
|
|---|
| 3693 |
|
|---|
| 3694 | SWIGINTERN PyObject *SHT_SCALAR_ONLY_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3695 | PyObject *module;
|
|---|
| 3696 | PyObject *d;
|
|---|
| 3697 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3698 | d = PyModule_GetDict(module);
|
|---|
| 3699 | if (!d) return NULL;
|
|---|
| 3700 | SWIG_Python_SetConstant(d, "SHT_SCALAR_ONLY",SWIG_From_int((int)((256*16))));
|
|---|
| 3701 | return SWIG_Py_Void();
|
|---|
| 3702 | }
|
|---|
| 3703 |
|
|---|
| 3704 |
|
|---|
| 3705 | SWIGINTERN PyObject *SHT_LOAD_SAVE_CFG_swigconstant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3706 | PyObject *module;
|
|---|
| 3707 | PyObject *d;
|
|---|
| 3708 | if (!PyArg_ParseTuple(args,(char*)"O:swigconstant", &module)) return NULL;
|
|---|
| 3709 | d = PyModule_GetDict(module);
|
|---|
| 3710 | if (!d) return NULL;
|
|---|
| 3711 | SWIG_Python_SetConstant(d, "SHT_LOAD_SAVE_CFG",SWIG_From_int((int)((256*64))));
|
|---|
| 3712 | return SWIG_Py_Void();
|
|---|
| 3713 | }
|
|---|
| 3714 |
|
|---|
| 3715 |
|
|---|
| 3716 | SWIGINTERN PyObject *_wrap_sht_nlm_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3717 | PyObject *resultobj = 0;
|
|---|
| 3718 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 3719 | void *argp1 = 0 ;
|
|---|
| 3720 | int res1 = 0 ;
|
|---|
| 3721 | PyObject * obj0 = 0 ;
|
|---|
| 3722 | unsigned int result;
|
|---|
| 3723 |
|
|---|
| 3724 | if (!PyArg_ParseTuple(args,(char *)"O:sht_nlm_get",&obj0)) SWIG_fail;
|
|---|
| 3725 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 3726 | if (!SWIG_IsOK(res1)) {
|
|---|
| 3727 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_nlm_get" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 3728 | }
|
|---|
| 3729 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 3730 | result = (unsigned int)(unsigned int) ((arg1)->nlm);
|
|---|
| 3731 | resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
|
|---|
| 3732 | return resultobj;
|
|---|
| 3733 | fail:
|
|---|
| 3734 | return NULL;
|
|---|
| 3735 | }
|
|---|
| 3736 |
|
|---|
| 3737 |
|
|---|
| 3738 | SWIGINTERN PyObject *_wrap_sht_lmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3739 | PyObject *resultobj = 0;
|
|---|
| 3740 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 3741 | void *argp1 = 0 ;
|
|---|
| 3742 | int res1 = 0 ;
|
|---|
| 3743 | PyObject * obj0 = 0 ;
|
|---|
| 3744 | unsigned short result;
|
|---|
| 3745 |
|
|---|
| 3746 | if (!PyArg_ParseTuple(args,(char *)"O:sht_lmax_get",&obj0)) SWIG_fail;
|
|---|
| 3747 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 3748 | if (!SWIG_IsOK(res1)) {
|
|---|
| 3749 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_lmax_get" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 3750 | }
|
|---|
| 3751 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 3752 | result = (unsigned short)(unsigned short) ((arg1)->lmax);
|
|---|
| 3753 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
|
|---|
| 3754 | return resultobj;
|
|---|
| 3755 | fail:
|
|---|
| 3756 | return NULL;
|
|---|
| 3757 | }
|
|---|
| 3758 |
|
|---|
| 3759 |
|
|---|
| 3760 | SWIGINTERN PyObject *_wrap_sht_mmax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3761 | PyObject *resultobj = 0;
|
|---|
| 3762 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 3763 | void *argp1 = 0 ;
|
|---|
| 3764 | int res1 = 0 ;
|
|---|
| 3765 | PyObject * obj0 = 0 ;
|
|---|
| 3766 | unsigned short result;
|
|---|
| 3767 |
|
|---|
| 3768 | if (!PyArg_ParseTuple(args,(char *)"O:sht_mmax_get",&obj0)) SWIG_fail;
|
|---|
| 3769 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 3770 | if (!SWIG_IsOK(res1)) {
|
|---|
| 3771 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_mmax_get" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 3772 | }
|
|---|
| 3773 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 3774 | result = (unsigned short)(unsigned short) ((arg1)->mmax);
|
|---|
| 3775 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
|
|---|
| 3776 | return resultobj;
|
|---|
| 3777 | fail:
|
|---|
| 3778 | return NULL;
|
|---|
| 3779 | }
|
|---|
| 3780 |
|
|---|
| 3781 |
|
|---|
| 3782 | SWIGINTERN PyObject *_wrap_sht_mres_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3783 | PyObject *resultobj = 0;
|
|---|
| 3784 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 3785 | void *argp1 = 0 ;
|
|---|
| 3786 | int res1 = 0 ;
|
|---|
| 3787 | PyObject * obj0 = 0 ;
|
|---|
| 3788 | unsigned short result;
|
|---|
| 3789 |
|
|---|
| 3790 | if (!PyArg_ParseTuple(args,(char *)"O:sht_mres_get",&obj0)) SWIG_fail;
|
|---|
| 3791 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 3792 | if (!SWIG_IsOK(res1)) {
|
|---|
| 3793 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_mres_get" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 3794 | }
|
|---|
| 3795 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 3796 | result = (unsigned short)(unsigned short) ((arg1)->mres);
|
|---|
| 3797 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
|
|---|
| 3798 | return resultobj;
|
|---|
| 3799 | fail:
|
|---|
| 3800 | return NULL;
|
|---|
| 3801 | }
|
|---|
| 3802 |
|
|---|
| 3803 |
|
|---|
| 3804 | SWIGINTERN PyObject *_wrap_sht_nphi_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3805 | PyObject *resultobj = 0;
|
|---|
| 3806 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 3807 | void *argp1 = 0 ;
|
|---|
| 3808 | int res1 = 0 ;
|
|---|
| 3809 | PyObject * obj0 = 0 ;
|
|---|
| 3810 | unsigned short result;
|
|---|
| 3811 |
|
|---|
| 3812 | if (!PyArg_ParseTuple(args,(char *)"O:sht_nphi_get",&obj0)) SWIG_fail;
|
|---|
| 3813 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 3814 | if (!SWIG_IsOK(res1)) {
|
|---|
| 3815 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_nphi_get" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 3816 | }
|
|---|
| 3817 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 3818 | result = (unsigned short)(unsigned short) ((arg1)->nphi);
|
|---|
| 3819 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
|
|---|
| 3820 | return resultobj;
|
|---|
| 3821 | fail:
|
|---|
| 3822 | return NULL;
|
|---|
| 3823 | }
|
|---|
| 3824 |
|
|---|
| 3825 |
|
|---|
| 3826 | SWIGINTERN PyObject *_wrap_sht_nlat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3827 | PyObject *resultobj = 0;
|
|---|
| 3828 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 3829 | void *argp1 = 0 ;
|
|---|
| 3830 | int res1 = 0 ;
|
|---|
| 3831 | PyObject * obj0 = 0 ;
|
|---|
| 3832 | unsigned short result;
|
|---|
| 3833 |
|
|---|
| 3834 | if (!PyArg_ParseTuple(args,(char *)"O:sht_nlat_get",&obj0)) SWIG_fail;
|
|---|
| 3835 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 3836 | if (!SWIG_IsOK(res1)) {
|
|---|
| 3837 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_nlat_get" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 3838 | }
|
|---|
| 3839 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 3840 | result = (unsigned short)(unsigned short) ((arg1)->nlat);
|
|---|
| 3841 | resultobj = SWIG_From_unsigned_SS_short((unsigned short)(result));
|
|---|
| 3842 | return resultobj;
|
|---|
| 3843 | fail:
|
|---|
| 3844 | return NULL;
|
|---|
| 3845 | }
|
|---|
| 3846 |
|
|---|
| 3847 |
|
|---|
| 3848 | SWIGINTERN PyObject *_wrap_sht_nspat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3849 | PyObject *resultobj = 0;
|
|---|
| 3850 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 3851 | void *argp1 = 0 ;
|
|---|
| 3852 | int res1 = 0 ;
|
|---|
| 3853 | PyObject * obj0 = 0 ;
|
|---|
| 3854 | unsigned int result;
|
|---|
| 3855 |
|
|---|
| 3856 | if (!PyArg_ParseTuple(args,(char *)"O:sht_nspat_get",&obj0)) SWIG_fail;
|
|---|
| 3857 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 3858 | if (!SWIG_IsOK(res1)) {
|
|---|
| 3859 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_nspat_get" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 3860 | }
|
|---|
| 3861 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 3862 | result = (unsigned int)(unsigned int) ((arg1)->nspat);
|
|---|
| 3863 | resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
|
|---|
| 3864 | return resultobj;
|
|---|
| 3865 | fail:
|
|---|
| 3866 | return NULL;
|
|---|
| 3867 | }
|
|---|
| 3868 |
|
|---|
| 3869 |
|
|---|
| 3870 | SWIGINTERN PyObject *_wrap_new_sht(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
|---|
| 3871 | PyObject *resultobj = 0;
|
|---|
| 3872 | int arg1 ;
|
|---|
| 3873 | int arg2 = (int) -1 ;
|
|---|
| 3874 | int arg3 = (int) 1 ;
|
|---|
| 3875 | int arg4 = (int) sht_orthonormal ;
|
|---|
| 3876 | int arg5 = (int) 0 ;
|
|---|
| 3877 | int val1 ;
|
|---|
| 3878 | int ecode1 = 0 ;
|
|---|
| 3879 | int val2 ;
|
|---|
| 3880 | int ecode2 = 0 ;
|
|---|
| 3881 | int val3 ;
|
|---|
| 3882 | int ecode3 = 0 ;
|
|---|
| 3883 | int val4 ;
|
|---|
| 3884 | int ecode4 = 0 ;
|
|---|
| 3885 | int val5 ;
|
|---|
| 3886 | int ecode5 = 0 ;
|
|---|
| 3887 | PyObject * obj0 = 0 ;
|
|---|
| 3888 | PyObject * obj1 = 0 ;
|
|---|
| 3889 | PyObject * obj2 = 0 ;
|
|---|
| 3890 | PyObject * obj3 = 0 ;
|
|---|
| 3891 | PyObject * obj4 = 0 ;
|
|---|
| 3892 | char * kwnames[] = {
|
|---|
| 3893 | (char *) "lmax",(char *) "mmax",(char *) "mres",(char *) "norm",(char *) "nthreads", NULL
|
|---|
| 3894 | };
|
|---|
| 3895 | struct shtns_info *result = 0 ;
|
|---|
| 3896 |
|
|---|
| 3897 | if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOO:new_sht",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
|
|---|
| 3898 | ecode1 = SWIG_AsVal_int(obj0, &val1);
|
|---|
| 3899 | if (!SWIG_IsOK(ecode1)) {
|
|---|
| 3900 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_sht" "', argument " "1"" of type '" "int""'");
|
|---|
| 3901 | }
|
|---|
| 3902 | arg1 = (int)(val1);
|
|---|
| 3903 | if (obj1) {
|
|---|
| 3904 | ecode2 = SWIG_AsVal_int(obj1, &val2);
|
|---|
| 3905 | if (!SWIG_IsOK(ecode2)) {
|
|---|
| 3906 | SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_sht" "', argument " "2"" of type '" "int""'");
|
|---|
| 3907 | }
|
|---|
| 3908 | arg2 = (int)(val2);
|
|---|
| 3909 | }
|
|---|
| 3910 | if (obj2) {
|
|---|
| 3911 | ecode3 = SWIG_AsVal_int(obj2, &val3);
|
|---|
| 3912 | if (!SWIG_IsOK(ecode3)) {
|
|---|
| 3913 | SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_sht" "', argument " "3"" of type '" "int""'");
|
|---|
| 3914 | }
|
|---|
| 3915 | arg3 = (int)(val3);
|
|---|
| 3916 | }
|
|---|
| 3917 | if (obj3) {
|
|---|
| 3918 | ecode4 = SWIG_AsVal_int(obj3, &val4);
|
|---|
| 3919 | if (!SWIG_IsOK(ecode4)) {
|
|---|
| 3920 | SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_sht" "', argument " "4"" of type '" "int""'");
|
|---|
| 3921 | }
|
|---|
| 3922 | arg4 = (int)(val4);
|
|---|
| 3923 | }
|
|---|
| 3924 | if (obj4) {
|
|---|
| 3925 | ecode5 = SWIG_AsVal_int(obj4, &val5);
|
|---|
| 3926 | if (!SWIG_IsOK(ecode5)) {
|
|---|
| 3927 | SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_sht" "', argument " "5"" of type '" "int""'");
|
|---|
| 3928 | }
|
|---|
| 3929 | arg5 = (int)(val5);
|
|---|
| 3930 | }
|
|---|
| 3931 | {
|
|---|
| 3932 | shtns_error = 0; // clear exception
|
|---|
| 3933 | result = (struct shtns_info *)new_shtns_info(arg1,arg2,arg3,arg4,arg5);
|
|---|
| 3934 | if (shtns_error) {
|
|---|
| 3935 | // test for exception
|
|---|
| 3936 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 3937 | }
|
|---|
| 3938 | }
|
|---|
| 3939 | resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_shtns_info, SWIG_POINTER_NEW | 0 );
|
|---|
| 3940 | return resultobj;
|
|---|
| 3941 | fail:
|
|---|
| 3942 | return NULL;
|
|---|
| 3943 | }
|
|---|
| 3944 |
|
|---|
| 3945 |
|
|---|
| 3946 | SWIGINTERN PyObject *_wrap_delete_sht(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 3947 | PyObject *resultobj = 0;
|
|---|
| 3948 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 3949 | void *argp1 = 0 ;
|
|---|
| 3950 | int res1 = 0 ;
|
|---|
| 3951 | PyObject * obj0 = 0 ;
|
|---|
| 3952 |
|
|---|
| 3953 | if (!PyArg_ParseTuple(args,(char *)"O:delete_sht",&obj0)) SWIG_fail;
|
|---|
| 3954 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, SWIG_POINTER_DISOWN | 0 );
|
|---|
| 3955 | if (!SWIG_IsOK(res1)) {
|
|---|
| 3956 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_sht" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 3957 | }
|
|---|
| 3958 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 3959 | {
|
|---|
| 3960 | shtns_error = 0; // clear exception
|
|---|
| 3961 | delete_shtns_info(arg1);
|
|---|
| 3962 | if (shtns_error) {
|
|---|
| 3963 | // test for exception
|
|---|
| 3964 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 3965 | }
|
|---|
| 3966 | }
|
|---|
| 3967 | resultobj = SWIG_Py_Void();
|
|---|
| 3968 | return resultobj;
|
|---|
| 3969 | fail:
|
|---|
| 3970 | return NULL;
|
|---|
| 3971 | }
|
|---|
| 3972 |
|
|---|
| 3973 |
|
|---|
| 3974 | SWIGINTERN PyObject *_wrap_sht_set_grid(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *kwargs) {
|
|---|
| 3975 | PyObject *resultobj = 0;
|
|---|
| 3976 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 3977 | int arg2 = (int) 0 ;
|
|---|
| 3978 | int arg3 = (int) 0 ;
|
|---|
| 3979 | int arg4 = (int) sht_quick_init ;
|
|---|
| 3980 | double arg5 = (double) 1.0e-8 ;
|
|---|
| 3981 | int arg6 = (int) 1 ;
|
|---|
| 3982 | int *arg7 = (int *) 0 ;
|
|---|
| 3983 | int *arg8 = (int *) 0 ;
|
|---|
| 3984 | void *argp1 = 0 ;
|
|---|
| 3985 | int res1 = 0 ;
|
|---|
| 3986 | int val2 ;
|
|---|
| 3987 | int ecode2 = 0 ;
|
|---|
| 3988 | int val3 ;
|
|---|
| 3989 | int ecode3 = 0 ;
|
|---|
| 3990 | int val4 ;
|
|---|
| 3991 | int ecode4 = 0 ;
|
|---|
| 3992 | double val5 ;
|
|---|
| 3993 | int ecode5 = 0 ;
|
|---|
| 3994 | int val6 ;
|
|---|
| 3995 | int ecode6 = 0 ;
|
|---|
| 3996 | int temp7 ;
|
|---|
| 3997 | int res7 = SWIG_TMPOBJ ;
|
|---|
| 3998 | int temp8 ;
|
|---|
| 3999 | int res8 = SWIG_TMPOBJ ;
|
|---|
| 4000 | PyObject * obj0 = 0 ;
|
|---|
| 4001 | PyObject * obj1 = 0 ;
|
|---|
| 4002 | PyObject * obj2 = 0 ;
|
|---|
| 4003 | PyObject * obj3 = 0 ;
|
|---|
| 4004 | PyObject * obj4 = 0 ;
|
|---|
| 4005 | PyObject * obj5 = 0 ;
|
|---|
| 4006 | char * kwnames[] = {
|
|---|
| 4007 | (char *) "self",(char *) "nlat",(char *) "nphi",(char *) "flags",(char *) "polar_opt",(char *) "nl_order", NULL
|
|---|
| 4008 | };
|
|---|
| 4009 |
|
|---|
| 4010 | arg7 = &temp7;
|
|---|
| 4011 | arg8 = &temp8;
|
|---|
| 4012 | if (!PyArg_ParseTupleAndKeywords(args,kwargs,(char *)"O|OOOOO:sht_set_grid",kwnames,&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
|
|---|
| 4013 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4014 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4015 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_set_grid" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4016 | }
|
|---|
| 4017 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4018 | if (obj1) {
|
|---|
| 4019 | ecode2 = SWIG_AsVal_int(obj1, &val2);
|
|---|
| 4020 | if (!SWIG_IsOK(ecode2)) {
|
|---|
| 4021 | SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sht_set_grid" "', argument " "2"" of type '" "int""'");
|
|---|
| 4022 | }
|
|---|
| 4023 | arg2 = (int)(val2);
|
|---|
| 4024 | }
|
|---|
| 4025 | if (obj2) {
|
|---|
| 4026 | ecode3 = SWIG_AsVal_int(obj2, &val3);
|
|---|
| 4027 | if (!SWIG_IsOK(ecode3)) {
|
|---|
| 4028 | SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sht_set_grid" "', argument " "3"" of type '" "int""'");
|
|---|
| 4029 | }
|
|---|
| 4030 | arg3 = (int)(val3);
|
|---|
| 4031 | }
|
|---|
| 4032 | if (obj3) {
|
|---|
| 4033 | ecode4 = SWIG_AsVal_int(obj3, &val4);
|
|---|
| 4034 | if (!SWIG_IsOK(ecode4)) {
|
|---|
| 4035 | SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sht_set_grid" "', argument " "4"" of type '" "int""'");
|
|---|
| 4036 | }
|
|---|
| 4037 | arg4 = (int)(val4);
|
|---|
| 4038 | }
|
|---|
| 4039 | if (obj4) {
|
|---|
| 4040 | ecode5 = SWIG_AsVal_double(obj4, &val5);
|
|---|
| 4041 | if (!SWIG_IsOK(ecode5)) {
|
|---|
| 4042 | SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "sht_set_grid" "', argument " "5"" of type '" "double""'");
|
|---|
| 4043 | }
|
|---|
| 4044 | arg5 = (double)(val5);
|
|---|
| 4045 | }
|
|---|
| 4046 | if (obj5) {
|
|---|
| 4047 | ecode6 = SWIG_AsVal_int(obj5, &val6);
|
|---|
| 4048 | if (!SWIG_IsOK(ecode6)) {
|
|---|
| 4049 | SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "sht_set_grid" "', argument " "6"" of type '" "int""'");
|
|---|
| 4050 | }
|
|---|
| 4051 | arg6 = (int)(val6);
|
|---|
| 4052 | }
|
|---|
| 4053 | {
|
|---|
| 4054 | shtns_error = 0; // clear exception
|
|---|
| 4055 | shtns_info_set_grid(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
|
|---|
| 4056 | if (shtns_error) {
|
|---|
| 4057 | // test for exception
|
|---|
| 4058 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4059 | }
|
|---|
| 4060 | }
|
|---|
| 4061 | resultobj = SWIG_Py_Void();
|
|---|
| 4062 | if (SWIG_IsTmpObj(res7)) {
|
|---|
| 4063 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg7)));
|
|---|
| 4064 | } else {
|
|---|
| 4065 | int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
|
|---|
| 4066 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_int, new_flags));
|
|---|
| 4067 | }
|
|---|
| 4068 | if (SWIG_IsTmpObj(res8)) {
|
|---|
| 4069 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg8)));
|
|---|
| 4070 | } else {
|
|---|
| 4071 | int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
|
|---|
| 4072 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_int, new_flags));
|
|---|
| 4073 | }
|
|---|
| 4074 | return resultobj;
|
|---|
| 4075 | fail:
|
|---|
| 4076 | return NULL;
|
|---|
| 4077 | }
|
|---|
| 4078 |
|
|---|
| 4079 |
|
|---|
| 4080 | SWIGINTERN PyObject *_wrap_sht_print_info(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4081 | PyObject *resultobj = 0;
|
|---|
| 4082 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4083 | void *argp1 = 0 ;
|
|---|
| 4084 | int res1 = 0 ;
|
|---|
| 4085 | PyObject * obj0 = 0 ;
|
|---|
| 4086 |
|
|---|
| 4087 | if (!PyArg_ParseTuple(args,(char *)"O:sht_print_info",&obj0)) SWIG_fail;
|
|---|
| 4088 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4089 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4090 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_print_info" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4091 | }
|
|---|
| 4092 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4093 | {
|
|---|
| 4094 | shtns_error = 0; // clear exception
|
|---|
| 4095 | shtns_info_print_info(arg1);
|
|---|
| 4096 | if (shtns_error) {
|
|---|
| 4097 | // test for exception
|
|---|
| 4098 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4099 | }
|
|---|
| 4100 | }
|
|---|
| 4101 | resultobj = SWIG_Py_Void();
|
|---|
| 4102 | return resultobj;
|
|---|
| 4103 | fail:
|
|---|
| 4104 | return NULL;
|
|---|
| 4105 | }
|
|---|
| 4106 |
|
|---|
| 4107 |
|
|---|
| 4108 | SWIGINTERN PyObject *_wrap_sht_sh00_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4109 | PyObject *resultobj = 0;
|
|---|
| 4110 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4111 | void *argp1 = 0 ;
|
|---|
| 4112 | int res1 = 0 ;
|
|---|
| 4113 | PyObject * obj0 = 0 ;
|
|---|
| 4114 | double result;
|
|---|
| 4115 |
|
|---|
| 4116 | if (!PyArg_ParseTuple(args,(char *)"O:sht_sh00_1",&obj0)) SWIG_fail;
|
|---|
| 4117 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4118 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4119 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_sh00_1" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4120 | }
|
|---|
| 4121 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4122 | {
|
|---|
| 4123 | shtns_error = 0; // clear exception
|
|---|
| 4124 | result = (double)shtns_info_sh00_1(arg1);
|
|---|
| 4125 | if (shtns_error) {
|
|---|
| 4126 | // test for exception
|
|---|
| 4127 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4128 | }
|
|---|
| 4129 | }
|
|---|
| 4130 | resultobj = SWIG_From_double((double)(result));
|
|---|
| 4131 | return resultobj;
|
|---|
| 4132 | fail:
|
|---|
| 4133 | return NULL;
|
|---|
| 4134 | }
|
|---|
| 4135 |
|
|---|
| 4136 |
|
|---|
| 4137 | SWIGINTERN PyObject *_wrap_sht_sh10_ct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4138 | PyObject *resultobj = 0;
|
|---|
| 4139 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4140 | void *argp1 = 0 ;
|
|---|
| 4141 | int res1 = 0 ;
|
|---|
| 4142 | PyObject * obj0 = 0 ;
|
|---|
| 4143 | double result;
|
|---|
| 4144 |
|
|---|
| 4145 | if (!PyArg_ParseTuple(args,(char *)"O:sht_sh10_ct",&obj0)) SWIG_fail;
|
|---|
| 4146 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4147 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4148 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_sh10_ct" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4149 | }
|
|---|
| 4150 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4151 | {
|
|---|
| 4152 | shtns_error = 0; // clear exception
|
|---|
| 4153 | result = (double)shtns_info_sh10_ct(arg1);
|
|---|
| 4154 | if (shtns_error) {
|
|---|
| 4155 | // test for exception
|
|---|
| 4156 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4157 | }
|
|---|
| 4158 | }
|
|---|
| 4159 | resultobj = SWIG_From_double((double)(result));
|
|---|
| 4160 | return resultobj;
|
|---|
| 4161 | fail:
|
|---|
| 4162 | return NULL;
|
|---|
| 4163 | }
|
|---|
| 4164 |
|
|---|
| 4165 |
|
|---|
| 4166 | SWIGINTERN PyObject *_wrap_sht_sh11_st(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4167 | PyObject *resultobj = 0;
|
|---|
| 4168 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4169 | void *argp1 = 0 ;
|
|---|
| 4170 | int res1 = 0 ;
|
|---|
| 4171 | PyObject * obj0 = 0 ;
|
|---|
| 4172 | double result;
|
|---|
| 4173 |
|
|---|
| 4174 | if (!PyArg_ParseTuple(args,(char *)"O:sht_sh11_st",&obj0)) SWIG_fail;
|
|---|
| 4175 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4176 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4177 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_sh11_st" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4178 | }
|
|---|
| 4179 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4180 | {
|
|---|
| 4181 | shtns_error = 0; // clear exception
|
|---|
| 4182 | result = (double)shtns_info_sh11_st(arg1);
|
|---|
| 4183 | if (shtns_error) {
|
|---|
| 4184 | // test for exception
|
|---|
| 4185 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4186 | }
|
|---|
| 4187 | }
|
|---|
| 4188 | resultobj = SWIG_From_double((double)(result));
|
|---|
| 4189 | return resultobj;
|
|---|
| 4190 | fail:
|
|---|
| 4191 | return NULL;
|
|---|
| 4192 | }
|
|---|
| 4193 |
|
|---|
| 4194 |
|
|---|
| 4195 | SWIGINTERN PyObject *_wrap_sht_shlm_e1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4196 | PyObject *resultobj = 0;
|
|---|
| 4197 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4198 | unsigned int arg2 ;
|
|---|
| 4199 | unsigned int arg3 ;
|
|---|
| 4200 | void *argp1 = 0 ;
|
|---|
| 4201 | int res1 = 0 ;
|
|---|
| 4202 | unsigned int val2 ;
|
|---|
| 4203 | int ecode2 = 0 ;
|
|---|
| 4204 | unsigned int val3 ;
|
|---|
| 4205 | int ecode3 = 0 ;
|
|---|
| 4206 | PyObject * obj0 = 0 ;
|
|---|
| 4207 | PyObject * obj1 = 0 ;
|
|---|
| 4208 | PyObject * obj2 = 0 ;
|
|---|
| 4209 | double result;
|
|---|
| 4210 |
|
|---|
| 4211 | if (!PyArg_ParseTuple(args,(char *)"OOO:sht_shlm_e1",&obj0,&obj1,&obj2)) SWIG_fail;
|
|---|
| 4212 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4213 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4214 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_shlm_e1" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4215 | }
|
|---|
| 4216 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4217 | ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
|
|---|
| 4218 | if (!SWIG_IsOK(ecode2)) {
|
|---|
| 4219 | SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sht_shlm_e1" "', argument " "2"" of type '" "unsigned int""'");
|
|---|
| 4220 | }
|
|---|
| 4221 | arg2 = (unsigned int)(val2);
|
|---|
| 4222 | ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
|
|---|
| 4223 | if (!SWIG_IsOK(ecode3)) {
|
|---|
| 4224 | SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sht_shlm_e1" "', argument " "3"" of type '" "unsigned int""'");
|
|---|
| 4225 | }
|
|---|
| 4226 | arg3 = (unsigned int)(val3);
|
|---|
| 4227 | {
|
|---|
| 4228 | shtns_error = 0; // clear exception
|
|---|
| 4229 | result = (double)shtns_info_shlm_e1(arg1,arg2,arg3);
|
|---|
| 4230 | if (shtns_error) {
|
|---|
| 4231 | // test for exception
|
|---|
| 4232 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4233 | }
|
|---|
| 4234 | }
|
|---|
| 4235 | resultobj = SWIG_From_double((double)(result));
|
|---|
| 4236 | return resultobj;
|
|---|
| 4237 | fail:
|
|---|
| 4238 | return NULL;
|
|---|
| 4239 | }
|
|---|
| 4240 |
|
|---|
| 4241 |
|
|---|
| 4242 | SWIGINTERN PyObject *_wrap_sht___ct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4243 | PyObject *resultobj = 0;
|
|---|
| 4244 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4245 | void *argp1 = 0 ;
|
|---|
| 4246 | int res1 = 0 ;
|
|---|
| 4247 | PyObject * obj0 = 0 ;
|
|---|
| 4248 | PyObject *result = 0 ;
|
|---|
| 4249 |
|
|---|
| 4250 | if (!PyArg_ParseTuple(args,(char *)"O:sht___ct",&obj0)) SWIG_fail;
|
|---|
| 4251 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4252 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4253 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht___ct" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4254 | }
|
|---|
| 4255 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4256 | {
|
|---|
| 4257 | shtns_error = 0; // clear exception
|
|---|
| 4258 | result = (PyObject *)shtns_info___ct(arg1);
|
|---|
| 4259 | if (shtns_error) {
|
|---|
| 4260 | // test for exception
|
|---|
| 4261 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4262 | }
|
|---|
| 4263 | }
|
|---|
| 4264 | resultobj = result;
|
|---|
| 4265 | return resultobj;
|
|---|
| 4266 | fail:
|
|---|
| 4267 | return NULL;
|
|---|
| 4268 | }
|
|---|
| 4269 |
|
|---|
| 4270 |
|
|---|
| 4271 | SWIGINTERN PyObject *_wrap_sht_gauss_wts(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4272 | PyObject *resultobj = 0;
|
|---|
| 4273 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4274 | void *argp1 = 0 ;
|
|---|
| 4275 | int res1 = 0 ;
|
|---|
| 4276 | PyObject * obj0 = 0 ;
|
|---|
| 4277 | PyObject *result = 0 ;
|
|---|
| 4278 |
|
|---|
| 4279 | if (!PyArg_ParseTuple(args,(char *)"O:sht_gauss_wts",&obj0)) SWIG_fail;
|
|---|
| 4280 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4281 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4282 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_gauss_wts" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4283 | }
|
|---|
| 4284 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4285 | {
|
|---|
| 4286 | shtns_error = 0; // clear exception
|
|---|
| 4287 | result = (PyObject *)shtns_info_gauss_wts(arg1);
|
|---|
| 4288 | if (shtns_error) {
|
|---|
| 4289 | // test for exception
|
|---|
| 4290 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4291 | }
|
|---|
| 4292 | }
|
|---|
| 4293 | resultobj = result;
|
|---|
| 4294 | return resultobj;
|
|---|
| 4295 | fail:
|
|---|
| 4296 | return NULL;
|
|---|
| 4297 | }
|
|---|
| 4298 |
|
|---|
| 4299 |
|
|---|
| 4300 | SWIGINTERN PyObject *_wrap_sht_mul_ct_matrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4301 | PyObject *resultobj = 0;
|
|---|
| 4302 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4303 | void *argp1 = 0 ;
|
|---|
| 4304 | int res1 = 0 ;
|
|---|
| 4305 | PyObject * obj0 = 0 ;
|
|---|
| 4306 | PyObject *result = 0 ;
|
|---|
| 4307 |
|
|---|
| 4308 | if (!PyArg_ParseTuple(args,(char *)"O:sht_mul_ct_matrix",&obj0)) SWIG_fail;
|
|---|
| 4309 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4310 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4311 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_mul_ct_matrix" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4312 | }
|
|---|
| 4313 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4314 | {
|
|---|
| 4315 | shtns_error = 0; // clear exception
|
|---|
| 4316 | result = (PyObject *)shtns_info_mul_ct_matrix(arg1);
|
|---|
| 4317 | if (shtns_error) {
|
|---|
| 4318 | // test for exception
|
|---|
| 4319 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4320 | }
|
|---|
| 4321 | }
|
|---|
| 4322 | resultobj = result;
|
|---|
| 4323 | return resultobj;
|
|---|
| 4324 | fail:
|
|---|
| 4325 | return NULL;
|
|---|
| 4326 | }
|
|---|
| 4327 |
|
|---|
| 4328 |
|
|---|
| 4329 | SWIGINTERN PyObject *_wrap_sht_st_dt_matrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4330 | PyObject *resultobj = 0;
|
|---|
| 4331 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4332 | void *argp1 = 0 ;
|
|---|
| 4333 | int res1 = 0 ;
|
|---|
| 4334 | PyObject * obj0 = 0 ;
|
|---|
| 4335 | PyObject *result = 0 ;
|
|---|
| 4336 |
|
|---|
| 4337 | if (!PyArg_ParseTuple(args,(char *)"O:sht_st_dt_matrix",&obj0)) SWIG_fail;
|
|---|
| 4338 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4339 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4340 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_st_dt_matrix" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4341 | }
|
|---|
| 4342 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4343 | {
|
|---|
| 4344 | shtns_error = 0; // clear exception
|
|---|
| 4345 | result = (PyObject *)shtns_info_st_dt_matrix(arg1);
|
|---|
| 4346 | if (shtns_error) {
|
|---|
| 4347 | // test for exception
|
|---|
| 4348 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4349 | }
|
|---|
| 4350 | }
|
|---|
| 4351 | resultobj = result;
|
|---|
| 4352 | return resultobj;
|
|---|
| 4353 | fail:
|
|---|
| 4354 | return NULL;
|
|---|
| 4355 | }
|
|---|
| 4356 |
|
|---|
| 4357 |
|
|---|
| 4358 | SWIGINTERN PyObject *_wrap_sht___spat_shape(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4359 | PyObject *resultobj = 0;
|
|---|
| 4360 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4361 | int *arg2 = (int *) 0 ;
|
|---|
| 4362 | int *arg3 = (int *) 0 ;
|
|---|
| 4363 | void *argp1 = 0 ;
|
|---|
| 4364 | int res1 = 0 ;
|
|---|
| 4365 | int temp2 ;
|
|---|
| 4366 | int res2 = SWIG_TMPOBJ ;
|
|---|
| 4367 | int temp3 ;
|
|---|
| 4368 | int res3 = SWIG_TMPOBJ ;
|
|---|
| 4369 | PyObject * obj0 = 0 ;
|
|---|
| 4370 |
|
|---|
| 4371 | arg2 = &temp2;
|
|---|
| 4372 | arg3 = &temp3;
|
|---|
| 4373 | if (!PyArg_ParseTuple(args,(char *)"O:sht___spat_shape",&obj0)) SWIG_fail;
|
|---|
| 4374 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4375 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4376 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht___spat_shape" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4377 | }
|
|---|
| 4378 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4379 | {
|
|---|
| 4380 | shtns_error = 0; // clear exception
|
|---|
| 4381 | shtns_info___spat_shape(arg1,arg2,arg3);
|
|---|
| 4382 | if (shtns_error) {
|
|---|
| 4383 | // test for exception
|
|---|
| 4384 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4385 | }
|
|---|
| 4386 | }
|
|---|
| 4387 | resultobj = SWIG_Py_Void();
|
|---|
| 4388 | if (SWIG_IsTmpObj(res2)) {
|
|---|
| 4389 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg2)));
|
|---|
| 4390 | } else {
|
|---|
| 4391 | int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
|
|---|
| 4392 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_int, new_flags));
|
|---|
| 4393 | }
|
|---|
| 4394 | if (SWIG_IsTmpObj(res3)) {
|
|---|
| 4395 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_int((*arg3)));
|
|---|
| 4396 | } else {
|
|---|
| 4397 | int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
|
|---|
| 4398 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_int, new_flags));
|
|---|
| 4399 | }
|
|---|
| 4400 | return resultobj;
|
|---|
| 4401 | fail:
|
|---|
| 4402 | return NULL;
|
|---|
| 4403 | }
|
|---|
| 4404 |
|
|---|
| 4405 |
|
|---|
| 4406 | SWIGINTERN PyObject *_wrap_sht_idx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4407 | PyObject *resultobj = 0;
|
|---|
| 4408 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4409 | unsigned int arg2 ;
|
|---|
| 4410 | unsigned int arg3 ;
|
|---|
| 4411 | void *argp1 = 0 ;
|
|---|
| 4412 | int res1 = 0 ;
|
|---|
| 4413 | unsigned int val2 ;
|
|---|
| 4414 | int ecode2 = 0 ;
|
|---|
| 4415 | unsigned int val3 ;
|
|---|
| 4416 | int ecode3 = 0 ;
|
|---|
| 4417 | PyObject * obj0 = 0 ;
|
|---|
| 4418 | PyObject * obj1 = 0 ;
|
|---|
| 4419 | PyObject * obj2 = 0 ;
|
|---|
| 4420 | int result;
|
|---|
| 4421 |
|
|---|
| 4422 | if (!PyArg_ParseTuple(args,(char *)"OOO:sht_idx",&obj0,&obj1,&obj2)) SWIG_fail;
|
|---|
| 4423 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4424 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4425 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_idx" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4426 | }
|
|---|
| 4427 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4428 | ecode2 = SWIG_AsVal_unsigned_SS_int(obj1, &val2);
|
|---|
| 4429 | if (!SWIG_IsOK(ecode2)) {
|
|---|
| 4430 | SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sht_idx" "', argument " "2"" of type '" "unsigned int""'");
|
|---|
| 4431 | }
|
|---|
| 4432 | arg2 = (unsigned int)(val2);
|
|---|
| 4433 | ecode3 = SWIG_AsVal_unsigned_SS_int(obj2, &val3);
|
|---|
| 4434 | if (!SWIG_IsOK(ecode3)) {
|
|---|
| 4435 | SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sht_idx" "', argument " "3"" of type '" "unsigned int""'");
|
|---|
| 4436 | }
|
|---|
| 4437 | arg3 = (unsigned int)(val3);
|
|---|
| 4438 | {
|
|---|
| 4439 | shtns_error = 0; // clear exception
|
|---|
| 4440 | result = (int)shtns_info_idx(arg1,arg2,arg3);
|
|---|
| 4441 | if (shtns_error) {
|
|---|
| 4442 | // test for exception
|
|---|
| 4443 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4444 | }
|
|---|
| 4445 | }
|
|---|
| 4446 | resultobj = SWIG_From_int((int)(result));
|
|---|
| 4447 | return resultobj;
|
|---|
| 4448 | fail:
|
|---|
| 4449 | return NULL;
|
|---|
| 4450 | }
|
|---|
| 4451 |
|
|---|
| 4452 |
|
|---|
| 4453 | SWIGINTERN PyObject *_wrap_sht_spat_to_SH(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4454 | PyObject *resultobj = 0;
|
|---|
| 4455 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4456 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 4457 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 4458 | void *argp1 = 0 ;
|
|---|
| 4459 | int res1 = 0 ;
|
|---|
| 4460 | PyObject * obj0 = 0 ;
|
|---|
| 4461 | PyObject * obj1 = 0 ;
|
|---|
| 4462 | PyObject * obj2 = 0 ;
|
|---|
| 4463 |
|
|---|
| 4464 | if (!PyArg_ParseTuple(args,(char *)"OOO:sht_spat_to_SH",&obj0,&obj1,&obj2)) SWIG_fail;
|
|---|
| 4465 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4466 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4467 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_spat_to_SH" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4468 | }
|
|---|
| 4469 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4470 | arg2 = obj1;
|
|---|
| 4471 | arg3 = obj2;
|
|---|
| 4472 | {
|
|---|
| 4473 | shtns_error = 0; // clear exception
|
|---|
| 4474 | shtns_info_spat_to_SH(arg1,arg2,arg3);
|
|---|
| 4475 | if (shtns_error) {
|
|---|
| 4476 | // test for exception
|
|---|
| 4477 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4478 | }
|
|---|
| 4479 | }
|
|---|
| 4480 | resultobj = SWIG_Py_Void();
|
|---|
| 4481 | return resultobj;
|
|---|
| 4482 | fail:
|
|---|
| 4483 | return NULL;
|
|---|
| 4484 | }
|
|---|
| 4485 |
|
|---|
| 4486 |
|
|---|
| 4487 | SWIGINTERN PyObject *_wrap_sht_SH_to_spat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4488 | PyObject *resultobj = 0;
|
|---|
| 4489 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4490 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 4491 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 4492 | void *argp1 = 0 ;
|
|---|
| 4493 | int res1 = 0 ;
|
|---|
| 4494 | PyObject * obj0 = 0 ;
|
|---|
| 4495 | PyObject * obj1 = 0 ;
|
|---|
| 4496 | PyObject * obj2 = 0 ;
|
|---|
| 4497 |
|
|---|
| 4498 | if (!PyArg_ParseTuple(args,(char *)"OOO:sht_SH_to_spat",&obj0,&obj1,&obj2)) SWIG_fail;
|
|---|
| 4499 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4500 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4501 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_SH_to_spat" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4502 | }
|
|---|
| 4503 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4504 | arg2 = obj1;
|
|---|
| 4505 | arg3 = obj2;
|
|---|
| 4506 | {
|
|---|
| 4507 | shtns_error = 0; // clear exception
|
|---|
| 4508 | shtns_info_SH_to_spat(arg1,arg2,arg3);
|
|---|
| 4509 | if (shtns_error) {
|
|---|
| 4510 | // test for exception
|
|---|
| 4511 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4512 | }
|
|---|
| 4513 | }
|
|---|
| 4514 | resultobj = SWIG_Py_Void();
|
|---|
| 4515 | return resultobj;
|
|---|
| 4516 | fail:
|
|---|
| 4517 | return NULL;
|
|---|
| 4518 | }
|
|---|
| 4519 |
|
|---|
| 4520 |
|
|---|
| 4521 | SWIGINTERN PyObject *_wrap_sht_spat_cplx_to_SH(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4522 | PyObject *resultobj = 0;
|
|---|
| 4523 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4524 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 4525 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 4526 | void *argp1 = 0 ;
|
|---|
| 4527 | int res1 = 0 ;
|
|---|
| 4528 | PyObject * obj0 = 0 ;
|
|---|
| 4529 | PyObject * obj1 = 0 ;
|
|---|
| 4530 | PyObject * obj2 = 0 ;
|
|---|
| 4531 |
|
|---|
| 4532 | if (!PyArg_ParseTuple(args,(char *)"OOO:sht_spat_cplx_to_SH",&obj0,&obj1,&obj2)) SWIG_fail;
|
|---|
| 4533 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4534 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4535 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_spat_cplx_to_SH" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4536 | }
|
|---|
| 4537 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4538 | arg2 = obj1;
|
|---|
| 4539 | arg3 = obj2;
|
|---|
| 4540 | {
|
|---|
| 4541 | shtns_error = 0; // clear exception
|
|---|
| 4542 | shtns_info_spat_cplx_to_SH(arg1,arg2,arg3);
|
|---|
| 4543 | if (shtns_error) {
|
|---|
| 4544 | // test for exception
|
|---|
| 4545 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4546 | }
|
|---|
| 4547 | }
|
|---|
| 4548 | resultobj = SWIG_Py_Void();
|
|---|
| 4549 | return resultobj;
|
|---|
| 4550 | fail:
|
|---|
| 4551 | return NULL;
|
|---|
| 4552 | }
|
|---|
| 4553 |
|
|---|
| 4554 |
|
|---|
| 4555 | SWIGINTERN PyObject *_wrap_sht_SH_to_spat_cplx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4556 | PyObject *resultobj = 0;
|
|---|
| 4557 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4558 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 4559 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 4560 | void *argp1 = 0 ;
|
|---|
| 4561 | int res1 = 0 ;
|
|---|
| 4562 | PyObject * obj0 = 0 ;
|
|---|
| 4563 | PyObject * obj1 = 0 ;
|
|---|
| 4564 | PyObject * obj2 = 0 ;
|
|---|
| 4565 |
|
|---|
| 4566 | if (!PyArg_ParseTuple(args,(char *)"OOO:sht_SH_to_spat_cplx",&obj0,&obj1,&obj2)) SWIG_fail;
|
|---|
| 4567 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4568 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4569 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_SH_to_spat_cplx" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4570 | }
|
|---|
| 4571 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4572 | arg2 = obj1;
|
|---|
| 4573 | arg3 = obj2;
|
|---|
| 4574 | {
|
|---|
| 4575 | shtns_error = 0; // clear exception
|
|---|
| 4576 | shtns_info_SH_to_spat_cplx(arg1,arg2,arg3);
|
|---|
| 4577 | if (shtns_error) {
|
|---|
| 4578 | // test for exception
|
|---|
| 4579 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4580 | }
|
|---|
| 4581 | }
|
|---|
| 4582 | resultobj = SWIG_Py_Void();
|
|---|
| 4583 | return resultobj;
|
|---|
| 4584 | fail:
|
|---|
| 4585 | return NULL;
|
|---|
| 4586 | }
|
|---|
| 4587 |
|
|---|
| 4588 |
|
|---|
| 4589 | SWIGINTERN PyObject *_wrap_sht_spat_to_SHsphtor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4590 | PyObject *resultobj = 0;
|
|---|
| 4591 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4592 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 4593 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 4594 | PyObject *arg4 = (PyObject *) 0 ;
|
|---|
| 4595 | PyObject *arg5 = (PyObject *) 0 ;
|
|---|
| 4596 | void *argp1 = 0 ;
|
|---|
| 4597 | int res1 = 0 ;
|
|---|
| 4598 | PyObject * obj0 = 0 ;
|
|---|
| 4599 | PyObject * obj1 = 0 ;
|
|---|
| 4600 | PyObject * obj2 = 0 ;
|
|---|
| 4601 | PyObject * obj3 = 0 ;
|
|---|
| 4602 | PyObject * obj4 = 0 ;
|
|---|
| 4603 |
|
|---|
| 4604 | if (!PyArg_ParseTuple(args,(char *)"OOOOO:sht_spat_to_SHsphtor",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
|
|---|
| 4605 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4606 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4607 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_spat_to_SHsphtor" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4608 | }
|
|---|
| 4609 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4610 | arg2 = obj1;
|
|---|
| 4611 | arg3 = obj2;
|
|---|
| 4612 | arg4 = obj3;
|
|---|
| 4613 | arg5 = obj4;
|
|---|
| 4614 | {
|
|---|
| 4615 | shtns_error = 0; // clear exception
|
|---|
| 4616 | shtns_info_spat_to_SHsphtor(arg1,arg2,arg3,arg4,arg5);
|
|---|
| 4617 | if (shtns_error) {
|
|---|
| 4618 | // test for exception
|
|---|
| 4619 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4620 | }
|
|---|
| 4621 | }
|
|---|
| 4622 | resultobj = SWIG_Py_Void();
|
|---|
| 4623 | return resultobj;
|
|---|
| 4624 | fail:
|
|---|
| 4625 | return NULL;
|
|---|
| 4626 | }
|
|---|
| 4627 |
|
|---|
| 4628 |
|
|---|
| 4629 | SWIGINTERN PyObject *_wrap_sht_SHsphtor_to_spat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4630 | PyObject *resultobj = 0;
|
|---|
| 4631 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4632 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 4633 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 4634 | PyObject *arg4 = (PyObject *) 0 ;
|
|---|
| 4635 | PyObject *arg5 = (PyObject *) 0 ;
|
|---|
| 4636 | void *argp1 = 0 ;
|
|---|
| 4637 | int res1 = 0 ;
|
|---|
| 4638 | PyObject * obj0 = 0 ;
|
|---|
| 4639 | PyObject * obj1 = 0 ;
|
|---|
| 4640 | PyObject * obj2 = 0 ;
|
|---|
| 4641 | PyObject * obj3 = 0 ;
|
|---|
| 4642 | PyObject * obj4 = 0 ;
|
|---|
| 4643 |
|
|---|
| 4644 | if (!PyArg_ParseTuple(args,(char *)"OOOOO:sht_SHsphtor_to_spat",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
|
|---|
| 4645 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4646 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4647 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_SHsphtor_to_spat" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4648 | }
|
|---|
| 4649 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4650 | arg2 = obj1;
|
|---|
| 4651 | arg3 = obj2;
|
|---|
| 4652 | arg4 = obj3;
|
|---|
| 4653 | arg5 = obj4;
|
|---|
| 4654 | {
|
|---|
| 4655 | shtns_error = 0; // clear exception
|
|---|
| 4656 | shtns_info_SHsphtor_to_spat(arg1,arg2,arg3,arg4,arg5);
|
|---|
| 4657 | if (shtns_error) {
|
|---|
| 4658 | // test for exception
|
|---|
| 4659 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4660 | }
|
|---|
| 4661 | }
|
|---|
| 4662 | resultobj = SWIG_Py_Void();
|
|---|
| 4663 | return resultobj;
|
|---|
| 4664 | fail:
|
|---|
| 4665 | return NULL;
|
|---|
| 4666 | }
|
|---|
| 4667 |
|
|---|
| 4668 |
|
|---|
| 4669 | SWIGINTERN PyObject *_wrap_sht_SHsph_to_spat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4670 | PyObject *resultobj = 0;
|
|---|
| 4671 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4672 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 4673 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 4674 | PyObject *arg4 = (PyObject *) 0 ;
|
|---|
| 4675 | void *argp1 = 0 ;
|
|---|
| 4676 | int res1 = 0 ;
|
|---|
| 4677 | PyObject * obj0 = 0 ;
|
|---|
| 4678 | PyObject * obj1 = 0 ;
|
|---|
| 4679 | PyObject * obj2 = 0 ;
|
|---|
| 4680 | PyObject * obj3 = 0 ;
|
|---|
| 4681 |
|
|---|
| 4682 | if (!PyArg_ParseTuple(args,(char *)"OOOO:sht_SHsph_to_spat",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
|
|---|
| 4683 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4684 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4685 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_SHsph_to_spat" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4686 | }
|
|---|
| 4687 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4688 | arg2 = obj1;
|
|---|
| 4689 | arg3 = obj2;
|
|---|
| 4690 | arg4 = obj3;
|
|---|
| 4691 | {
|
|---|
| 4692 | shtns_error = 0; // clear exception
|
|---|
| 4693 | shtns_info_SHsph_to_spat(arg1,arg2,arg3,arg4);
|
|---|
| 4694 | if (shtns_error) {
|
|---|
| 4695 | // test for exception
|
|---|
| 4696 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4697 | }
|
|---|
| 4698 | }
|
|---|
| 4699 | resultobj = SWIG_Py_Void();
|
|---|
| 4700 | return resultobj;
|
|---|
| 4701 | fail:
|
|---|
| 4702 | return NULL;
|
|---|
| 4703 | }
|
|---|
| 4704 |
|
|---|
| 4705 |
|
|---|
| 4706 | SWIGINTERN PyObject *_wrap_sht_SHtor_to_spat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4707 | PyObject *resultobj = 0;
|
|---|
| 4708 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4709 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 4710 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 4711 | PyObject *arg4 = (PyObject *) 0 ;
|
|---|
| 4712 | void *argp1 = 0 ;
|
|---|
| 4713 | int res1 = 0 ;
|
|---|
| 4714 | PyObject * obj0 = 0 ;
|
|---|
| 4715 | PyObject * obj1 = 0 ;
|
|---|
| 4716 | PyObject * obj2 = 0 ;
|
|---|
| 4717 | PyObject * obj3 = 0 ;
|
|---|
| 4718 |
|
|---|
| 4719 | if (!PyArg_ParseTuple(args,(char *)"OOOO:sht_SHtor_to_spat",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
|
|---|
| 4720 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4721 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4722 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_SHtor_to_spat" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4723 | }
|
|---|
| 4724 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4725 | arg2 = obj1;
|
|---|
| 4726 | arg3 = obj2;
|
|---|
| 4727 | arg4 = obj3;
|
|---|
| 4728 | {
|
|---|
| 4729 | shtns_error = 0; // clear exception
|
|---|
| 4730 | shtns_info_SHtor_to_spat(arg1,arg2,arg3,arg4);
|
|---|
| 4731 | if (shtns_error) {
|
|---|
| 4732 | // test for exception
|
|---|
| 4733 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4734 | }
|
|---|
| 4735 | }
|
|---|
| 4736 | resultobj = SWIG_Py_Void();
|
|---|
| 4737 | return resultobj;
|
|---|
| 4738 | fail:
|
|---|
| 4739 | return NULL;
|
|---|
| 4740 | }
|
|---|
| 4741 |
|
|---|
| 4742 |
|
|---|
| 4743 | SWIGINTERN PyObject *_wrap_sht_spat_to_SHqst(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4744 | PyObject *resultobj = 0;
|
|---|
| 4745 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4746 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 4747 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 4748 | PyObject *arg4 = (PyObject *) 0 ;
|
|---|
| 4749 | PyObject *arg5 = (PyObject *) 0 ;
|
|---|
| 4750 | PyObject *arg6 = (PyObject *) 0 ;
|
|---|
| 4751 | PyObject *arg7 = (PyObject *) 0 ;
|
|---|
| 4752 | void *argp1 = 0 ;
|
|---|
| 4753 | int res1 = 0 ;
|
|---|
| 4754 | PyObject * obj0 = 0 ;
|
|---|
| 4755 | PyObject * obj1 = 0 ;
|
|---|
| 4756 | PyObject * obj2 = 0 ;
|
|---|
| 4757 | PyObject * obj3 = 0 ;
|
|---|
| 4758 | PyObject * obj4 = 0 ;
|
|---|
| 4759 | PyObject * obj5 = 0 ;
|
|---|
| 4760 | PyObject * obj6 = 0 ;
|
|---|
| 4761 |
|
|---|
| 4762 | if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:sht_spat_to_SHqst",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
|
|---|
| 4763 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4764 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4765 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_spat_to_SHqst" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4766 | }
|
|---|
| 4767 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4768 | arg2 = obj1;
|
|---|
| 4769 | arg3 = obj2;
|
|---|
| 4770 | arg4 = obj3;
|
|---|
| 4771 | arg5 = obj4;
|
|---|
| 4772 | arg6 = obj5;
|
|---|
| 4773 | arg7 = obj6;
|
|---|
| 4774 | {
|
|---|
| 4775 | shtns_error = 0; // clear exception
|
|---|
| 4776 | shtns_info_spat_to_SHqst(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
|
|---|
| 4777 | if (shtns_error) {
|
|---|
| 4778 | // test for exception
|
|---|
| 4779 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4780 | }
|
|---|
| 4781 | }
|
|---|
| 4782 | resultobj = SWIG_Py_Void();
|
|---|
| 4783 | return resultobj;
|
|---|
| 4784 | fail:
|
|---|
| 4785 | return NULL;
|
|---|
| 4786 | }
|
|---|
| 4787 |
|
|---|
| 4788 |
|
|---|
| 4789 | SWIGINTERN PyObject *_wrap_sht_SHqst_to_spat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4790 | PyObject *resultobj = 0;
|
|---|
| 4791 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4792 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 4793 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 4794 | PyObject *arg4 = (PyObject *) 0 ;
|
|---|
| 4795 | PyObject *arg5 = (PyObject *) 0 ;
|
|---|
| 4796 | PyObject *arg6 = (PyObject *) 0 ;
|
|---|
| 4797 | PyObject *arg7 = (PyObject *) 0 ;
|
|---|
| 4798 | void *argp1 = 0 ;
|
|---|
| 4799 | int res1 = 0 ;
|
|---|
| 4800 | PyObject * obj0 = 0 ;
|
|---|
| 4801 | PyObject * obj1 = 0 ;
|
|---|
| 4802 | PyObject * obj2 = 0 ;
|
|---|
| 4803 | PyObject * obj3 = 0 ;
|
|---|
| 4804 | PyObject * obj4 = 0 ;
|
|---|
| 4805 | PyObject * obj5 = 0 ;
|
|---|
| 4806 | PyObject * obj6 = 0 ;
|
|---|
| 4807 |
|
|---|
| 4808 | if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:sht_SHqst_to_spat",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
|
|---|
| 4809 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4810 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4811 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_SHqst_to_spat" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4812 | }
|
|---|
| 4813 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4814 | arg2 = obj1;
|
|---|
| 4815 | arg3 = obj2;
|
|---|
| 4816 | arg4 = obj3;
|
|---|
| 4817 | arg5 = obj4;
|
|---|
| 4818 | arg6 = obj5;
|
|---|
| 4819 | arg7 = obj6;
|
|---|
| 4820 | {
|
|---|
| 4821 | shtns_error = 0; // clear exception
|
|---|
| 4822 | shtns_info_SHqst_to_spat(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
|
|---|
| 4823 | if (shtns_error) {
|
|---|
| 4824 | // test for exception
|
|---|
| 4825 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4826 | }
|
|---|
| 4827 | }
|
|---|
| 4828 | resultobj = SWIG_Py_Void();
|
|---|
| 4829 | return resultobj;
|
|---|
| 4830 | fail:
|
|---|
| 4831 | return NULL;
|
|---|
| 4832 | }
|
|---|
| 4833 |
|
|---|
| 4834 |
|
|---|
| 4835 | SWIGINTERN PyObject *_wrap_sht_SH_to_point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4836 | PyObject *resultobj = 0;
|
|---|
| 4837 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4838 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 4839 | double arg3 ;
|
|---|
| 4840 | double arg4 ;
|
|---|
| 4841 | void *argp1 = 0 ;
|
|---|
| 4842 | int res1 = 0 ;
|
|---|
| 4843 | double val3 ;
|
|---|
| 4844 | int ecode3 = 0 ;
|
|---|
| 4845 | double val4 ;
|
|---|
| 4846 | int ecode4 = 0 ;
|
|---|
| 4847 | PyObject * obj0 = 0 ;
|
|---|
| 4848 | PyObject * obj1 = 0 ;
|
|---|
| 4849 | PyObject * obj2 = 0 ;
|
|---|
| 4850 | PyObject * obj3 = 0 ;
|
|---|
| 4851 | double result;
|
|---|
| 4852 |
|
|---|
| 4853 | if (!PyArg_ParseTuple(args,(char *)"OOOO:sht_SH_to_point",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
|
|---|
| 4854 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4855 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4856 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_SH_to_point" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4857 | }
|
|---|
| 4858 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4859 | arg2 = obj1;
|
|---|
| 4860 | ecode3 = SWIG_AsVal_double(obj2, &val3);
|
|---|
| 4861 | if (!SWIG_IsOK(ecode3)) {
|
|---|
| 4862 | SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sht_SH_to_point" "', argument " "3"" of type '" "double""'");
|
|---|
| 4863 | }
|
|---|
| 4864 | arg3 = (double)(val3);
|
|---|
| 4865 | ecode4 = SWIG_AsVal_double(obj3, &val4);
|
|---|
| 4866 | if (!SWIG_IsOK(ecode4)) {
|
|---|
| 4867 | SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sht_SH_to_point" "', argument " "4"" of type '" "double""'");
|
|---|
| 4868 | }
|
|---|
| 4869 | arg4 = (double)(val4);
|
|---|
| 4870 | {
|
|---|
| 4871 | shtns_error = 0; // clear exception
|
|---|
| 4872 | result = (double)shtns_info_SH_to_point(arg1,arg2,arg3,arg4);
|
|---|
| 4873 | if (shtns_error) {
|
|---|
| 4874 | // test for exception
|
|---|
| 4875 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4876 | }
|
|---|
| 4877 | }
|
|---|
| 4878 | resultobj = SWIG_From_double((double)(result));
|
|---|
| 4879 | return resultobj;
|
|---|
| 4880 | fail:
|
|---|
| 4881 | return NULL;
|
|---|
| 4882 | }
|
|---|
| 4883 |
|
|---|
| 4884 |
|
|---|
| 4885 | SWIGINTERN PyObject *_wrap_sht_SH_to_grad_point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4886 | PyObject *resultobj = 0;
|
|---|
| 4887 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4888 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 4889 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 4890 | double arg4 ;
|
|---|
| 4891 | double arg5 ;
|
|---|
| 4892 | double *arg6 = (double *) 0 ;
|
|---|
| 4893 | double *arg7 = (double *) 0 ;
|
|---|
| 4894 | double *arg8 = (double *) 0 ;
|
|---|
| 4895 | void *argp1 = 0 ;
|
|---|
| 4896 | int res1 = 0 ;
|
|---|
| 4897 | double val4 ;
|
|---|
| 4898 | int ecode4 = 0 ;
|
|---|
| 4899 | double val5 ;
|
|---|
| 4900 | int ecode5 = 0 ;
|
|---|
| 4901 | double temp6 ;
|
|---|
| 4902 | int res6 = SWIG_TMPOBJ ;
|
|---|
| 4903 | double temp7 ;
|
|---|
| 4904 | int res7 = SWIG_TMPOBJ ;
|
|---|
| 4905 | double temp8 ;
|
|---|
| 4906 | int res8 = SWIG_TMPOBJ ;
|
|---|
| 4907 | PyObject * obj0 = 0 ;
|
|---|
| 4908 | PyObject * obj1 = 0 ;
|
|---|
| 4909 | PyObject * obj2 = 0 ;
|
|---|
| 4910 | PyObject * obj3 = 0 ;
|
|---|
| 4911 | PyObject * obj4 = 0 ;
|
|---|
| 4912 |
|
|---|
| 4913 | arg6 = &temp6;
|
|---|
| 4914 | arg7 = &temp7;
|
|---|
| 4915 | arg8 = &temp8;
|
|---|
| 4916 | if (!PyArg_ParseTuple(args,(char *)"OOOOO:sht_SH_to_grad_point",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
|
|---|
| 4917 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 4918 | if (!SWIG_IsOK(res1)) {
|
|---|
| 4919 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_SH_to_grad_point" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 4920 | }
|
|---|
| 4921 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 4922 | arg2 = obj1;
|
|---|
| 4923 | arg3 = obj2;
|
|---|
| 4924 | ecode4 = SWIG_AsVal_double(obj3, &val4);
|
|---|
| 4925 | if (!SWIG_IsOK(ecode4)) {
|
|---|
| 4926 | SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sht_SH_to_grad_point" "', argument " "4"" of type '" "double""'");
|
|---|
| 4927 | }
|
|---|
| 4928 | arg4 = (double)(val4);
|
|---|
| 4929 | ecode5 = SWIG_AsVal_double(obj4, &val5);
|
|---|
| 4930 | if (!SWIG_IsOK(ecode5)) {
|
|---|
| 4931 | SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "sht_SH_to_grad_point" "', argument " "5"" of type '" "double""'");
|
|---|
| 4932 | }
|
|---|
| 4933 | arg5 = (double)(val5);
|
|---|
| 4934 | {
|
|---|
| 4935 | shtns_error = 0; // clear exception
|
|---|
| 4936 | shtns_info_SH_to_grad_point(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
|
|---|
| 4937 | if (shtns_error) {
|
|---|
| 4938 | // test for exception
|
|---|
| 4939 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 4940 | }
|
|---|
| 4941 | }
|
|---|
| 4942 | resultobj = SWIG_Py_Void();
|
|---|
| 4943 | if (SWIG_IsTmpObj(res6)) {
|
|---|
| 4944 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
|
|---|
| 4945 | } else {
|
|---|
| 4946 | int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
|
|---|
| 4947 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
|
|---|
| 4948 | }
|
|---|
| 4949 | if (SWIG_IsTmpObj(res7)) {
|
|---|
| 4950 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
|
|---|
| 4951 | } else {
|
|---|
| 4952 | int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
|
|---|
| 4953 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
|
|---|
| 4954 | }
|
|---|
| 4955 | if (SWIG_IsTmpObj(res8)) {
|
|---|
| 4956 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8)));
|
|---|
| 4957 | } else {
|
|---|
| 4958 | int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
|
|---|
| 4959 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags));
|
|---|
| 4960 | }
|
|---|
| 4961 | return resultobj;
|
|---|
| 4962 | fail:
|
|---|
| 4963 | return NULL;
|
|---|
| 4964 | }
|
|---|
| 4965 |
|
|---|
| 4966 |
|
|---|
| 4967 | SWIGINTERN PyObject *_wrap_sht_SHqst_to_point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 4968 | PyObject *resultobj = 0;
|
|---|
| 4969 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 4970 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 4971 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 4972 | PyObject *arg4 = (PyObject *) 0 ;
|
|---|
| 4973 | double arg5 ;
|
|---|
| 4974 | double arg6 ;
|
|---|
| 4975 | double *arg7 = (double *) 0 ;
|
|---|
| 4976 | double *arg8 = (double *) 0 ;
|
|---|
| 4977 | double *arg9 = (double *) 0 ;
|
|---|
| 4978 | void *argp1 = 0 ;
|
|---|
| 4979 | int res1 = 0 ;
|
|---|
| 4980 | double val5 ;
|
|---|
| 4981 | int ecode5 = 0 ;
|
|---|
| 4982 | double val6 ;
|
|---|
| 4983 | int ecode6 = 0 ;
|
|---|
| 4984 | double temp7 ;
|
|---|
| 4985 | int res7 = SWIG_TMPOBJ ;
|
|---|
| 4986 | double temp8 ;
|
|---|
| 4987 | int res8 = SWIG_TMPOBJ ;
|
|---|
| 4988 | double temp9 ;
|
|---|
| 4989 | int res9 = SWIG_TMPOBJ ;
|
|---|
| 4990 | PyObject * obj0 = 0 ;
|
|---|
| 4991 | PyObject * obj1 = 0 ;
|
|---|
| 4992 | PyObject * obj2 = 0 ;
|
|---|
| 4993 | PyObject * obj3 = 0 ;
|
|---|
| 4994 | PyObject * obj4 = 0 ;
|
|---|
| 4995 | PyObject * obj5 = 0 ;
|
|---|
| 4996 |
|
|---|
| 4997 | arg7 = &temp7;
|
|---|
| 4998 | arg8 = &temp8;
|
|---|
| 4999 | arg9 = &temp9;
|
|---|
| 5000 | if (!PyArg_ParseTuple(args,(char *)"OOOOOO:sht_SHqst_to_point",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
|
|---|
| 5001 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 5002 | if (!SWIG_IsOK(res1)) {
|
|---|
| 5003 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_SHqst_to_point" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 5004 | }
|
|---|
| 5005 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 5006 | arg2 = obj1;
|
|---|
| 5007 | arg3 = obj2;
|
|---|
| 5008 | arg4 = obj3;
|
|---|
| 5009 | ecode5 = SWIG_AsVal_double(obj4, &val5);
|
|---|
| 5010 | if (!SWIG_IsOK(ecode5)) {
|
|---|
| 5011 | SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "sht_SHqst_to_point" "', argument " "5"" of type '" "double""'");
|
|---|
| 5012 | }
|
|---|
| 5013 | arg5 = (double)(val5);
|
|---|
| 5014 | ecode6 = SWIG_AsVal_double(obj5, &val6);
|
|---|
| 5015 | if (!SWIG_IsOK(ecode6)) {
|
|---|
| 5016 | SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "sht_SHqst_to_point" "', argument " "6"" of type '" "double""'");
|
|---|
| 5017 | }
|
|---|
| 5018 | arg6 = (double)(val6);
|
|---|
| 5019 | {
|
|---|
| 5020 | shtns_error = 0; // clear exception
|
|---|
| 5021 | shtns_info_SHqst_to_point(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
|
|---|
| 5022 | if (shtns_error) {
|
|---|
| 5023 | // test for exception
|
|---|
| 5024 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 5025 | }
|
|---|
| 5026 | }
|
|---|
| 5027 | resultobj = SWIG_Py_Void();
|
|---|
| 5028 | if (SWIG_IsTmpObj(res7)) {
|
|---|
| 5029 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
|
|---|
| 5030 | } else {
|
|---|
| 5031 | int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
|
|---|
| 5032 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
|
|---|
| 5033 | }
|
|---|
| 5034 | if (SWIG_IsTmpObj(res8)) {
|
|---|
| 5035 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg8)));
|
|---|
| 5036 | } else {
|
|---|
| 5037 | int new_flags = SWIG_IsNewObj(res8) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
|
|---|
| 5038 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg8), SWIGTYPE_p_double, new_flags));
|
|---|
| 5039 | }
|
|---|
| 5040 | if (SWIG_IsTmpObj(res9)) {
|
|---|
| 5041 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg9)));
|
|---|
| 5042 | } else {
|
|---|
| 5043 | int new_flags = SWIG_IsNewObj(res9) ? (SWIG_POINTER_OWN | 0 ) : 0 ;
|
|---|
| 5044 | resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg9), SWIGTYPE_p_double, new_flags));
|
|---|
| 5045 | }
|
|---|
| 5046 | return resultobj;
|
|---|
| 5047 | fail:
|
|---|
| 5048 | return NULL;
|
|---|
| 5049 | }
|
|---|
| 5050 |
|
|---|
| 5051 |
|
|---|
| 5052 | SWIGINTERN PyObject *_wrap_sht_Zrotate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5053 | PyObject *resultobj = 0;
|
|---|
| 5054 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 5055 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 5056 | double arg3 ;
|
|---|
| 5057 | void *argp1 = 0 ;
|
|---|
| 5058 | int res1 = 0 ;
|
|---|
| 5059 | double val3 ;
|
|---|
| 5060 | int ecode3 = 0 ;
|
|---|
| 5061 | PyObject * obj0 = 0 ;
|
|---|
| 5062 | PyObject * obj1 = 0 ;
|
|---|
| 5063 | PyObject * obj2 = 0 ;
|
|---|
| 5064 | PyObject *result = 0 ;
|
|---|
| 5065 |
|
|---|
| 5066 | if (!PyArg_ParseTuple(args,(char *)"OOO:sht_Zrotate",&obj0,&obj1,&obj2)) SWIG_fail;
|
|---|
| 5067 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 5068 | if (!SWIG_IsOK(res1)) {
|
|---|
| 5069 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_Zrotate" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 5070 | }
|
|---|
| 5071 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 5072 | arg2 = obj1;
|
|---|
| 5073 | ecode3 = SWIG_AsVal_double(obj2, &val3);
|
|---|
| 5074 | if (!SWIG_IsOK(ecode3)) {
|
|---|
| 5075 | SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sht_Zrotate" "', argument " "3"" of type '" "double""'");
|
|---|
| 5076 | }
|
|---|
| 5077 | arg3 = (double)(val3);
|
|---|
| 5078 | {
|
|---|
| 5079 | shtns_error = 0; // clear exception
|
|---|
| 5080 | result = (PyObject *)shtns_info_Zrotate(arg1,arg2,arg3);
|
|---|
| 5081 | if (shtns_error) {
|
|---|
| 5082 | // test for exception
|
|---|
| 5083 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 5084 | }
|
|---|
| 5085 | }
|
|---|
| 5086 | resultobj = result;
|
|---|
| 5087 | return resultobj;
|
|---|
| 5088 | fail:
|
|---|
| 5089 | return NULL;
|
|---|
| 5090 | }
|
|---|
| 5091 |
|
|---|
| 5092 |
|
|---|
| 5093 | SWIGINTERN PyObject *_wrap_sht_Yrotate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5094 | PyObject *resultobj = 0;
|
|---|
| 5095 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 5096 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 5097 | double arg3 ;
|
|---|
| 5098 | void *argp1 = 0 ;
|
|---|
| 5099 | int res1 = 0 ;
|
|---|
| 5100 | double val3 ;
|
|---|
| 5101 | int ecode3 = 0 ;
|
|---|
| 5102 | PyObject * obj0 = 0 ;
|
|---|
| 5103 | PyObject * obj1 = 0 ;
|
|---|
| 5104 | PyObject * obj2 = 0 ;
|
|---|
| 5105 | PyObject *result = 0 ;
|
|---|
| 5106 |
|
|---|
| 5107 | if (!PyArg_ParseTuple(args,(char *)"OOO:sht_Yrotate",&obj0,&obj1,&obj2)) SWIG_fail;
|
|---|
| 5108 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 5109 | if (!SWIG_IsOK(res1)) {
|
|---|
| 5110 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_Yrotate" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 5111 | }
|
|---|
| 5112 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 5113 | arg2 = obj1;
|
|---|
| 5114 | ecode3 = SWIG_AsVal_double(obj2, &val3);
|
|---|
| 5115 | if (!SWIG_IsOK(ecode3)) {
|
|---|
| 5116 | SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sht_Yrotate" "', argument " "3"" of type '" "double""'");
|
|---|
| 5117 | }
|
|---|
| 5118 | arg3 = (double)(val3);
|
|---|
| 5119 | {
|
|---|
| 5120 | shtns_error = 0; // clear exception
|
|---|
| 5121 | result = (PyObject *)shtns_info_Yrotate(arg1,arg2,arg3);
|
|---|
| 5122 | if (shtns_error) {
|
|---|
| 5123 | // test for exception
|
|---|
| 5124 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 5125 | }
|
|---|
| 5126 | }
|
|---|
| 5127 | resultobj = result;
|
|---|
| 5128 | return resultobj;
|
|---|
| 5129 | fail:
|
|---|
| 5130 | return NULL;
|
|---|
| 5131 | }
|
|---|
| 5132 |
|
|---|
| 5133 |
|
|---|
| 5134 | SWIGINTERN PyObject *_wrap_sht_Yrotate90(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5135 | PyObject *resultobj = 0;
|
|---|
| 5136 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 5137 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 5138 | void *argp1 = 0 ;
|
|---|
| 5139 | int res1 = 0 ;
|
|---|
| 5140 | PyObject * obj0 = 0 ;
|
|---|
| 5141 | PyObject * obj1 = 0 ;
|
|---|
| 5142 | PyObject *result = 0 ;
|
|---|
| 5143 |
|
|---|
| 5144 | if (!PyArg_ParseTuple(args,(char *)"OO:sht_Yrotate90",&obj0,&obj1)) SWIG_fail;
|
|---|
| 5145 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 5146 | if (!SWIG_IsOK(res1)) {
|
|---|
| 5147 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_Yrotate90" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 5148 | }
|
|---|
| 5149 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 5150 | arg2 = obj1;
|
|---|
| 5151 | {
|
|---|
| 5152 | shtns_error = 0; // clear exception
|
|---|
| 5153 | result = (PyObject *)shtns_info_Yrotate90(arg1,arg2);
|
|---|
| 5154 | if (shtns_error) {
|
|---|
| 5155 | // test for exception
|
|---|
| 5156 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 5157 | }
|
|---|
| 5158 | }
|
|---|
| 5159 | resultobj = result;
|
|---|
| 5160 | return resultobj;
|
|---|
| 5161 | fail:
|
|---|
| 5162 | return NULL;
|
|---|
| 5163 | }
|
|---|
| 5164 |
|
|---|
| 5165 |
|
|---|
| 5166 | SWIGINTERN PyObject *_wrap_sht_Xrotate90(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5167 | PyObject *resultobj = 0;
|
|---|
| 5168 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 5169 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 5170 | void *argp1 = 0 ;
|
|---|
| 5171 | int res1 = 0 ;
|
|---|
| 5172 | PyObject * obj0 = 0 ;
|
|---|
| 5173 | PyObject * obj1 = 0 ;
|
|---|
| 5174 | PyObject *result = 0 ;
|
|---|
| 5175 |
|
|---|
| 5176 | if (!PyArg_ParseTuple(args,(char *)"OO:sht_Xrotate90",&obj0,&obj1)) SWIG_fail;
|
|---|
| 5177 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 5178 | if (!SWIG_IsOK(res1)) {
|
|---|
| 5179 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_Xrotate90" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 5180 | }
|
|---|
| 5181 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 5182 | arg2 = obj1;
|
|---|
| 5183 | {
|
|---|
| 5184 | shtns_error = 0; // clear exception
|
|---|
| 5185 | result = (PyObject *)shtns_info_Xrotate90(arg1,arg2);
|
|---|
| 5186 | if (shtns_error) {
|
|---|
| 5187 | // test for exception
|
|---|
| 5188 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 5189 | }
|
|---|
| 5190 | }
|
|---|
| 5191 | resultobj = result;
|
|---|
| 5192 | return resultobj;
|
|---|
| 5193 | fail:
|
|---|
| 5194 | return NULL;
|
|---|
| 5195 | }
|
|---|
| 5196 |
|
|---|
| 5197 |
|
|---|
| 5198 | SWIGINTERN PyObject *_wrap_sht_SH_mul_mx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5199 | PyObject *resultobj = 0;
|
|---|
| 5200 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 5201 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 5202 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 5203 | void *argp1 = 0 ;
|
|---|
| 5204 | int res1 = 0 ;
|
|---|
| 5205 | PyObject * obj0 = 0 ;
|
|---|
| 5206 | PyObject * obj1 = 0 ;
|
|---|
| 5207 | PyObject * obj2 = 0 ;
|
|---|
| 5208 | PyObject *result = 0 ;
|
|---|
| 5209 |
|
|---|
| 5210 | if (!PyArg_ParseTuple(args,(char *)"OOO:sht_SH_mul_mx",&obj0,&obj1,&obj2)) SWIG_fail;
|
|---|
| 5211 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 5212 | if (!SWIG_IsOK(res1)) {
|
|---|
| 5213 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_SH_mul_mx" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 5214 | }
|
|---|
| 5215 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 5216 | arg2 = obj1;
|
|---|
| 5217 | arg3 = obj2;
|
|---|
| 5218 | {
|
|---|
| 5219 | shtns_error = 0; // clear exception
|
|---|
| 5220 | result = (PyObject *)shtns_info_SH_mul_mx(arg1,arg2,arg3);
|
|---|
| 5221 | if (shtns_error) {
|
|---|
| 5222 | // test for exception
|
|---|
| 5223 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 5224 | }
|
|---|
| 5225 | }
|
|---|
| 5226 | resultobj = result;
|
|---|
| 5227 | return resultobj;
|
|---|
| 5228 | fail:
|
|---|
| 5229 | return NULL;
|
|---|
| 5230 | }
|
|---|
| 5231 |
|
|---|
| 5232 |
|
|---|
| 5233 | SWIGINTERN PyObject *_wrap_sht_spat_to_SH_m(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5234 | PyObject *resultobj = 0;
|
|---|
| 5235 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 5236 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 5237 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 5238 | PyObject *arg4 = (PyObject *) 0 ;
|
|---|
| 5239 | void *argp1 = 0 ;
|
|---|
| 5240 | int res1 = 0 ;
|
|---|
| 5241 | PyObject * obj0 = 0 ;
|
|---|
| 5242 | PyObject * obj1 = 0 ;
|
|---|
| 5243 | PyObject * obj2 = 0 ;
|
|---|
| 5244 | PyObject * obj3 = 0 ;
|
|---|
| 5245 |
|
|---|
| 5246 | if (!PyArg_ParseTuple(args,(char *)"OOOO:sht_spat_to_SH_m",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
|
|---|
| 5247 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 5248 | if (!SWIG_IsOK(res1)) {
|
|---|
| 5249 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_spat_to_SH_m" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 5250 | }
|
|---|
| 5251 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 5252 | arg2 = obj1;
|
|---|
| 5253 | arg3 = obj2;
|
|---|
| 5254 | arg4 = obj3;
|
|---|
| 5255 | {
|
|---|
| 5256 | shtns_error = 0; // clear exception
|
|---|
| 5257 | shtns_info_spat_to_SH_m(arg1,arg2,arg3,arg4);
|
|---|
| 5258 | if (shtns_error) {
|
|---|
| 5259 | // test for exception
|
|---|
| 5260 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 5261 | }
|
|---|
| 5262 | }
|
|---|
| 5263 | resultobj = SWIG_Py_Void();
|
|---|
| 5264 | return resultobj;
|
|---|
| 5265 | fail:
|
|---|
| 5266 | return NULL;
|
|---|
| 5267 | }
|
|---|
| 5268 |
|
|---|
| 5269 |
|
|---|
| 5270 | SWIGINTERN PyObject *_wrap_sht_SH_to_spat_m(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5271 | PyObject *resultobj = 0;
|
|---|
| 5272 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 5273 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 5274 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 5275 | PyObject *arg4 = (PyObject *) 0 ;
|
|---|
| 5276 | void *argp1 = 0 ;
|
|---|
| 5277 | int res1 = 0 ;
|
|---|
| 5278 | PyObject * obj0 = 0 ;
|
|---|
| 5279 | PyObject * obj1 = 0 ;
|
|---|
| 5280 | PyObject * obj2 = 0 ;
|
|---|
| 5281 | PyObject * obj3 = 0 ;
|
|---|
| 5282 |
|
|---|
| 5283 | if (!PyArg_ParseTuple(args,(char *)"OOOO:sht_SH_to_spat_m",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
|
|---|
| 5284 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 5285 | if (!SWIG_IsOK(res1)) {
|
|---|
| 5286 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_SH_to_spat_m" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 5287 | }
|
|---|
| 5288 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 5289 | arg2 = obj1;
|
|---|
| 5290 | arg3 = obj2;
|
|---|
| 5291 | arg4 = obj3;
|
|---|
| 5292 | {
|
|---|
| 5293 | shtns_error = 0; // clear exception
|
|---|
| 5294 | shtns_info_SH_to_spat_m(arg1,arg2,arg3,arg4);
|
|---|
| 5295 | if (shtns_error) {
|
|---|
| 5296 | // test for exception
|
|---|
| 5297 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 5298 | }
|
|---|
| 5299 | }
|
|---|
| 5300 | resultobj = SWIG_Py_Void();
|
|---|
| 5301 | return resultobj;
|
|---|
| 5302 | fail:
|
|---|
| 5303 | return NULL;
|
|---|
| 5304 | }
|
|---|
| 5305 |
|
|---|
| 5306 |
|
|---|
| 5307 | SWIGINTERN PyObject *_wrap_sht_spat_to_SHsphtor_m(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5308 | PyObject *resultobj = 0;
|
|---|
| 5309 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 5310 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 5311 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 5312 | PyObject *arg4 = (PyObject *) 0 ;
|
|---|
| 5313 | PyObject *arg5 = (PyObject *) 0 ;
|
|---|
| 5314 | PyObject *arg6 = (PyObject *) 0 ;
|
|---|
| 5315 | void *argp1 = 0 ;
|
|---|
| 5316 | int res1 = 0 ;
|
|---|
| 5317 | PyObject * obj0 = 0 ;
|
|---|
| 5318 | PyObject * obj1 = 0 ;
|
|---|
| 5319 | PyObject * obj2 = 0 ;
|
|---|
| 5320 | PyObject * obj3 = 0 ;
|
|---|
| 5321 | PyObject * obj4 = 0 ;
|
|---|
| 5322 | PyObject * obj5 = 0 ;
|
|---|
| 5323 |
|
|---|
| 5324 | if (!PyArg_ParseTuple(args,(char *)"OOOOOO:sht_spat_to_SHsphtor_m",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
|
|---|
| 5325 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 5326 | if (!SWIG_IsOK(res1)) {
|
|---|
| 5327 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_spat_to_SHsphtor_m" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 5328 | }
|
|---|
| 5329 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 5330 | arg2 = obj1;
|
|---|
| 5331 | arg3 = obj2;
|
|---|
| 5332 | arg4 = obj3;
|
|---|
| 5333 | arg5 = obj4;
|
|---|
| 5334 | arg6 = obj5;
|
|---|
| 5335 | {
|
|---|
| 5336 | shtns_error = 0; // clear exception
|
|---|
| 5337 | shtns_info_spat_to_SHsphtor_m(arg1,arg2,arg3,arg4,arg5,arg6);
|
|---|
| 5338 | if (shtns_error) {
|
|---|
| 5339 | // test for exception
|
|---|
| 5340 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 5341 | }
|
|---|
| 5342 | }
|
|---|
| 5343 | resultobj = SWIG_Py_Void();
|
|---|
| 5344 | return resultobj;
|
|---|
| 5345 | fail:
|
|---|
| 5346 | return NULL;
|
|---|
| 5347 | }
|
|---|
| 5348 |
|
|---|
| 5349 |
|
|---|
| 5350 | SWIGINTERN PyObject *_wrap_sht_SHsphtor_to_spat_m(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5351 | PyObject *resultobj = 0;
|
|---|
| 5352 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 5353 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 5354 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 5355 | PyObject *arg4 = (PyObject *) 0 ;
|
|---|
| 5356 | PyObject *arg5 = (PyObject *) 0 ;
|
|---|
| 5357 | PyObject *arg6 = (PyObject *) 0 ;
|
|---|
| 5358 | void *argp1 = 0 ;
|
|---|
| 5359 | int res1 = 0 ;
|
|---|
| 5360 | PyObject * obj0 = 0 ;
|
|---|
| 5361 | PyObject * obj1 = 0 ;
|
|---|
| 5362 | PyObject * obj2 = 0 ;
|
|---|
| 5363 | PyObject * obj3 = 0 ;
|
|---|
| 5364 | PyObject * obj4 = 0 ;
|
|---|
| 5365 | PyObject * obj5 = 0 ;
|
|---|
| 5366 |
|
|---|
| 5367 | if (!PyArg_ParseTuple(args,(char *)"OOOOOO:sht_SHsphtor_to_spat_m",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
|
|---|
| 5368 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 5369 | if (!SWIG_IsOK(res1)) {
|
|---|
| 5370 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_SHsphtor_to_spat_m" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 5371 | }
|
|---|
| 5372 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 5373 | arg2 = obj1;
|
|---|
| 5374 | arg3 = obj2;
|
|---|
| 5375 | arg4 = obj3;
|
|---|
| 5376 | arg5 = obj4;
|
|---|
| 5377 | arg6 = obj5;
|
|---|
| 5378 | {
|
|---|
| 5379 | shtns_error = 0; // clear exception
|
|---|
| 5380 | shtns_info_SHsphtor_to_spat_m(arg1,arg2,arg3,arg4,arg5,arg6);
|
|---|
| 5381 | if (shtns_error) {
|
|---|
| 5382 | // test for exception
|
|---|
| 5383 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 5384 | }
|
|---|
| 5385 | }
|
|---|
| 5386 | resultobj = SWIG_Py_Void();
|
|---|
| 5387 | return resultobj;
|
|---|
| 5388 | fail:
|
|---|
| 5389 | return NULL;
|
|---|
| 5390 | }
|
|---|
| 5391 |
|
|---|
| 5392 |
|
|---|
| 5393 | SWIGINTERN PyObject *_wrap_sht_SHsph_to_spat_m(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5394 | PyObject *resultobj = 0;
|
|---|
| 5395 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 5396 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 5397 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 5398 | PyObject *arg4 = (PyObject *) 0 ;
|
|---|
| 5399 | PyObject *arg5 = (PyObject *) 0 ;
|
|---|
| 5400 | void *argp1 = 0 ;
|
|---|
| 5401 | int res1 = 0 ;
|
|---|
| 5402 | PyObject * obj0 = 0 ;
|
|---|
| 5403 | PyObject * obj1 = 0 ;
|
|---|
| 5404 | PyObject * obj2 = 0 ;
|
|---|
| 5405 | PyObject * obj3 = 0 ;
|
|---|
| 5406 | PyObject * obj4 = 0 ;
|
|---|
| 5407 |
|
|---|
| 5408 | if (!PyArg_ParseTuple(args,(char *)"OOOOO:sht_SHsph_to_spat_m",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
|
|---|
| 5409 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 5410 | if (!SWIG_IsOK(res1)) {
|
|---|
| 5411 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_SHsph_to_spat_m" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 5412 | }
|
|---|
| 5413 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 5414 | arg2 = obj1;
|
|---|
| 5415 | arg3 = obj2;
|
|---|
| 5416 | arg4 = obj3;
|
|---|
| 5417 | arg5 = obj4;
|
|---|
| 5418 | {
|
|---|
| 5419 | shtns_error = 0; // clear exception
|
|---|
| 5420 | shtns_info_SHsph_to_spat_m(arg1,arg2,arg3,arg4,arg5);
|
|---|
| 5421 | if (shtns_error) {
|
|---|
| 5422 | // test for exception
|
|---|
| 5423 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 5424 | }
|
|---|
| 5425 | }
|
|---|
| 5426 | resultobj = SWIG_Py_Void();
|
|---|
| 5427 | return resultobj;
|
|---|
| 5428 | fail:
|
|---|
| 5429 | return NULL;
|
|---|
| 5430 | }
|
|---|
| 5431 |
|
|---|
| 5432 |
|
|---|
| 5433 | SWIGINTERN PyObject *_wrap_sht_SHtor_to_spat_m(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5434 | PyObject *resultobj = 0;
|
|---|
| 5435 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 5436 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 5437 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 5438 | PyObject *arg4 = (PyObject *) 0 ;
|
|---|
| 5439 | PyObject *arg5 = (PyObject *) 0 ;
|
|---|
| 5440 | void *argp1 = 0 ;
|
|---|
| 5441 | int res1 = 0 ;
|
|---|
| 5442 | PyObject * obj0 = 0 ;
|
|---|
| 5443 | PyObject * obj1 = 0 ;
|
|---|
| 5444 | PyObject * obj2 = 0 ;
|
|---|
| 5445 | PyObject * obj3 = 0 ;
|
|---|
| 5446 | PyObject * obj4 = 0 ;
|
|---|
| 5447 |
|
|---|
| 5448 | if (!PyArg_ParseTuple(args,(char *)"OOOOO:sht_SHtor_to_spat_m",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
|
|---|
| 5449 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 5450 | if (!SWIG_IsOK(res1)) {
|
|---|
| 5451 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_SHtor_to_spat_m" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 5452 | }
|
|---|
| 5453 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 5454 | arg2 = obj1;
|
|---|
| 5455 | arg3 = obj2;
|
|---|
| 5456 | arg4 = obj3;
|
|---|
| 5457 | arg5 = obj4;
|
|---|
| 5458 | {
|
|---|
| 5459 | shtns_error = 0; // clear exception
|
|---|
| 5460 | shtns_info_SHtor_to_spat_m(arg1,arg2,arg3,arg4,arg5);
|
|---|
| 5461 | if (shtns_error) {
|
|---|
| 5462 | // test for exception
|
|---|
| 5463 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 5464 | }
|
|---|
| 5465 | }
|
|---|
| 5466 | resultobj = SWIG_Py_Void();
|
|---|
| 5467 | return resultobj;
|
|---|
| 5468 | fail:
|
|---|
| 5469 | return NULL;
|
|---|
| 5470 | }
|
|---|
| 5471 |
|
|---|
| 5472 |
|
|---|
| 5473 | SWIGINTERN PyObject *_wrap_sht_spat_to_SHqst_m(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5474 | PyObject *resultobj = 0;
|
|---|
| 5475 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 5476 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 5477 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 5478 | PyObject *arg4 = (PyObject *) 0 ;
|
|---|
| 5479 | PyObject *arg5 = (PyObject *) 0 ;
|
|---|
| 5480 | PyObject *arg6 = (PyObject *) 0 ;
|
|---|
| 5481 | PyObject *arg7 = (PyObject *) 0 ;
|
|---|
| 5482 | PyObject *arg8 = (PyObject *) 0 ;
|
|---|
| 5483 | void *argp1 = 0 ;
|
|---|
| 5484 | int res1 = 0 ;
|
|---|
| 5485 | PyObject * obj0 = 0 ;
|
|---|
| 5486 | PyObject * obj1 = 0 ;
|
|---|
| 5487 | PyObject * obj2 = 0 ;
|
|---|
| 5488 | PyObject * obj3 = 0 ;
|
|---|
| 5489 | PyObject * obj4 = 0 ;
|
|---|
| 5490 | PyObject * obj5 = 0 ;
|
|---|
| 5491 | PyObject * obj6 = 0 ;
|
|---|
| 5492 | PyObject * obj7 = 0 ;
|
|---|
| 5493 |
|
|---|
| 5494 | if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:sht_spat_to_SHqst_m",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
|
|---|
| 5495 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 5496 | if (!SWIG_IsOK(res1)) {
|
|---|
| 5497 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_spat_to_SHqst_m" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 5498 | }
|
|---|
| 5499 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 5500 | arg2 = obj1;
|
|---|
| 5501 | arg3 = obj2;
|
|---|
| 5502 | arg4 = obj3;
|
|---|
| 5503 | arg5 = obj4;
|
|---|
| 5504 | arg6 = obj5;
|
|---|
| 5505 | arg7 = obj6;
|
|---|
| 5506 | arg8 = obj7;
|
|---|
| 5507 | {
|
|---|
| 5508 | shtns_error = 0; // clear exception
|
|---|
| 5509 | shtns_info_spat_to_SHqst_m(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
|
|---|
| 5510 | if (shtns_error) {
|
|---|
| 5511 | // test for exception
|
|---|
| 5512 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 5513 | }
|
|---|
| 5514 | }
|
|---|
| 5515 | resultobj = SWIG_Py_Void();
|
|---|
| 5516 | return resultobj;
|
|---|
| 5517 | fail:
|
|---|
| 5518 | return NULL;
|
|---|
| 5519 | }
|
|---|
| 5520 |
|
|---|
| 5521 |
|
|---|
| 5522 | SWIGINTERN PyObject *_wrap_sht_SHqst_to_spat_m(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5523 | PyObject *resultobj = 0;
|
|---|
| 5524 | struct shtns_info *arg1 = (struct shtns_info *) 0 ;
|
|---|
| 5525 | PyObject *arg2 = (PyObject *) 0 ;
|
|---|
| 5526 | PyObject *arg3 = (PyObject *) 0 ;
|
|---|
| 5527 | PyObject *arg4 = (PyObject *) 0 ;
|
|---|
| 5528 | PyObject *arg5 = (PyObject *) 0 ;
|
|---|
| 5529 | PyObject *arg6 = (PyObject *) 0 ;
|
|---|
| 5530 | PyObject *arg7 = (PyObject *) 0 ;
|
|---|
| 5531 | PyObject *arg8 = (PyObject *) 0 ;
|
|---|
| 5532 | void *argp1 = 0 ;
|
|---|
| 5533 | int res1 = 0 ;
|
|---|
| 5534 | PyObject * obj0 = 0 ;
|
|---|
| 5535 | PyObject * obj1 = 0 ;
|
|---|
| 5536 | PyObject * obj2 = 0 ;
|
|---|
| 5537 | PyObject * obj3 = 0 ;
|
|---|
| 5538 | PyObject * obj4 = 0 ;
|
|---|
| 5539 | PyObject * obj5 = 0 ;
|
|---|
| 5540 | PyObject * obj6 = 0 ;
|
|---|
| 5541 | PyObject * obj7 = 0 ;
|
|---|
| 5542 |
|
|---|
| 5543 | if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:sht_SHqst_to_spat_m",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
|
|---|
| 5544 | res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_shtns_info, 0 | 0 );
|
|---|
| 5545 | if (!SWIG_IsOK(res1)) {
|
|---|
| 5546 | SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sht_SHqst_to_spat_m" "', argument " "1"" of type '" "struct shtns_info *""'");
|
|---|
| 5547 | }
|
|---|
| 5548 | arg1 = (struct shtns_info *)(argp1);
|
|---|
| 5549 | arg2 = obj1;
|
|---|
| 5550 | arg3 = obj2;
|
|---|
| 5551 | arg4 = obj3;
|
|---|
| 5552 | arg5 = obj4;
|
|---|
| 5553 | arg6 = obj5;
|
|---|
| 5554 | arg7 = obj6;
|
|---|
| 5555 | arg8 = obj7;
|
|---|
| 5556 | {
|
|---|
| 5557 | shtns_error = 0; // clear exception
|
|---|
| 5558 | shtns_info_SHqst_to_spat_m(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
|
|---|
| 5559 | if (shtns_error) {
|
|---|
| 5560 | // test for exception
|
|---|
| 5561 | SWIG_exception(shtns_error, shtns_err_msg); return NULL;
|
|---|
| 5562 | }
|
|---|
| 5563 | }
|
|---|
| 5564 | resultobj = SWIG_Py_Void();
|
|---|
| 5565 | return resultobj;
|
|---|
| 5566 | fail:
|
|---|
| 5567 | return NULL;
|
|---|
| 5568 | }
|
|---|
| 5569 |
|
|---|
| 5570 |
|
|---|
| 5571 | SWIGINTERN PyObject *sht_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5572 | PyObject *obj;
|
|---|
| 5573 | if (!PyArg_ParseTuple(args,(char*)"O:swigregister", &obj)) return NULL;
|
|---|
| 5574 | SWIG_TypeNewClientData(SWIGTYPE_p_shtns_info, SWIG_NewClientData(obj));
|
|---|
| 5575 | return SWIG_Py_Void();
|
|---|
| 5576 | }
|
|---|
| 5577 |
|
|---|
| 5578 | SWIGINTERN PyObject *_wrap_nlm_calc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5579 | PyObject *resultobj = 0;
|
|---|
| 5580 | long arg1 ;
|
|---|
| 5581 | long arg2 ;
|
|---|
| 5582 | long arg3 ;
|
|---|
| 5583 | long val1 ;
|
|---|
| 5584 | int ecode1 = 0 ;
|
|---|
| 5585 | long val2 ;
|
|---|
| 5586 | int ecode2 = 0 ;
|
|---|
| 5587 | long val3 ;
|
|---|
| 5588 | int ecode3 = 0 ;
|
|---|
| 5589 | PyObject * obj0 = 0 ;
|
|---|
| 5590 | PyObject * obj1 = 0 ;
|
|---|
| 5591 | PyObject * obj2 = 0 ;
|
|---|
| 5592 | long result;
|
|---|
| 5593 |
|
|---|
| 5594 | if (!PyArg_ParseTuple(args,(char *)"OOO:nlm_calc",&obj0,&obj1,&obj2)) SWIG_fail;
|
|---|
| 5595 | ecode1 = SWIG_AsVal_long(obj0, &val1);
|
|---|
| 5596 | if (!SWIG_IsOK(ecode1)) {
|
|---|
| 5597 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "nlm_calc" "', argument " "1"" of type '" "long""'");
|
|---|
| 5598 | }
|
|---|
| 5599 | arg1 = (long)(val1);
|
|---|
| 5600 | ecode2 = SWIG_AsVal_long(obj1, &val2);
|
|---|
| 5601 | if (!SWIG_IsOK(ecode2)) {
|
|---|
| 5602 | SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "nlm_calc" "', argument " "2"" of type '" "long""'");
|
|---|
| 5603 | }
|
|---|
| 5604 | arg2 = (long)(val2);
|
|---|
| 5605 | ecode3 = SWIG_AsVal_long(obj2, &val3);
|
|---|
| 5606 | if (!SWIG_IsOK(ecode3)) {
|
|---|
| 5607 | SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "nlm_calc" "', argument " "3"" of type '" "long""'");
|
|---|
| 5608 | }
|
|---|
| 5609 | arg3 = (long)(val3);
|
|---|
| 5610 | result = (long)nlm_calc(arg1,arg2,arg3);
|
|---|
| 5611 | resultobj = SWIG_From_long((long)(result));
|
|---|
| 5612 | return resultobj;
|
|---|
| 5613 | fail:
|
|---|
| 5614 | return NULL;
|
|---|
| 5615 | }
|
|---|
| 5616 |
|
|---|
| 5617 |
|
|---|
| 5618 | SWIGINTERN PyObject *_wrap_set_verbosity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5619 | PyObject *resultobj = 0;
|
|---|
| 5620 | int arg1 ;
|
|---|
| 5621 | int val1 ;
|
|---|
| 5622 | int ecode1 = 0 ;
|
|---|
| 5623 | PyObject * obj0 = 0 ;
|
|---|
| 5624 |
|
|---|
| 5625 | if (!PyArg_ParseTuple(args,(char *)"O:set_verbosity",&obj0)) SWIG_fail;
|
|---|
| 5626 | ecode1 = SWIG_AsVal_int(obj0, &val1);
|
|---|
| 5627 | if (!SWIG_IsOK(ecode1)) {
|
|---|
| 5628 | SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "set_verbosity" "', argument " "1"" of type '" "int""'");
|
|---|
| 5629 | }
|
|---|
| 5630 | arg1 = (int)(val1);
|
|---|
| 5631 | shtns_verbose(arg1);
|
|---|
| 5632 | resultobj = SWIG_Py_Void();
|
|---|
| 5633 | return resultobj;
|
|---|
| 5634 | fail:
|
|---|
| 5635 | return NULL;
|
|---|
| 5636 | }
|
|---|
| 5637 |
|
|---|
| 5638 |
|
|---|
| 5639 | SWIGINTERN PyObject *_wrap_print_version(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
|
|---|
| 5640 | PyObject *resultobj = 0;
|
|---|
| 5641 |
|
|---|
| 5642 | if (!PyArg_ParseTuple(args,(char *)":print_version")) SWIG_fail;
|
|---|
| 5643 | shtns_print_version();
|
|---|
| 5644 | resultobj = SWIG_Py_Void();
|
|---|
| 5645 | return resultobj;
|
|---|
| 5646 | fail:
|
|---|
| 5647 | return NULL;
|
|---|
| 5648 | }
|
|---|
| 5649 |
|
|---|
| 5650 |
|
|---|
| 5651 | static PyMethodDef SwigMethods[] = {
|
|---|
| 5652 | { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
|
|---|
| 5653 | { (char *)"sht_orthonormal_swigconstant", sht_orthonormal_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5654 | { (char *)"sht_fourpi_swigconstant", sht_fourpi_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5655 | { (char *)"sht_schmidt_swigconstant", sht_schmidt_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5656 | { (char *)"SHT_NO_CS_PHASE_swigconstant", SHT_NO_CS_PHASE_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5657 | { (char *)"SHT_REAL_NORM_swigconstant", SHT_REAL_NORM_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5658 | { (char *)"sht_gauss_swigconstant", sht_gauss_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5659 | { (char *)"sht_auto_swigconstant", sht_auto_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5660 | { (char *)"sht_reg_fast_swigconstant", sht_reg_fast_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5661 | { (char *)"sht_reg_dct_swigconstant", sht_reg_dct_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5662 | { (char *)"sht_quick_init_swigconstant", sht_quick_init_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5663 | { (char *)"sht_reg_poles_swigconstant", sht_reg_poles_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5664 | { (char *)"sht_gauss_fly_swigconstant", sht_gauss_fly_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5665 | { (char *)"SHT_THETA_CONTIGUOUS_swigconstant", SHT_THETA_CONTIGUOUS_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5666 | { (char *)"SHT_PHI_CONTIGUOUS_swigconstant", SHT_PHI_CONTIGUOUS_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5667 | { (char *)"SHT_SOUTH_POLE_FIRST_swigconstant", SHT_SOUTH_POLE_FIRST_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5668 | { (char *)"SHT_SCALAR_ONLY_swigconstant", SHT_SCALAR_ONLY_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5669 | { (char *)"SHT_LOAD_SAVE_CFG_swigconstant", SHT_LOAD_SAVE_CFG_swigconstant, METH_VARARGS, NULL},
|
|---|
| 5670 | { (char *)"sht_nlm_get", _wrap_sht_nlm_get, METH_VARARGS, (char *)"sht_nlm_get(sht self) -> unsigned int const"},
|
|---|
| 5671 | { (char *)"sht_lmax_get", _wrap_sht_lmax_get, METH_VARARGS, (char *)"sht_lmax_get(sht self) -> unsigned short const"},
|
|---|
| 5672 | { (char *)"sht_mmax_get", _wrap_sht_mmax_get, METH_VARARGS, (char *)"sht_mmax_get(sht self) -> unsigned short const"},
|
|---|
| 5673 | { (char *)"sht_mres_get", _wrap_sht_mres_get, METH_VARARGS, (char *)"sht_mres_get(sht self) -> unsigned short const"},
|
|---|
| 5674 | { (char *)"sht_nphi_get", _wrap_sht_nphi_get, METH_VARARGS, (char *)"sht_nphi_get(sht self) -> unsigned short const"},
|
|---|
| 5675 | { (char *)"sht_nlat_get", _wrap_sht_nlat_get, METH_VARARGS, (char *)"sht_nlat_get(sht self) -> unsigned short const"},
|
|---|
| 5676 | { (char *)"sht_nspat_get", _wrap_sht_nspat_get, METH_VARARGS, (char *)"sht_nspat_get(sht self) -> unsigned int const"},
|
|---|
| 5677 | { (char *)"new_sht", (PyCFunction) _wrap_new_sht, METH_VARARGS | METH_KEYWORDS, (char *)"new_sht(int lmax, int mmax=-1, int mres=1, int norm=sht_orthonormal, int nthreads=0) -> sht"},
|
|---|
| 5678 | { (char *)"delete_sht", _wrap_delete_sht, METH_VARARGS, (char *)"delete_sht(sht self)"},
|
|---|
| 5679 | { (char *)"sht_set_grid", (PyCFunction) _wrap_sht_set_grid, METH_VARARGS | METH_KEYWORDS, (char *)"sht_set_grid(sht self, int nlat=0, int nphi=0, int flags=sht_quick_init, double polar_opt=1.0e-8, int nl_order=1)"},
|
|---|
| 5680 | { (char *)"sht_print_info", _wrap_sht_print_info, METH_VARARGS, (char *)"sht_print_info(sht self)"},
|
|---|
| 5681 | { (char *)"sht_sh00_1", _wrap_sht_sh00_1, METH_VARARGS, (char *)"sht_sh00_1(sht self) -> double"},
|
|---|
| 5682 | { (char *)"sht_sh10_ct", _wrap_sht_sh10_ct, METH_VARARGS, (char *)"sht_sh10_ct(sht self) -> double"},
|
|---|
| 5683 | { (char *)"sht_sh11_st", _wrap_sht_sh11_st, METH_VARARGS, (char *)"sht_sh11_st(sht self) -> double"},
|
|---|
| 5684 | { (char *)"sht_shlm_e1", _wrap_sht_shlm_e1, METH_VARARGS, (char *)"sht_shlm_e1(sht self, unsigned int l, unsigned int m) -> double"},
|
|---|
| 5685 | { (char *)"sht___ct", _wrap_sht___ct, METH_VARARGS, (char *)"sht___ct(sht self) -> PyObject *"},
|
|---|
| 5686 | { (char *)"sht_gauss_wts", _wrap_sht_gauss_wts, METH_VARARGS, (char *)"sht_gauss_wts(sht self) -> PyObject *"},
|
|---|
| 5687 | { (char *)"sht_mul_ct_matrix", _wrap_sht_mul_ct_matrix, METH_VARARGS, (char *)"sht_mul_ct_matrix(sht self) -> PyObject *"},
|
|---|
| 5688 | { (char *)"sht_st_dt_matrix", _wrap_sht_st_dt_matrix, METH_VARARGS, (char *)"sht_st_dt_matrix(sht self) -> PyObject *"},
|
|---|
| 5689 | { (char *)"sht___spat_shape", _wrap_sht___spat_shape, METH_VARARGS, (char *)"sht___spat_shape(sht self)"},
|
|---|
| 5690 | { (char *)"sht_idx", _wrap_sht_idx, METH_VARARGS, (char *)"sht_idx(sht self, unsigned int l, unsigned int m) -> int"},
|
|---|
| 5691 | { (char *)"sht_spat_to_SH", _wrap_sht_spat_to_SH, METH_VARARGS, (char *)"sht_spat_to_SH(sht self, PyObject * Vr, PyObject * Qlm)"},
|
|---|
| 5692 | { (char *)"sht_SH_to_spat", _wrap_sht_SH_to_spat, METH_VARARGS, (char *)"sht_SH_to_spat(sht self, PyObject * Qlm, PyObject * Vr)"},
|
|---|
| 5693 | { (char *)"sht_spat_cplx_to_SH", _wrap_sht_spat_cplx_to_SH, METH_VARARGS, (char *)"sht_spat_cplx_to_SH(sht self, PyObject * z, PyObject * alm)"},
|
|---|
| 5694 | { (char *)"sht_SH_to_spat_cplx", _wrap_sht_SH_to_spat_cplx, METH_VARARGS, (char *)"sht_SH_to_spat_cplx(sht self, PyObject * alm, PyObject * z)"},
|
|---|
| 5695 | { (char *)"sht_spat_to_SHsphtor", _wrap_sht_spat_to_SHsphtor, METH_VARARGS, (char *)"sht_spat_to_SHsphtor(sht self, PyObject * Vt, PyObject * Vp, PyObject * Slm, PyObject * Tlm)"},
|
|---|
| 5696 | { (char *)"sht_SHsphtor_to_spat", _wrap_sht_SHsphtor_to_spat, METH_VARARGS, (char *)"sht_SHsphtor_to_spat(sht self, PyObject * Slm, PyObject * Tlm, PyObject * Vt, PyObject * Vp)"},
|
|---|
| 5697 | { (char *)"sht_SHsph_to_spat", _wrap_sht_SHsph_to_spat, METH_VARARGS, (char *)"sht_SHsph_to_spat(sht self, PyObject * Slm, PyObject * Vt, PyObject * Vp)"},
|
|---|
| 5698 | { (char *)"sht_SHtor_to_spat", _wrap_sht_SHtor_to_spat, METH_VARARGS, (char *)"sht_SHtor_to_spat(sht self, PyObject * Tlm, PyObject * Vt, PyObject * Vp)"},
|
|---|
| 5699 | { (char *)"sht_spat_to_SHqst", _wrap_sht_spat_to_SHqst, METH_VARARGS, (char *)"sht_spat_to_SHqst(sht self, PyObject * Vr, PyObject * Vt, PyObject * Vp, PyObject * Qlm, PyObject * Slm, PyObject * Tlm)"},
|
|---|
| 5700 | { (char *)"sht_SHqst_to_spat", _wrap_sht_SHqst_to_spat, METH_VARARGS, (char *)"sht_SHqst_to_spat(sht self, PyObject * Qlm, PyObject * Slm, PyObject * Tlm, PyObject * Vr, PyObject * Vt, PyObject * Vp)"},
|
|---|
| 5701 | { (char *)"sht_SH_to_point", _wrap_sht_SH_to_point, METH_VARARGS, (char *)"sht_SH_to_point(sht self, PyObject * Qlm, double cost, double phi) -> double"},
|
|---|
| 5702 | { (char *)"sht_SH_to_grad_point", _wrap_sht_SH_to_grad_point, METH_VARARGS, (char *)"sht_SH_to_grad_point(sht self, PyObject * DrSlm, PyObject * Slm, double cost, double phi)"},
|
|---|
| 5703 | { (char *)"sht_SHqst_to_point", _wrap_sht_SHqst_to_point, METH_VARARGS, (char *)"sht_SHqst_to_point(sht self, PyObject * Qlm, PyObject * Slm, PyObject * Tlm, double cost, double phi)"},
|
|---|
| 5704 | { (char *)"sht_Zrotate", _wrap_sht_Zrotate, METH_VARARGS, (char *)"sht_Zrotate(sht self, PyObject * Qlm, double alpha) -> PyObject *"},
|
|---|
| 5705 | { (char *)"sht_Yrotate", _wrap_sht_Yrotate, METH_VARARGS, (char *)"sht_Yrotate(sht self, PyObject * Qlm, double alpha) -> PyObject *"},
|
|---|
| 5706 | { (char *)"sht_Yrotate90", _wrap_sht_Yrotate90, METH_VARARGS, (char *)"sht_Yrotate90(sht self, PyObject * Qlm) -> PyObject *"},
|
|---|
| 5707 | { (char *)"sht_Xrotate90", _wrap_sht_Xrotate90, METH_VARARGS, (char *)"sht_Xrotate90(sht self, PyObject * Qlm) -> PyObject *"},
|
|---|
| 5708 | { (char *)"sht_SH_mul_mx", _wrap_sht_SH_mul_mx, METH_VARARGS, (char *)"sht_SH_mul_mx(sht self, PyObject * mx, PyObject * Qlm) -> PyObject *"},
|
|---|
| 5709 | { (char *)"sht_spat_to_SH_m", _wrap_sht_spat_to_SH_m, METH_VARARGS, (char *)"sht_spat_to_SH_m(sht self, PyObject * Vr, PyObject * Qlm, PyObject * im)"},
|
|---|
| 5710 | { (char *)"sht_SH_to_spat_m", _wrap_sht_SH_to_spat_m, METH_VARARGS, (char *)"sht_SH_to_spat_m(sht self, PyObject * Qlm, PyObject * Vr, PyObject * im)"},
|
|---|
| 5711 | { (char *)"sht_spat_to_SHsphtor_m", _wrap_sht_spat_to_SHsphtor_m, METH_VARARGS, (char *)"sht_spat_to_SHsphtor_m(sht self, PyObject * Vt, PyObject * Vp, PyObject * Slm, PyObject * Tlm, PyObject * im)"},
|
|---|
| 5712 | { (char *)"sht_SHsphtor_to_spat_m", _wrap_sht_SHsphtor_to_spat_m, METH_VARARGS, (char *)"sht_SHsphtor_to_spat_m(sht self, PyObject * Slm, PyObject * Tlm, PyObject * Vt, PyObject * Vp, PyObject * im)"},
|
|---|
| 5713 | { (char *)"sht_SHsph_to_spat_m", _wrap_sht_SHsph_to_spat_m, METH_VARARGS, (char *)"sht_SHsph_to_spat_m(sht self, PyObject * Slm, PyObject * Vt, PyObject * Vp, PyObject * im)"},
|
|---|
| 5714 | { (char *)"sht_SHtor_to_spat_m", _wrap_sht_SHtor_to_spat_m, METH_VARARGS, (char *)"sht_SHtor_to_spat_m(sht self, PyObject * Tlm, PyObject * Vt, PyObject * Vp, PyObject * im)"},
|
|---|
| 5715 | { (char *)"sht_spat_to_SHqst_m", _wrap_sht_spat_to_SHqst_m, METH_VARARGS, (char *)"sht_spat_to_SHqst_m(sht self, PyObject * Vr, PyObject * Vt, PyObject * Vp, PyObject * Qlm, PyObject * Slm, PyObject * Tlm, PyObject * im)"},
|
|---|
| 5716 | { (char *)"sht_SHqst_to_spat_m", _wrap_sht_SHqst_to_spat_m, METH_VARARGS, (char *)"sht_SHqst_to_spat_m(sht self, PyObject * Qlm, PyObject * Slm, PyObject * Tlm, PyObject * Vr, PyObject * Vt, PyObject * Vp, PyObject * im)"},
|
|---|
| 5717 | { (char *)"sht_swigregister", sht_swigregister, METH_VARARGS, NULL},
|
|---|
| 5718 | { (char *)"nlm_calc", _wrap_nlm_calc, METH_VARARGS, (char *)"nlm_calc(long lmax, long mmax, long mres) -> long"},
|
|---|
| 5719 | { (char *)"set_verbosity", _wrap_set_verbosity, METH_VARARGS, (char *)"set_verbosity(int arg1)"},
|
|---|
| 5720 | { (char *)"print_version", _wrap_print_version, METH_VARARGS, (char *)"print_version()"},
|
|---|
| 5721 | { NULL, NULL, 0, NULL }
|
|---|
| 5722 | };
|
|---|
| 5723 |
|
|---|
| 5724 |
|
|---|
| 5725 | /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
|
|---|
| 5726 |
|
|---|
| 5727 | static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
|
|---|
| 5728 | static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
|
|---|
| 5729 | static swig_type_info _swigt__p_double_complex = {"_p_double_complex", "cplx *|double complex *", 0, 0, (void*)0, 0};
|
|---|
| 5730 | static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
|
|---|
| 5731 | static swig_type_info _swigt__p_shtns_info = {"_p_shtns_info", "struct shtns_info *|shtns_info *", 0, 0, (void*)0, 0};
|
|---|
| 5732 |
|
|---|
| 5733 | static swig_type_info *swig_type_initial[] = {
|
|---|
| 5734 | &_swigt__p_char,
|
|---|
| 5735 | &_swigt__p_double,
|
|---|
| 5736 | &_swigt__p_double_complex,
|
|---|
| 5737 | &_swigt__p_int,
|
|---|
| 5738 | &_swigt__p_shtns_info,
|
|---|
| 5739 | };
|
|---|
| 5740 |
|
|---|
| 5741 | static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
|
|---|
| 5742 | static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
|
|---|
| 5743 | static swig_cast_info _swigc__p_double_complex[] = { {&_swigt__p_double_complex, 0, 0, 0},{0, 0, 0, 0}};
|
|---|
| 5744 | static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
|
|---|
| 5745 | static swig_cast_info _swigc__p_shtns_info[] = { {&_swigt__p_shtns_info, 0, 0, 0},{0, 0, 0, 0}};
|
|---|
| 5746 |
|
|---|
| 5747 | static swig_cast_info *swig_cast_initial[] = {
|
|---|
| 5748 | _swigc__p_char,
|
|---|
| 5749 | _swigc__p_double,
|
|---|
| 5750 | _swigc__p_double_complex,
|
|---|
| 5751 | _swigc__p_int,
|
|---|
| 5752 | _swigc__p_shtns_info,
|
|---|
| 5753 | };
|
|---|
| 5754 |
|
|---|
| 5755 |
|
|---|
| 5756 | /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
|
|---|
| 5757 |
|
|---|
| 5758 | static swig_const_info swig_const_table[] = {
|
|---|
| 5759 | {0, 0, 0, 0.0, 0, 0}};
|
|---|
| 5760 |
|
|---|
| 5761 | #ifdef __cplusplus
|
|---|
| 5762 | }
|
|---|
| 5763 | #endif
|
|---|
| 5764 | /* -----------------------------------------------------------------------------
|
|---|
| 5765 | * Type initialization:
|
|---|
| 5766 | * This problem is tough by the requirement that no dynamic
|
|---|
| 5767 | * memory is used. Also, since swig_type_info structures store pointers to
|
|---|
| 5768 | * swig_cast_info structures and swig_cast_info structures store pointers back
|
|---|
| 5769 | * to swig_type_info structures, we need some lookup code at initialization.
|
|---|
| 5770 | * The idea is that swig generates all the structures that are needed.
|
|---|
| 5771 | * The runtime then collects these partially filled structures.
|
|---|
| 5772 | * The SWIG_InitializeModule function takes these initial arrays out of
|
|---|
| 5773 | * swig_module, and does all the lookup, filling in the swig_module.types
|
|---|
| 5774 | * array with the correct data and linking the correct swig_cast_info
|
|---|
| 5775 | * structures together.
|
|---|
| 5776 | *
|
|---|
| 5777 | * The generated swig_type_info structures are assigned statically to an initial
|
|---|
| 5778 | * array. We just loop through that array, and handle each type individually.
|
|---|
| 5779 | * First we lookup if this type has been already loaded, and if so, use the
|
|---|
| 5780 | * loaded structure instead of the generated one. Then we have to fill in the
|
|---|
| 5781 | * cast linked list. The cast data is initially stored in something like a
|
|---|
| 5782 | * two-dimensional array. Each row corresponds to a type (there are the same
|
|---|
| 5783 | * number of rows as there are in the swig_type_initial array). Each entry in
|
|---|
| 5784 | * a column is one of the swig_cast_info structures for that type.
|
|---|
| 5785 | * The cast_initial array is actually an array of arrays, because each row has
|
|---|
| 5786 | * a variable number of columns. So to actually build the cast linked list,
|
|---|
| 5787 | * we find the array of casts associated with the type, and loop through it
|
|---|
| 5788 | * adding the casts to the list. The one last trick we need to do is making
|
|---|
| 5789 | * sure the type pointer in the swig_cast_info struct is correct.
|
|---|
| 5790 | *
|
|---|
| 5791 | * First off, we lookup the cast->type name to see if it is already loaded.
|
|---|
| 5792 | * There are three cases to handle:
|
|---|
| 5793 | * 1) If the cast->type has already been loaded AND the type we are adding
|
|---|
| 5794 | * casting info to has not been loaded (it is in this module), THEN we
|
|---|
| 5795 | * replace the cast->type pointer with the type pointer that has already
|
|---|
| 5796 | * been loaded.
|
|---|
| 5797 | * 2) If BOTH types (the one we are adding casting info to, and the
|
|---|
| 5798 | * cast->type) are loaded, THEN the cast info has already been loaded by
|
|---|
| 5799 | * the previous module so we just ignore it.
|
|---|
| 5800 | * 3) Finally, if cast->type has not already been loaded, then we add that
|
|---|
| 5801 | * swig_cast_info to the linked list (because the cast->type) pointer will
|
|---|
| 5802 | * be correct.
|
|---|
| 5803 | * ----------------------------------------------------------------------------- */
|
|---|
| 5804 |
|
|---|
| 5805 | #ifdef __cplusplus
|
|---|
| 5806 | extern "C" {
|
|---|
| 5807 | #if 0
|
|---|
| 5808 | } /* c-mode */
|
|---|
| 5809 | #endif
|
|---|
| 5810 | #endif
|
|---|
| 5811 |
|
|---|
| 5812 | #if 0
|
|---|
| 5813 | #define SWIGRUNTIME_DEBUG
|
|---|
| 5814 | #endif
|
|---|
| 5815 |
|
|---|
| 5816 |
|
|---|
| 5817 | SWIGRUNTIME void
|
|---|
| 5818 | SWIG_InitializeModule(void *clientdata) {
|
|---|
| 5819 | size_t i;
|
|---|
| 5820 | swig_module_info *module_head, *iter;
|
|---|
| 5821 | int init;
|
|---|
| 5822 |
|
|---|
| 5823 | /* check to see if the circular list has been setup, if not, set it up */
|
|---|
| 5824 | if (swig_module.next==0) {
|
|---|
| 5825 | /* Initialize the swig_module */
|
|---|
| 5826 | swig_module.type_initial = swig_type_initial;
|
|---|
| 5827 | swig_module.cast_initial = swig_cast_initial;
|
|---|
| 5828 | swig_module.next = &swig_module;
|
|---|
| 5829 | init = 1;
|
|---|
| 5830 | } else {
|
|---|
| 5831 | init = 0;
|
|---|
| 5832 | }
|
|---|
| 5833 |
|
|---|
| 5834 | /* Try and load any already created modules */
|
|---|
| 5835 | module_head = SWIG_GetModule(clientdata);
|
|---|
| 5836 | if (!module_head) {
|
|---|
| 5837 | /* This is the first module loaded for this interpreter */
|
|---|
| 5838 | /* so set the swig module into the interpreter */
|
|---|
| 5839 | SWIG_SetModule(clientdata, &swig_module);
|
|---|
| 5840 | } else {
|
|---|
| 5841 | /* the interpreter has loaded a SWIG module, but has it loaded this one? */
|
|---|
| 5842 | iter=module_head;
|
|---|
| 5843 | do {
|
|---|
| 5844 | if (iter==&swig_module) {
|
|---|
| 5845 | /* Our module is already in the list, so there's nothing more to do. */
|
|---|
| 5846 | return;
|
|---|
| 5847 | }
|
|---|
| 5848 | iter=iter->next;
|
|---|
| 5849 | } while (iter!= module_head);
|
|---|
| 5850 |
|
|---|
| 5851 | /* otherwise we must add our module into the list */
|
|---|
| 5852 | swig_module.next = module_head->next;
|
|---|
| 5853 | module_head->next = &swig_module;
|
|---|
| 5854 | }
|
|---|
| 5855 |
|
|---|
| 5856 | /* When multiple interpreters are used, a module could have already been initialized in
|
|---|
| 5857 | a different interpreter, but not yet have a pointer in this interpreter.
|
|---|
| 5858 | In this case, we do not want to continue adding types... everything should be
|
|---|
| 5859 | set up already */
|
|---|
| 5860 | if (init == 0) return;
|
|---|
| 5861 |
|
|---|
| 5862 | /* Now work on filling in swig_module.types */
|
|---|
| 5863 | #ifdef SWIGRUNTIME_DEBUG
|
|---|
| 5864 | printf("SWIG_InitializeModule: size %d\n", swig_module.size);
|
|---|
| 5865 | #endif
|
|---|
| 5866 | for (i = 0; i < swig_module.size; ++i) {
|
|---|
| 5867 | swig_type_info *type = 0;
|
|---|
| 5868 | swig_type_info *ret;
|
|---|
| 5869 | swig_cast_info *cast;
|
|---|
| 5870 |
|
|---|
| 5871 | #ifdef SWIGRUNTIME_DEBUG
|
|---|
| 5872 | printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
|
|---|
| 5873 | #endif
|
|---|
| 5874 |
|
|---|
| 5875 | /* if there is another module already loaded */
|
|---|
| 5876 | if (swig_module.next != &swig_module) {
|
|---|
| 5877 | type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
|
|---|
| 5878 | }
|
|---|
| 5879 | if (type) {
|
|---|
| 5880 | /* Overwrite clientdata field */
|
|---|
| 5881 | #ifdef SWIGRUNTIME_DEBUG
|
|---|
| 5882 | printf("SWIG_InitializeModule: found type %s\n", type->name);
|
|---|
| 5883 | #endif
|
|---|
| 5884 | if (swig_module.type_initial[i]->clientdata) {
|
|---|
| 5885 | type->clientdata = swig_module.type_initial[i]->clientdata;
|
|---|
| 5886 | #ifdef SWIGRUNTIME_DEBUG
|
|---|
| 5887 | printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
|
|---|
| 5888 | #endif
|
|---|
| 5889 | }
|
|---|
| 5890 | } else {
|
|---|
| 5891 | type = swig_module.type_initial[i];
|
|---|
| 5892 | }
|
|---|
| 5893 |
|
|---|
| 5894 | /* Insert casting types */
|
|---|
| 5895 | cast = swig_module.cast_initial[i];
|
|---|
| 5896 | while (cast->type) {
|
|---|
| 5897 | /* Don't need to add information already in the list */
|
|---|
| 5898 | ret = 0;
|
|---|
| 5899 | #ifdef SWIGRUNTIME_DEBUG
|
|---|
| 5900 | printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
|
|---|
| 5901 | #endif
|
|---|
| 5902 | if (swig_module.next != &swig_module) {
|
|---|
| 5903 | ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
|
|---|
| 5904 | #ifdef SWIGRUNTIME_DEBUG
|
|---|
| 5905 | if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
|
|---|
| 5906 | #endif
|
|---|
| 5907 | }
|
|---|
| 5908 | if (ret) {
|
|---|
| 5909 | if (type == swig_module.type_initial[i]) {
|
|---|
| 5910 | #ifdef SWIGRUNTIME_DEBUG
|
|---|
| 5911 | printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
|
|---|
| 5912 | #endif
|
|---|
| 5913 | cast->type = ret;
|
|---|
| 5914 | ret = 0;
|
|---|
| 5915 | } else {
|
|---|
| 5916 | /* Check for casting already in the list */
|
|---|
| 5917 | swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
|
|---|
| 5918 | #ifdef SWIGRUNTIME_DEBUG
|
|---|
| 5919 | if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
|
|---|
| 5920 | #endif
|
|---|
| 5921 | if (!ocast) ret = 0;
|
|---|
| 5922 | }
|
|---|
| 5923 | }
|
|---|
| 5924 |
|
|---|
| 5925 | if (!ret) {
|
|---|
| 5926 | #ifdef SWIGRUNTIME_DEBUG
|
|---|
| 5927 | printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
|
|---|
| 5928 | #endif
|
|---|
| 5929 | if (type->cast) {
|
|---|
| 5930 | type->cast->prev = cast;
|
|---|
| 5931 | cast->next = type->cast;
|
|---|
| 5932 | }
|
|---|
| 5933 | type->cast = cast;
|
|---|
| 5934 | }
|
|---|
| 5935 | cast++;
|
|---|
| 5936 | }
|
|---|
| 5937 | /* Set entry in modules->types array equal to the type */
|
|---|
| 5938 | swig_module.types[i] = type;
|
|---|
| 5939 | }
|
|---|
| 5940 | swig_module.types[i] = 0;
|
|---|
| 5941 |
|
|---|
| 5942 | #ifdef SWIGRUNTIME_DEBUG
|
|---|
| 5943 | printf("**** SWIG_InitializeModule: Cast List ******\n");
|
|---|
| 5944 | for (i = 0; i < swig_module.size; ++i) {
|
|---|
| 5945 | int j = 0;
|
|---|
| 5946 | swig_cast_info *cast = swig_module.cast_initial[i];
|
|---|
| 5947 | printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
|
|---|
| 5948 | while (cast->type) {
|
|---|
| 5949 | printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
|
|---|
| 5950 | cast++;
|
|---|
| 5951 | ++j;
|
|---|
| 5952 | }
|
|---|
| 5953 | printf("---- Total casts: %d\n",j);
|
|---|
| 5954 | }
|
|---|
| 5955 | printf("**** SWIG_InitializeModule: Cast List ******\n");
|
|---|
| 5956 | #endif
|
|---|
| 5957 | }
|
|---|
| 5958 |
|
|---|
| 5959 | /* This function will propagate the clientdata field of type to
|
|---|
| 5960 | * any new swig_type_info structures that have been added into the list
|
|---|
| 5961 | * of equivalent types. It is like calling
|
|---|
| 5962 | * SWIG_TypeClientData(type, clientdata) a second time.
|
|---|
| 5963 | */
|
|---|
| 5964 | SWIGRUNTIME void
|
|---|
| 5965 | SWIG_PropagateClientData(void) {
|
|---|
| 5966 | size_t i;
|
|---|
| 5967 | swig_cast_info *equiv;
|
|---|
| 5968 | static int init_run = 0;
|
|---|
| 5969 |
|
|---|
| 5970 | if (init_run) return;
|
|---|
| 5971 | init_run = 1;
|
|---|
| 5972 |
|
|---|
| 5973 | for (i = 0; i < swig_module.size; i++) {
|
|---|
| 5974 | if (swig_module.types[i]->clientdata) {
|
|---|
| 5975 | equiv = swig_module.types[i]->cast;
|
|---|
| 5976 | while (equiv) {
|
|---|
| 5977 | if (!equiv->converter) {
|
|---|
| 5978 | if (equiv->type && !equiv->type->clientdata)
|
|---|
| 5979 | SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
|
|---|
| 5980 | }
|
|---|
| 5981 | equiv = equiv->next;
|
|---|
| 5982 | }
|
|---|
| 5983 | }
|
|---|
| 5984 | }
|
|---|
| 5985 | }
|
|---|
| 5986 |
|
|---|
| 5987 | #ifdef __cplusplus
|
|---|
| 5988 | #if 0
|
|---|
| 5989 | {
|
|---|
| 5990 | /* c-mode */
|
|---|
| 5991 | #endif
|
|---|
| 5992 | }
|
|---|
| 5993 | #endif
|
|---|
| 5994 |
|
|---|
| 5995 |
|
|---|
| 5996 |
|
|---|
| 5997 | #ifdef __cplusplus
|
|---|
| 5998 | extern "C" {
|
|---|
| 5999 | #endif
|
|---|
| 6000 |
|
|---|
| 6001 | /* Python-specific SWIG API */
|
|---|
| 6002 | #define SWIG_newvarlink() SWIG_Python_newvarlink()
|
|---|
| 6003 | #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
|
|---|
| 6004 | #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
|
|---|
| 6005 |
|
|---|
| 6006 | /* -----------------------------------------------------------------------------
|
|---|
| 6007 | * global variable support code.
|
|---|
| 6008 | * ----------------------------------------------------------------------------- */
|
|---|
| 6009 |
|
|---|
| 6010 | typedef struct swig_globalvar {
|
|---|
| 6011 | char *name; /* Name of global variable */
|
|---|
| 6012 | PyObject *(*get_attr)(void); /* Return the current value */
|
|---|
| 6013 | int (*set_attr)(PyObject *); /* Set the value */
|
|---|
| 6014 | struct swig_globalvar *next;
|
|---|
| 6015 | } swig_globalvar;
|
|---|
| 6016 |
|
|---|
| 6017 | typedef struct swig_varlinkobject {
|
|---|
| 6018 | PyObject_HEAD
|
|---|
| 6019 | swig_globalvar *vars;
|
|---|
| 6020 | } swig_varlinkobject;
|
|---|
| 6021 |
|
|---|
| 6022 | SWIGINTERN PyObject *
|
|---|
| 6023 | swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
|
|---|
| 6024 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 6025 | return PyUnicode_InternFromString("<Swig global variables>");
|
|---|
| 6026 | #else
|
|---|
| 6027 | return PyString_FromString("<Swig global variables>");
|
|---|
| 6028 | #endif
|
|---|
| 6029 | }
|
|---|
| 6030 |
|
|---|
| 6031 | SWIGINTERN PyObject *
|
|---|
| 6032 | swig_varlink_str(swig_varlinkobject *v) {
|
|---|
| 6033 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 6034 | PyObject *str = PyUnicode_InternFromString("(");
|
|---|
| 6035 | PyObject *tail;
|
|---|
| 6036 | PyObject *joined;
|
|---|
| 6037 | swig_globalvar *var;
|
|---|
| 6038 | for (var = v->vars; var; var=var->next) {
|
|---|
| 6039 | tail = PyUnicode_FromString(var->name);
|
|---|
| 6040 | joined = PyUnicode_Concat(str, tail);
|
|---|
| 6041 | Py_DecRef(str);
|
|---|
| 6042 | Py_DecRef(tail);
|
|---|
| 6043 | str = joined;
|
|---|
| 6044 | if (var->next) {
|
|---|
| 6045 | tail = PyUnicode_InternFromString(", ");
|
|---|
| 6046 | joined = PyUnicode_Concat(str, tail);
|
|---|
| 6047 | Py_DecRef(str);
|
|---|
| 6048 | Py_DecRef(tail);
|
|---|
| 6049 | str = joined;
|
|---|
| 6050 | }
|
|---|
| 6051 | }
|
|---|
| 6052 | tail = PyUnicode_InternFromString(")");
|
|---|
| 6053 | joined = PyUnicode_Concat(str, tail);
|
|---|
| 6054 | Py_DecRef(str);
|
|---|
| 6055 | Py_DecRef(tail);
|
|---|
| 6056 | str = joined;
|
|---|
| 6057 | #else
|
|---|
| 6058 | PyObject *str = PyString_FromString("(");
|
|---|
| 6059 | swig_globalvar *var;
|
|---|
| 6060 | for (var = v->vars; var; var=var->next) {
|
|---|
| 6061 | PyString_ConcatAndDel(&str,PyString_FromString(var->name));
|
|---|
| 6062 | if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
|
|---|
| 6063 | }
|
|---|
| 6064 | PyString_ConcatAndDel(&str,PyString_FromString(")"));
|
|---|
| 6065 | #endif
|
|---|
| 6066 | return str;
|
|---|
| 6067 | }
|
|---|
| 6068 |
|
|---|
| 6069 | SWIGINTERN int
|
|---|
| 6070 | swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
|
|---|
| 6071 | char *tmp;
|
|---|
| 6072 | PyObject *str = swig_varlink_str(v);
|
|---|
| 6073 | fprintf(fp,"Swig global variables ");
|
|---|
| 6074 | fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
|
|---|
| 6075 | SWIG_Python_str_DelForPy3(tmp);
|
|---|
| 6076 | Py_DECREF(str);
|
|---|
| 6077 | return 0;
|
|---|
| 6078 | }
|
|---|
| 6079 |
|
|---|
| 6080 | SWIGINTERN void
|
|---|
| 6081 | swig_varlink_dealloc(swig_varlinkobject *v) {
|
|---|
| 6082 | swig_globalvar *var = v->vars;
|
|---|
| 6083 | while (var) {
|
|---|
| 6084 | swig_globalvar *n = var->next;
|
|---|
| 6085 | free(var->name);
|
|---|
| 6086 | free(var);
|
|---|
| 6087 | var = n;
|
|---|
| 6088 | }
|
|---|
| 6089 | }
|
|---|
| 6090 |
|
|---|
| 6091 | SWIGINTERN PyObject *
|
|---|
| 6092 | swig_varlink_getattr(swig_varlinkobject *v, char *n) {
|
|---|
| 6093 | PyObject *res = NULL;
|
|---|
| 6094 | swig_globalvar *var = v->vars;
|
|---|
| 6095 | while (var) {
|
|---|
| 6096 | if (strcmp(var->name,n) == 0) {
|
|---|
| 6097 | res = (*var->get_attr)();
|
|---|
| 6098 | break;
|
|---|
| 6099 | }
|
|---|
| 6100 | var = var->next;
|
|---|
| 6101 | }
|
|---|
| 6102 | if (res == NULL && !PyErr_Occurred()) {
|
|---|
| 6103 | PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
|
|---|
| 6104 | }
|
|---|
| 6105 | return res;
|
|---|
| 6106 | }
|
|---|
| 6107 |
|
|---|
| 6108 | SWIGINTERN int
|
|---|
| 6109 | swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
|
|---|
| 6110 | int res = 1;
|
|---|
| 6111 | swig_globalvar *var = v->vars;
|
|---|
| 6112 | while (var) {
|
|---|
| 6113 | if (strcmp(var->name,n) == 0) {
|
|---|
| 6114 | res = (*var->set_attr)(p);
|
|---|
| 6115 | break;
|
|---|
| 6116 | }
|
|---|
| 6117 | var = var->next;
|
|---|
| 6118 | }
|
|---|
| 6119 | if (res == 1 && !PyErr_Occurred()) {
|
|---|
| 6120 | PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
|
|---|
| 6121 | }
|
|---|
| 6122 | return res;
|
|---|
| 6123 | }
|
|---|
| 6124 |
|
|---|
| 6125 | SWIGINTERN PyTypeObject*
|
|---|
| 6126 | swig_varlink_type(void) {
|
|---|
| 6127 | static char varlink__doc__[] = "Swig var link object";
|
|---|
| 6128 | static PyTypeObject varlink_type;
|
|---|
| 6129 | static int type_init = 0;
|
|---|
| 6130 | if (!type_init) {
|
|---|
| 6131 | const PyTypeObject tmp = {
|
|---|
| 6132 | /* PyObject header changed in Python 3 */
|
|---|
| 6133 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 6134 | PyVarObject_HEAD_INIT(NULL, 0)
|
|---|
| 6135 | #else
|
|---|
| 6136 | PyObject_HEAD_INIT(NULL)
|
|---|
| 6137 | 0, /* ob_size */
|
|---|
| 6138 | #endif
|
|---|
| 6139 | (char *)"swigvarlink", /* tp_name */
|
|---|
| 6140 | sizeof(swig_varlinkobject), /* tp_basicsize */
|
|---|
| 6141 | 0, /* tp_itemsize */
|
|---|
| 6142 | (destructor) swig_varlink_dealloc, /* tp_dealloc */
|
|---|
| 6143 | (printfunc) swig_varlink_print, /* tp_print */
|
|---|
| 6144 | (getattrfunc) swig_varlink_getattr, /* tp_getattr */
|
|---|
| 6145 | (setattrfunc) swig_varlink_setattr, /* tp_setattr */
|
|---|
| 6146 | 0, /* tp_compare */
|
|---|
| 6147 | (reprfunc) swig_varlink_repr, /* tp_repr */
|
|---|
| 6148 | 0, /* tp_as_number */
|
|---|
| 6149 | 0, /* tp_as_sequence */
|
|---|
| 6150 | 0, /* tp_as_mapping */
|
|---|
| 6151 | 0, /* tp_hash */
|
|---|
| 6152 | 0, /* tp_call */
|
|---|
| 6153 | (reprfunc) swig_varlink_str, /* tp_str */
|
|---|
| 6154 | 0, /* tp_getattro */
|
|---|
| 6155 | 0, /* tp_setattro */
|
|---|
| 6156 | 0, /* tp_as_buffer */
|
|---|
| 6157 | 0, /* tp_flags */
|
|---|
| 6158 | varlink__doc__, /* tp_doc */
|
|---|
| 6159 | 0, /* tp_traverse */
|
|---|
| 6160 | 0, /* tp_clear */
|
|---|
| 6161 | 0, /* tp_richcompare */
|
|---|
| 6162 | 0, /* tp_weaklistoffset */
|
|---|
| 6163 | #if PY_VERSION_HEX >= 0x02020000
|
|---|
| 6164 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
|
|---|
| 6165 | #endif
|
|---|
| 6166 | #if PY_VERSION_HEX >= 0x02030000
|
|---|
| 6167 | 0, /* tp_del */
|
|---|
| 6168 | #endif
|
|---|
| 6169 | #if PY_VERSION_HEX >= 0x02060000
|
|---|
| 6170 | 0, /* tp_version */
|
|---|
| 6171 | #endif
|
|---|
| 6172 | #ifdef COUNT_ALLOCS
|
|---|
| 6173 | 0,0,0,0 /* tp_alloc -> tp_next */
|
|---|
| 6174 | #endif
|
|---|
| 6175 | };
|
|---|
| 6176 | varlink_type = tmp;
|
|---|
| 6177 | type_init = 1;
|
|---|
| 6178 | #if PY_VERSION_HEX < 0x02020000
|
|---|
| 6179 | varlink_type.ob_type = &PyType_Type;
|
|---|
| 6180 | #else
|
|---|
| 6181 | if (PyType_Ready(&varlink_type) < 0)
|
|---|
| 6182 | return NULL;
|
|---|
| 6183 | #endif
|
|---|
| 6184 | }
|
|---|
| 6185 | return &varlink_type;
|
|---|
| 6186 | }
|
|---|
| 6187 |
|
|---|
| 6188 | /* Create a variable linking object for use later */
|
|---|
| 6189 | SWIGINTERN PyObject *
|
|---|
| 6190 | SWIG_Python_newvarlink(void) {
|
|---|
| 6191 | swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
|
|---|
| 6192 | if (result) {
|
|---|
| 6193 | result->vars = 0;
|
|---|
| 6194 | }
|
|---|
| 6195 | return ((PyObject*) result);
|
|---|
| 6196 | }
|
|---|
| 6197 |
|
|---|
| 6198 | SWIGINTERN void
|
|---|
| 6199 | SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
|
|---|
| 6200 | swig_varlinkobject *v = (swig_varlinkobject *) p;
|
|---|
| 6201 | swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
|
|---|
| 6202 | if (gv) {
|
|---|
| 6203 | size_t size = strlen(name)+1;
|
|---|
| 6204 | gv->name = (char *)malloc(size);
|
|---|
| 6205 | if (gv->name) {
|
|---|
| 6206 | strncpy(gv->name,name,size);
|
|---|
| 6207 | gv->get_attr = get_attr;
|
|---|
| 6208 | gv->set_attr = set_attr;
|
|---|
| 6209 | gv->next = v->vars;
|
|---|
| 6210 | }
|
|---|
| 6211 | }
|
|---|
| 6212 | v->vars = gv;
|
|---|
| 6213 | }
|
|---|
| 6214 |
|
|---|
| 6215 | SWIGINTERN PyObject *
|
|---|
| 6216 | SWIG_globals(void) {
|
|---|
| 6217 | static PyObject *_SWIG_globals = 0;
|
|---|
| 6218 | if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
|
|---|
| 6219 | return _SWIG_globals;
|
|---|
| 6220 | }
|
|---|
| 6221 |
|
|---|
| 6222 | /* -----------------------------------------------------------------------------
|
|---|
| 6223 | * constants/methods manipulation
|
|---|
| 6224 | * ----------------------------------------------------------------------------- */
|
|---|
| 6225 |
|
|---|
| 6226 | /* Install Constants */
|
|---|
| 6227 | SWIGINTERN void
|
|---|
| 6228 | SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
|
|---|
| 6229 | PyObject *obj = 0;
|
|---|
| 6230 | size_t i;
|
|---|
| 6231 | for (i = 0; constants[i].type; ++i) {
|
|---|
| 6232 | switch(constants[i].type) {
|
|---|
| 6233 | case SWIG_PY_POINTER:
|
|---|
| 6234 | obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
|
|---|
| 6235 | break;
|
|---|
| 6236 | case SWIG_PY_BINARY:
|
|---|
| 6237 | obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
|
|---|
| 6238 | break;
|
|---|
| 6239 | default:
|
|---|
| 6240 | obj = 0;
|
|---|
| 6241 | break;
|
|---|
| 6242 | }
|
|---|
| 6243 | if (obj) {
|
|---|
| 6244 | PyDict_SetItemString(d, constants[i].name, obj);
|
|---|
| 6245 | Py_DECREF(obj);
|
|---|
| 6246 | }
|
|---|
| 6247 | }
|
|---|
| 6248 | }
|
|---|
| 6249 |
|
|---|
| 6250 | /* -----------------------------------------------------------------------------*/
|
|---|
| 6251 | /* Fix SwigMethods to carry the callback ptrs when needed */
|
|---|
| 6252 | /* -----------------------------------------------------------------------------*/
|
|---|
| 6253 |
|
|---|
| 6254 | SWIGINTERN void
|
|---|
| 6255 | SWIG_Python_FixMethods(PyMethodDef *methods,
|
|---|
| 6256 | swig_const_info *const_table,
|
|---|
| 6257 | swig_type_info **types,
|
|---|
| 6258 | swig_type_info **types_initial) {
|
|---|
| 6259 | size_t i;
|
|---|
| 6260 | for (i = 0; methods[i].ml_name; ++i) {
|
|---|
| 6261 | const char *c = methods[i].ml_doc;
|
|---|
| 6262 | if (c && (c = strstr(c, "swig_ptr: "))) {
|
|---|
| 6263 | int j;
|
|---|
| 6264 | swig_const_info *ci = 0;
|
|---|
| 6265 | const char *name = c + 10;
|
|---|
| 6266 | for (j = 0; const_table[j].type; ++j) {
|
|---|
| 6267 | if (strncmp(const_table[j].name, name,
|
|---|
| 6268 | strlen(const_table[j].name)) == 0) {
|
|---|
| 6269 | ci = &(const_table[j]);
|
|---|
| 6270 | break;
|
|---|
| 6271 | }
|
|---|
| 6272 | }
|
|---|
| 6273 | if (ci) {
|
|---|
| 6274 | void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
|
|---|
| 6275 | if (ptr) {
|
|---|
| 6276 | size_t shift = (ci->ptype) - types;
|
|---|
| 6277 | swig_type_info *ty = types_initial[shift];
|
|---|
| 6278 | size_t ldoc = (c - methods[i].ml_doc);
|
|---|
| 6279 | size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
|
|---|
| 6280 | char *ndoc = (char*)malloc(ldoc + lptr + 10);
|
|---|
| 6281 | if (ndoc) {
|
|---|
| 6282 | char *buff = ndoc;
|
|---|
| 6283 | strncpy(buff, methods[i].ml_doc, ldoc);
|
|---|
| 6284 | buff += ldoc;
|
|---|
| 6285 | strncpy(buff, "swig_ptr: ", 10);
|
|---|
| 6286 | buff += 10;
|
|---|
| 6287 | SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
|
|---|
| 6288 | methods[i].ml_doc = ndoc;
|
|---|
| 6289 | }
|
|---|
| 6290 | }
|
|---|
| 6291 | }
|
|---|
| 6292 | }
|
|---|
| 6293 | }
|
|---|
| 6294 | }
|
|---|
| 6295 |
|
|---|
| 6296 | #ifdef __cplusplus
|
|---|
| 6297 | }
|
|---|
| 6298 | #endif
|
|---|
| 6299 |
|
|---|
| 6300 | /* -----------------------------------------------------------------------------*
|
|---|
| 6301 | * Partial Init method
|
|---|
| 6302 | * -----------------------------------------------------------------------------*/
|
|---|
| 6303 |
|
|---|
| 6304 | #ifdef __cplusplus
|
|---|
| 6305 | extern "C"
|
|---|
| 6306 | #endif
|
|---|
| 6307 |
|
|---|
| 6308 | SWIGEXPORT
|
|---|
| 6309 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 6310 | PyObject*
|
|---|
| 6311 | #else
|
|---|
| 6312 | void
|
|---|
| 6313 | #endif
|
|---|
| 6314 | SWIG_init(void) {
|
|---|
| 6315 | PyObject *m, *d, *md;
|
|---|
| 6316 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 6317 | static struct PyModuleDef SWIG_module = {
|
|---|
| 6318 | # if PY_VERSION_HEX >= 0x03020000
|
|---|
| 6319 | PyModuleDef_HEAD_INIT,
|
|---|
| 6320 | # else
|
|---|
| 6321 | {
|
|---|
| 6322 | PyObject_HEAD_INIT(NULL)
|
|---|
| 6323 | NULL, /* m_init */
|
|---|
| 6324 | 0, /* m_index */
|
|---|
| 6325 | NULL, /* m_copy */
|
|---|
| 6326 | },
|
|---|
| 6327 | # endif
|
|---|
| 6328 | (char *) SWIG_name,
|
|---|
| 6329 | NULL,
|
|---|
| 6330 | -1,
|
|---|
| 6331 | SwigMethods,
|
|---|
| 6332 | NULL,
|
|---|
| 6333 | NULL,
|
|---|
| 6334 | NULL,
|
|---|
| 6335 | NULL
|
|---|
| 6336 | };
|
|---|
| 6337 | #endif
|
|---|
| 6338 |
|
|---|
| 6339 | #if defined(SWIGPYTHON_BUILTIN)
|
|---|
| 6340 | static SwigPyClientData SwigPyObject_clientdata = {
|
|---|
| 6341 | 0, 0, 0, 0, 0, 0, 0
|
|---|
| 6342 | };
|
|---|
| 6343 | static PyGetSetDef this_getset_def = {
|
|---|
| 6344 | (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
|
|---|
| 6345 | };
|
|---|
| 6346 | static SwigPyGetSet thisown_getset_closure = {
|
|---|
| 6347 | (PyCFunction) SwigPyObject_own,
|
|---|
| 6348 | (PyCFunction) SwigPyObject_own
|
|---|
| 6349 | };
|
|---|
| 6350 | static PyGetSetDef thisown_getset_def = {
|
|---|
| 6351 | (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
|
|---|
| 6352 | };
|
|---|
| 6353 | PyObject *metatype_args;
|
|---|
| 6354 | PyTypeObject *builtin_pytype;
|
|---|
| 6355 | int builtin_base_count;
|
|---|
| 6356 | swig_type_info *builtin_basetype;
|
|---|
| 6357 | PyObject *tuple;
|
|---|
| 6358 | PyGetSetDescrObject *static_getset;
|
|---|
| 6359 | PyTypeObject *metatype;
|
|---|
| 6360 | SwigPyClientData *cd;
|
|---|
| 6361 | PyObject *public_interface, *public_symbol;
|
|---|
| 6362 | PyObject *this_descr;
|
|---|
| 6363 | PyObject *thisown_descr;
|
|---|
| 6364 | PyObject *self = 0;
|
|---|
| 6365 | int i;
|
|---|
| 6366 |
|
|---|
| 6367 | (void)builtin_pytype;
|
|---|
| 6368 | (void)builtin_base_count;
|
|---|
| 6369 | (void)builtin_basetype;
|
|---|
| 6370 | (void)tuple;
|
|---|
| 6371 | (void)static_getset;
|
|---|
| 6372 | (void)self;
|
|---|
| 6373 |
|
|---|
| 6374 | /* metatype is used to implement static member variables. */
|
|---|
| 6375 | metatype_args = Py_BuildValue("(s(O){})", "SwigPyObjectType", &PyType_Type);
|
|---|
| 6376 | assert(metatype_args);
|
|---|
| 6377 | metatype = (PyTypeObject *) PyType_Type.tp_call((PyObject *) &PyType_Type, metatype_args, NULL);
|
|---|
| 6378 | assert(metatype);
|
|---|
| 6379 | Py_DECREF(metatype_args);
|
|---|
| 6380 | metatype->tp_setattro = (setattrofunc) &SwigPyObjectType_setattro;
|
|---|
| 6381 | assert(PyType_Ready(metatype) >= 0);
|
|---|
| 6382 | #endif
|
|---|
| 6383 |
|
|---|
| 6384 | /* Fix SwigMethods to carry the callback ptrs when needed */
|
|---|
| 6385 | SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
|
|---|
| 6386 |
|
|---|
| 6387 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 6388 | m = PyModule_Create(&SWIG_module);
|
|---|
| 6389 | #else
|
|---|
| 6390 | m = Py_InitModule((char *) SWIG_name, SwigMethods);
|
|---|
| 6391 | #endif
|
|---|
| 6392 |
|
|---|
| 6393 | md = d = PyModule_GetDict(m);
|
|---|
| 6394 | (void)md;
|
|---|
| 6395 |
|
|---|
| 6396 | SWIG_InitializeModule(0);
|
|---|
| 6397 |
|
|---|
| 6398 | #ifdef SWIGPYTHON_BUILTIN
|
|---|
| 6399 | SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
|
|---|
| 6400 | assert(SwigPyObject_stype);
|
|---|
| 6401 | cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
|
|---|
| 6402 | if (!cd) {
|
|---|
| 6403 | SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
|
|---|
| 6404 | SwigPyObject_clientdata.pytype = SwigPyObject_TypeOnce();
|
|---|
| 6405 | } else if (SwigPyObject_TypeOnce()->tp_basicsize != cd->pytype->tp_basicsize) {
|
|---|
| 6406 | PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
|
|---|
| 6407 | # if PY_VERSION_HEX >= 0x03000000
|
|---|
| 6408 | return NULL;
|
|---|
| 6409 | # else
|
|---|
| 6410 | return;
|
|---|
| 6411 | # endif
|
|---|
| 6412 | }
|
|---|
| 6413 |
|
|---|
| 6414 | /* All objects have a 'this' attribute */
|
|---|
| 6415 | this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
|
|---|
| 6416 | (void)this_descr;
|
|---|
| 6417 |
|
|---|
| 6418 | /* All objects have a 'thisown' attribute */
|
|---|
| 6419 | thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
|
|---|
| 6420 | (void)thisown_descr;
|
|---|
| 6421 |
|
|---|
| 6422 | public_interface = PyList_New(0);
|
|---|
| 6423 | public_symbol = 0;
|
|---|
| 6424 | (void)public_symbol;
|
|---|
| 6425 |
|
|---|
| 6426 | PyDict_SetItemString(md, "__all__", public_interface);
|
|---|
| 6427 | Py_DECREF(public_interface);
|
|---|
| 6428 | for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
|
|---|
| 6429 | SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
|
|---|
| 6430 | for (i = 0; swig_const_table[i].name != 0; ++i)
|
|---|
| 6431 | SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
|
|---|
| 6432 | #endif
|
|---|
| 6433 |
|
|---|
| 6434 | SWIG_InstallConstants(d,swig_const_table);
|
|---|
| 6435 |
|
|---|
| 6436 |
|
|---|
| 6437 | import_array(); // required by NumPy
|
|---|
| 6438 |
|
|---|
| 6439 | #if PY_VERSION_HEX >= 0x03000000
|
|---|
| 6440 | return m;
|
|---|
| 6441 | #else
|
|---|
| 6442 | return;
|
|---|
| 6443 | #endif
|
|---|
| 6444 | }
|
|---|
| 6445 |
|
|---|