Changeset 11385

Show
Ignore:
Timestamp:
05/01/07 09:22:04 (2 years ago)
Author:
hobu
Message:

update wrappers for #1379

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.4/gdal/swig/python/gdalconst.py

    r10420 r11385  
    1 # This file was created automatically by SWIG 1.3.29. 
     1# This file was automatically generated by SWIG (http://www.swig.org). 
     2# Version 1.3.31 
     3
    24# Don't modify this file, modify the SWIG interface instead. 
    35# This file is compatible with both classic and new-style classes. 
     
    68import new 
    79new_instancemethod = new.instancemethod 
     10try: 
     11    _swig_property = property 
     12except NameError: 
     13    pass # Python < 2.2 doesn't have 'property'. 
    814def _swig_setattr_nondynamic(self,class_type,name,value,static=1): 
    915    if (name == "thisown"): return self.this.own(value) 
  • branches/1.4/gdal/swig/python/gdalconst_wrap.c

    r10420 r11385  
    11/* ---------------------------------------------------------------------------- 
    22 * This file was automatically generated by SWIG (http://www.swig.org). 
    3  * Version 1.3.29 
     3 * Version 1.3.31 
    44 *  
    55 * This file is not intended to be easily readable and contains a number of  
     
    104104 
    105105/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ 
    106 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) 
     106#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) 
    107107# define _CRT_SECURE_NO_DEPRECATE 
    108108#endif 
     
    121121/* This should only be incremented when either the layout of swig_type_info changes, 
    122122   or for whatever reason, the runtime changes incompatibly */ 
    123 #define SWIG_RUNTIME_VERSION "2
     123#define SWIG_RUNTIME_VERSION "3
    124124 
    125125/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ 
     
    698698 
    699699 
    700 /* Python.h has to appear first */ 
    701 #include <Python.h> 
    702700 
    703701/* Add PyOS_snprintf for old Pythons */ 
     
    780778#endif 
    781779 
     780/* Py_ssize_t for old Pythons */ 
     781/* This code is as recommended by: */ 
     782/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ 
     783#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) 
     784typedef int Py_ssize_t; 
     785# define PY_SSIZE_T_MAX INT_MAX 
     786# define PY_SSIZE_T_MIN INT_MIN 
     787#endif 
    782788 
    783789/* ----------------------------------------------------------------------------- 
     
    11731179_SWIG_Py_None(void) 
    11741180{ 
    1175   PyObject *none = Py_BuildValue(""); 
     1181  PyObject *none = Py_BuildValue((char*)""); 
    11761182  Py_DECREF(none); 
    11771183  return none; 
     
    20322038     
    20332039    /* here we get the method pointer for callbacks */ 
    2034     char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); 
     2040    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); 
    20352041    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; 
    20362042    if (desc) { 
     
    21532159 } 
    21542160#endif 
    2155  dict = PyObject_GetAttrString(inst, "__dict__"); 
     2161 dict = PyObject_GetAttrString(inst, (char*)"__dict__"); 
    21562162 PyDict_SetItem(dict, SWIG_This(), swig_this); 
    21572163 Py_DECREF(dict); 
     
    22942300/* The python cached type query */ 
    22952301SWIGRUNTIME PyObject * 
    2296 SWIG_Python_TypeCache() { 
     2302SWIG_Python_TypeCache(void) { 
    22972303  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); 
    22982304  return cache; 
     
    24532459#if (PY_VERSION_HEX <= 0x02000000) 
    24542460# if !defined(SWIG_PYTHON_CLASSIC) 
    2455 #  error "This python version requires to use swig with the '-classic' option" 
     2461#  error "This python version requires swig to be run with the '-classic' option" 
    24562462# endif 
    24572463#endif 
     
    24642470#define SWIG_name    "_gdalconst" 
    24652471 
    2466 #define SWIGVERSION 0x010329  
     2472#define SWIGVERSION 0x010331  
     2473#define SWIG_VERSION SWIGVERSION 
    24672474 
    24682475 
     
    24882495 
    24892496SWIGINTERN swig_type_info* 
    2490 SWIG_pchar_descriptor(
     2497SWIG_pchar_descriptor(void
    24912498{ 
    24922499  static int init = 0; 
     
    25682575 * 
    25692576 * The generated swig_type_info structures are assigned staticly to an initial  
    2570  * array. We just loop though that array, and handle each type individually. 
     2577 * array. We just loop through that array, and handle each type individually. 
    25712578 * First we lookup if this type has been already loaded, and if so, use the 
    25722579 * loaded structure instead of the generated one. Then we have to fill in the 
     
    26062613#endif 
    26072614 
     2615 
    26082616SWIGRUNTIME void 
    26092617SWIG_InitializeModule(void *clientdata) { 
    26102618  size_t i; 
    2611   swig_module_info *module_head
    2612   static int init_run = 0
     2619  swig_module_info *module_head, *iter
     2620  int found
    26132621   
    26142622  clientdata = clientdata; 
    26152623   
    2616   if (init_run) return; 
    2617   init_run = 1; 
    2618    
    2619   /* Initialize the swig_module */ 
    2620   swig_module.type_initial = swig_type_initial; 
    2621   swig_module.cast_initial = swig_cast_initial; 
     2624  /* check to see if the circular list has been setup, if not, set it up */ 
     2625  if (swig_module.next==0) { 
     2626    /* Initialize the swig_module */ 
     2627    swig_module.type_initial = swig_type_initial; 
     2628    swig_module.cast_initial = swig_cast_initial; 
     2629    swig_module.next = &swig_module; 
     2630  } 
    26222631   
    26232632  /* Try and load any already created modules */ 
    26242633  module_head = SWIG_GetModule(clientdata); 
    2625   if (module_head) { 
     2634  if (!module_head) { 
     2635    /* This is the first module loaded for this interpreter */ 
     2636    /* so set the swig module into the interpreter */ 
     2637    SWIG_SetModule(clientdata, &swig_module); 
     2638    module_head = &swig_module; 
     2639  } else { 
     2640    /* the interpreter has loaded a SWIG module, but has it loaded this one? */ 
     2641    found=0; 
     2642    iter=module_head; 
     2643    do { 
     2644      if (iter==&swig_module) { 
     2645        found=1; 
     2646        break; 
     2647      } 
     2648      iter=iter->next; 
     2649    } while (iter!= module_head); 
     2650     
     2651    /* if the is found in the list, then all is done and we may leave */ 
     2652    if (found) return; 
     2653    /* otherwise we must add out module into the list */ 
    26262654    swig_module.next = module_head->next; 
    26272655    module_head->next = &swig_module; 
    2628   } else { 
    2629     /* This is the first module loaded */ 
    2630     swig_module.next = &swig_module; 
    2631     SWIG_SetModule(clientdata, &swig_module); 
    26322656  } 
    26332657   
     
    29422966   
    29432967  SWIGINTERN PyObject * 
    2944   SWIG_globals() { 
     2968  SWIG_globals(void) { 
    29452969    static PyObject *_SWIG_globals = 0;  
    29462970    if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();   
     
    29873011    size_t i; 
    29883012    for (i = 0; methods[i].ml_name; ++i) { 
    2989       char *c = methods[i].ml_doc; 
     3013      const char *c = methods[i].ml_doc; 
    29903014      if (c && (c = strstr(c, "swig_ptr: "))) { 
    29913015        int j; 
    29923016        swig_const_info *ci = 0; 
    2993         char *name = c + 10; 
     3017        const char *name = c + 10; 
    29943018        for (j = 0; const_table[j].type; ++j) { 
    29953019          if (strncmp(const_table[j].name, name,  
  • branches/1.4/gdal/swig/python/ogr.py

    r10427 r11385  
    1 # This file was created automatically by SWIG 1.3.29. 
     1# This file was automatically generated by SWIG (http://www.swig.org). 
     2# Version 1.3.31 
     3
    24# Don't modify this file, modify the SWIG interface instead. 
    35# This file is compatible with both classic and new-style classes. 
     
    68import new 
    79new_instancemethod = new.instancemethod 
     10try: 
     11    _swig_property = property 
     12except NameError: 
     13    pass # Python < 2.2 doesn't have 'property'. 
    814def _swig_setattr_nondynamic(self,class_type,name,value,static=1): 
    915    if (name == "thisown"): return self.this.own(value) 
     
    102108    __repr__ = _swig_repr 
    103109    __swig_getmethods__["name"] = _ogr.Driver_name_get 
    104     if _newclass:name = property(_ogr.Driver_name_get) 
     110    if _newclass:name = _swig_property(_ogr.Driver_name_get) 
    105111    def CreateDataSource(*args, **kwargs): 
    106112        """CreateDataSource(self, char name, char options=0) -> DataSource""" 
     
    139145    __repr__ = _swig_repr 
    140146    __swig_getmethods__["name"] = _ogr.DataSource_name_get 
    141     if _newclass:name = property(_ogr.DataSource_name_get) 
     147    if _newclass:name = _swig_property(_ogr.DataSource_name_get) 
    142148    __swig_destroy__ = _ogr.delete_DataSource 
    143149    __del__ = lambda self : None; 
  • branches/1.4/gdal/swig/python/ogr_wrap.cpp

    r10420 r11385  
    11/* ---------------------------------------------------------------------------- 
    22 * This file was automatically generated by SWIG (http://www.swig.org). 
    3  * Version 1.3.29 
     3 * Version 1.3.31 
    44 *  
    55 * This file is not intended to be easily readable and contains a number of  
     
    121121 
    122122/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ 
    123 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) 
     123#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) 
    124124# define _CRT_SECURE_NO_DEPRECATE 
    125125#endif 
     
    138138/* This should only be incremented when either the layout of swig_type_info changes, 
    139139   or for whatever reason, the runtime changes incompatibly */ 
    140 #define SWIG_RUNTIME_VERSION "2
     140#define SWIG_RUNTIME_VERSION "3
    141141 
    142142/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ 
     
    715715 
    716716 
    717 /* Python.h has to appear first */ 
    718 #include <Python.h> 
    719717 
    720718/* Add PyOS_snprintf for old Pythons */ 
     
    797795#endif 
    798796 
     797/* Py_ssize_t for old Pythons */ 
     798/* This code is as recommended by: */ 
     799/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ 
     800#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) 
     801typedef int Py_ssize_t; 
     802# define PY_SSIZE_T_MAX INT_MAX 
     803# define PY_SSIZE_T_MIN INT_MIN 
     804#endif 
    799805 
    800806/* ----------------------------------------------------------------------------- 
     
    11901196_SWIG_Py_None(void) 
    11911197{ 
    1192   PyObject *none = Py_BuildValue(""); 
     1198  PyObject *none = Py_BuildValue((char*)""); 
    11931199  Py_DECREF(none); 
    11941200  return none; 
     
    20492055     
    20502056    /* here we get the method pointer for callbacks */ 
    2051     char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); 
     2057    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); 
    20522058    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; 
    20532059    if (desc) { 
     
    21702176 } 
    21712177#endif 
    2172  dict = PyObject_GetAttrString(inst, "__dict__"); 
     2178 dict = PyObject_GetAttrString(inst, (char*)"__dict__"); 
    21732179 PyDict_SetItem(dict, SWIG_This(), swig_this); 
    21742180 Py_DECREF(dict); 
     
    23112317/* The python cached type query */ 
    23122318SWIGRUNTIME PyObject * 
    2313 SWIG_Python_TypeCache() { 
     2319SWIG_Python_TypeCache(void) { 
    23142320  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); 
    23152321  return cache; 
     
    24862492#if (PY_VERSION_HEX <= 0x02000000) 
    24872493# if !defined(SWIG_PYTHON_CLASSIC) 
    2488 #  error "This python version requires to use swig with the '-classic' option" 
     2494#  error "This python version requires swig to be run with the '-classic' option" 
    24892495# endif 
    24902496#endif 
     
    24972503#define SWIG_name    "_ogr" 
    24982504 
    2499 #define SWIGVERSION 0x010329  
     2505#define SWIGVERSION 0x010331  
     2506#define SWIG_VERSION SWIGVERSION 
    25002507 
    25012508 
     
    25972604 
    25982605SWIGINTERN swig_type_info* 
    2599 SWIG_pchar_descriptor(
     2606SWIG_pchar_descriptor(void
    26002607{ 
    26012608  static int init = 0; 
     
    26372644{ 
    26382645  if (PyString_Check(obj)) { 
    2639     char *cstr; int len; 
     2646    char *cstr; Py_ssize_t len; 
    26402647    PyString_AsStringAndSize(obj, &cstr, &len); 
    26412648    if (cptr)  { 
     
    35493556  arg1 = reinterpret_cast< OGRDriverShadow * >(argp1); 
    35503557  result = (char *)OGRDriverShadow_name_get(arg1); 
    3551   resultobj = SWIG_FromCharPtr(result); 
     3558  resultobj = SWIG_FromCharPtr((const char *)result); 
    35523559  return resultobj; 
    35533560fail: 
     
    35843591    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_CreateDataSource" "', argument " "2"" of type '" "char const *""'"); 
    35853592  } 
    3586   arg2 = buf2
     3593  arg2 = reinterpret_cast< char * >(buf2)
    35873594  if (obj2) { 
    35883595    { 
     
    36603667    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Driver_CopyDataSource" "', argument " "3"" of type '" "char const *""'"); 
    36613668  } 
    3662   arg3 = buf3
     3669  arg3 = reinterpret_cast< char * >(buf3)
    36633670  if (obj3) { 
    36643671    { 
     
    37293736    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_Open" "', argument " "2"" of type '" "char const *""'"); 
    37303737  } 
    3731   arg2 = buf2
     3738  arg2 = reinterpret_cast< char * >(buf2)
    37323739  if (obj2) { 
    37333740    ecode3 = SWIG_AsVal_int(obj2, &val3); 
     
    37703777    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_DeleteDataSource" "', argument " "2"" of type '" "char const *""'"); 
    37713778  } 
    3772   arg2 = buf2
     3779  arg2 = reinterpret_cast< char * >(buf2)
    37733780  result = (int)OGRDriverShadow_DeleteDataSource(arg1,(char const *)arg2); 
    37743781  resultobj = SWIG_From_int(static_cast< int >(result)); 
     
    38043811    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Driver_TestCapability" "', argument " "2"" of type '" "char const *""'"); 
    38053812  } 
    3806   arg2 = buf2
     3813  arg2 = reinterpret_cast< char * >(buf2)
    38073814  result = (bool)OGRDriverShadow_TestCapability(arg1,(char const *)arg2); 
    38083815  resultobj = SWIG_From_bool(static_cast< bool >(result)); 
     
    38303837  arg1 = reinterpret_cast< OGRDriverShadow * >(argp1); 
    38313838  result = (char *)OGRDriverShadow_GetName(arg1); 
    3832   resultobj = SWIG_FromCharPtr(result); 
     3839  resultobj = SWIG_FromCharPtr((const char *)result); 
    38333840  return resultobj; 
    38343841fail: 
     
    38593866  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1); 
    38603867  result = (char *)OGRDataSourceShadow_name_get(arg1); 
    3861   resultobj = SWIG_FromCharPtr(result); 
     3868  resultobj = SWIG_FromCharPtr((const char *)result); 
    38623869  return resultobj; 
    38633870fail: 
     
    39913998  arg1 = reinterpret_cast< OGRDataSourceShadow * >(argp1); 
    39923999  result = (char *)OGRDataSourceShadow_GetName(arg1); 
    3993   resultobj = SWIG_FromCharPtr(result); 
     4000  resultobj = SWIG_FromCharPtr((const char *)result); 
    39944001  return resultobj; 
    39954002fail: 
     
    40814088    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_CreateLayer" "', argument " "2"" of type '" "char const *""'"); 
    40824089  } 
    4083   arg2 = buf2
     4090  arg2 = reinterpret_cast< char * >(buf2)
    40844091  if (obj2) { 
    40854092    res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OSRSpatialReferenceShadow, 0 |  0 ); 
     
    41714178    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "DataSource_CopyLayer" "', argument " "3"" of type '" "char const *""'"); 
    41724179  } 
    4173   arg3 = buf3
     4180  arg3 = reinterpret_cast< char * >(buf3)
    41744181  if (obj3) { 
    41754182    { 
     
    42694276    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_GetLayerByName" "', argument " "2"" of type '" "char const *""'"); 
    42704277  } 
    4271   arg2 = buf2
     4278  arg2 = reinterpret_cast< char * >(buf2)
    42724279  result = (OGRLayerShadow *)OGRDataSourceShadow_GetLayerByName(arg1,(char const *)arg2); 
    42734280  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRLayerShadow, 0 |  0 ); 
     
    43034310    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_TestCapability" "', argument " "2"" of type '" "char const *""'"); 
    43044311  } 
    4305   arg2 = buf2
     4312  arg2 = reinterpret_cast< char * >(buf2)
    43064313  result = (bool)OGRDataSourceShadow_TestCapability(arg1,(char const *)arg2); 
    43074314  resultobj = SWIG_From_bool(static_cast< bool >(result)); 
     
    43494356    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DataSource_ExecuteSQL" "', argument " "2"" of type '" "char const *""'"); 
    43504357  } 
    4351   arg2 = buf2
     4358  arg2 = reinterpret_cast< char * >(buf2)
    43524359  if (obj2) { 
    43534360    res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_OGRGeometryShadow, 0 |  0 ); 
     
    43624369      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "DataSource_ExecuteSQL" "', argument " "4"" of type '" "char const *""'"); 
    43634370    } 
    4364     arg4 = buf4
     4371    arg4 = reinterpret_cast< char * >(buf4)
    43654372  } 
    43664373  result = (OGRLayerShadow *)OGRDataSourceShadow_ExecuteSQL(arg1,(char const *)arg2,arg3,(char const *)arg4); 
     
    45654572    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_SetAttributeFilter" "', argument " "2"" of type '" "char *""'"); 
    45664573  } 
    4567   arg2 = buf2
     4574  arg2 = reinterpret_cast< char * >(buf2)
    45684575  result = (OGRErr)OGRLayerShadow_SetAttributeFilter(arg1,arg2); 
    45694576  { 
     
    46284635  arg1 = reinterpret_cast< OGRLayerShadow * >(argp1); 
    46294636  result = (char *)OGRLayerShadow_GetName(arg1); 
    4630   resultobj = SWIG_FromCharPtr(result); 
     4637  resultobj = SWIG_FromCharPtr((const char *)result); 
    46314638  return resultobj; 
    46324639fail: 
     
    50585065    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Layer_TestCapability" "', argument " "2"" of type '" "char const *""'"); 
    50595066  } 
    5060   arg2 = buf2
     5067  arg2 = reinterpret_cast< char * >(buf2)
    50615068  result = (bool)OGRLayerShadow_TestCapability(arg1,(char const *)arg2); 
    50625069  resultobj = SWIG_From_bool(static_cast< bool >(result)); 
     
    56095616    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldDefnRef" "', argument " "2"" of type '" "char const *""'"); 
    56105617  } 
    5611   arg2 = buf2
     5618  arg2 = reinterpret_cast< char * >(buf2)
    56125619  result = (OGRFieldDefnShadow *)OGRFeatureShadow_GetFieldDefnRef__SWIG_1(arg1,(char const *)arg2); 
    56135620  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRFieldDefnShadow, 0 |  0 ); 
     
    56605667   
    56615668fail: 
    5662   SWIG_SetErrorMsg(PyExc_NotImplementedError,"No matching function for overloaded 'Feature_GetFieldDefnRef'"); 
     5669  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldDefnRef'.\n  Possible C/C++ prototypes are:\n    GetFieldDefnRef(int)\n    GetFieldDefnRef(char const *)\n"); 
    56635670  return NULL; 
    56645671} 
     
    56895696  arg2 = static_cast< int >(val2); 
    56905697  result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_0(arg1,arg2); 
    5691   resultobj = SWIG_FromCharPtr(result); 
     5698  resultobj = SWIG_FromCharPtr((const char *)result); 
    56925699  return resultobj; 
    56935700fail: 
     
    57195726    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldAsString" "', argument " "2"" of type '" "char const *""'"); 
    57205727  } 
    5721   arg2 = buf2
     5728  arg2 = reinterpret_cast< char * >(buf2)
    57225729  result = (char *)OGRFeatureShadow_GetFieldAsString__SWIG_1(arg1,(char const *)arg2); 
    5723   resultobj = SWIG_FromCharPtr(result); 
     5730  resultobj = SWIG_FromCharPtr((const char *)result); 
    57245731  if (alloc2 == SWIG_NEWOBJ) delete[] buf2; 
    57255732  return resultobj; 
     
    57705777   
    57715778fail: 
    5772   SWIG_SetErrorMsg(PyExc_NotImplementedError,"No matching function for overloaded 'Feature_GetFieldAsString'"); 
     5779  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldAsString'.\n  Possible C/C++ prototypes are:\n    GetFieldAsString(int)\n    GetFieldAsString(char const *)\n"); 
    57735780  return NULL; 
    57745781} 
     
    58295836    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldAsInteger" "', argument " "2"" of type '" "char const *""'"); 
    58305837  } 
    5831   arg2 = buf2
     5838  arg2 = reinterpret_cast< char * >(buf2)
    58325839  result = (int)OGRFeatureShadow_GetFieldAsInteger__SWIG_1(arg1,(char const *)arg2); 
    58335840  resultobj = SWIG_From_int(static_cast< int >(result)); 
     
    58805887   
    58815888fail: 
    5882   SWIG_SetErrorMsg(PyExc_NotImplementedError,"No matching function for overloaded 'Feature_GetFieldAsInteger'"); 
     5889  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldAsInteger'.\n  Possible C/C++ prototypes are:\n    GetFieldAsInteger(int)\n    GetFieldAsInteger(char const *)\n"); 
    58835890  return NULL; 
    58845891} 
     
    59395946    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldAsDouble" "', argument " "2"" of type '" "char const *""'"); 
    59405947  } 
    5941   arg2 = buf2
     5948  arg2 = reinterpret_cast< char * >(buf2)
    59425949  result = (double)OGRFeatureShadow_GetFieldAsDouble__SWIG_1(arg1,(char const *)arg2); 
    59435950  resultobj = SWIG_From_double(static_cast< double >(result)); 
     
    59905997   
    59915998fail: 
    5992   SWIG_SetErrorMsg(PyExc_NotImplementedError,"No matching function for overloaded 'Feature_GetFieldAsDouble'"); 
     5999  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldAsDouble'.\n  Possible C/C++ prototypes are:\n    GetFieldAsDouble(int)\n    GetFieldAsDouble(char const *)\n"); 
    59936000  return NULL; 
    59946001} 
     
    60496056    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_IsFieldSet" "', argument " "2"" of type '" "char const *""'"); 
    60506057  } 
    6051   arg2 = buf2
     6058  arg2 = reinterpret_cast< char * >(buf2)
    60526059  result = (bool)OGRFeatureShadow_IsFieldSet__SWIG_1(arg1,(char const *)arg2); 
    60536060  resultobj = SWIG_From_bool(static_cast< bool >(result)); 
     
    61006107   
    61016108fail: 
    6102   SWIG_SetErrorMsg(PyExc_NotImplementedError,"No matching function for overloaded 'Feature_IsFieldSet'"); 
     6109  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_IsFieldSet'.\n  Possible C/C++ prototypes are:\n    IsFieldSet(int)\n    IsFieldSet(char const *)\n"); 
    61036110  return NULL; 
    61046111} 
     
    61286135    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldIndex" "', argument " "2"" of type '" "char const *""'"); 
    61296136  } 
    6130   arg2 = buf2
     6137  arg2 = reinterpret_cast< char * >(buf2)
    61316138  result = (int)OGRFeatureShadow_GetFieldIndex(arg1,(char const *)arg2); 
    61326139  resultobj = SWIG_From_int(static_cast< int >(result)); 
     
    62816288    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_UnsetField" "', argument " "2"" of type '" "char const *""'"); 
    62826289  } 
    6283   arg2 = buf2
     6290  arg2 = reinterpret_cast< char * >(buf2)
    62846291  OGRFeatureShadow_UnsetField__SWIG_1(arg1,(char const *)arg2); 
    62856292  resultobj = SWIG_Py_Void(); 
     
    63326339   
    63336340fail: 
    6334   SWIG_SetErrorMsg(PyExc_NotImplementedError,"No matching function for overloaded 'Feature_UnsetField'"); 
     6341  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_UnsetField'.\n  Possible C/C++ prototypes are:\n    UnsetField(int)\n    UnsetField(char const *)\n"); 
    63356342  return NULL; 
    63366343} 
     
    64136420    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetField" "', argument " "2"" of type '" "char const *""'"); 
    64146421  } 
    6415   arg2 = buf2
     6422  arg2 = reinterpret_cast< char * >(buf2)
    64166423  { 
    64176424    /* %typemap(in) (tostring argin) */ 
     
    64946501   
    64956502fail: 
    6496   SWIG_SetErrorMsg(PyExc_NotImplementedError,"No matching function for overloaded 'Feature_SetField'"); 
     6503  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_SetField'.\n  Possible C/C++ prototypes are:\n    SetField(int,char const *)\n    SetField(char const *,char const *)\n"); 
    64976504  return NULL; 
    64986505} 
     
    65756582  arg1 = reinterpret_cast< OGRFeatureShadow * >(argp1); 
    65766583  result = (char *)OGRFeatureShadow_GetStyleString(arg1); 
    6577   resultobj = SWIG_FromCharPtr(result); 
     6584  resultobj = SWIG_FromCharPtr((const char *)result); 
    65786585  return resultobj; 
    65796586fail: 
     
    66046611    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_SetStyleString" "', argument " "2"" of type '" "char const *""'"); 
    66056612  } 
    6606   arg2 = buf2
     6613  arg2 = reinterpret_cast< char * >(buf2)
    66076614  OGRFeatureShadow_SetStyleString(arg1,(char const *)arg2); 
    66086615  resultobj = SWIG_Py_Void(); 
     
    66696676    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Feature_GetFieldType" "', argument " "2"" of type '" "char const *""'"); 
    66706677  } 
    6671   arg2 = buf2
     6678  arg2 = reinterpret_cast< char * >(buf2)
    66726679  result = (OGRFieldType)OGRFeatureShadow_GetFieldType__SWIG_1(arg1,(char const *)arg2); 
    66736680  resultobj = SWIG_From_int(static_cast< int >(result)); 
     
    67206727   
    67216728fail: 
    6722   SWIG_SetErrorMsg(PyExc_NotImplementedError,"No matching function for overloaded 'Feature_GetFieldType'"); 
     6729  SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number of arguments for overloaded function 'Feature_GetFieldType'.\n  Possible C/C++ prototypes are:\n    GetFieldType(int)\n    GetFieldType(char const *)\n"); 
    67236730  return NULL; 
    67246731} 
     
    67726779      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FeatureDefn" "', argument " "1"" of type '" "char const *""'"); 
    67736780    } 
    6774     arg1 = buf1
     6781    arg1 = reinterpret_cast< char * >(buf1)
    67756782  } 
    67766783  result = (OGRFeatureDefnShadow *)new_OGRFeatureDefnShadow((char const *)arg1); 
     
    67996806  arg1 = reinterpret_cast< OGRFeatureDefnShadow * >(argp1); 
    68006807  result = (char *)OGRFeatureDefnShadow_GetName(arg1); 
    6801   resultobj = SWIG_FromCharPtr(result); 
     6808  resultobj = SWIG_FromCharPtr((const char *)result); 
    68026809  return resultobj; 
    68036810fail: 
     
    68826889    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FeatureDefn_GetFieldIndex" "', argument " "2"" of type '" "char const *""'"); 
    68836890  } 
    6884   arg2 = buf2
     6891  arg2 = reinterpret_cast< char * >(buf2)
    68856892  result = (int)OGRFeatureDefnShadow_GetFieldIndex(arg1,(char const *)arg2); 
    68866893  resultobj = SWIG_From_int(static_cast< int >(result)); 
     
    70487055      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_FieldDefn" "', argument " "1"" of type '" "char const *""'"); 
    70497056    } 
    7050     arg1 = buf1
     7057    arg1 = reinterpret_cast< char * >(buf1)
    70517058  } 
    70527059  if (obj1) { 
     
    70827089  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1); 
    70837090  result = (char *)OGRFieldDefnShadow_GetName(arg1); 
    7084   resultobj = SWIG_FromCharPtr(result); 
     7091  resultobj = SWIG_FromCharPtr((const char *)result); 
    70857092  return resultobj; 
    70867093fail: 
     
    71047111  arg1 = reinterpret_cast< OGRFieldDefnShadow * >(argp1); 
    71057112  result = (char *)OGRFieldDefnShadow_GetNameRef(arg1); 
    7106   resultobj = SWIG_FromCharPtr(result); 
     7113  resultobj = SWIG_FromCharPtr((const char *)result); 
    71077114  return resultobj; 
    71087115fail: 
     
    71337140    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FieldDefn_SetName" "', argument " "2"" of type '" "char const *""'"); 
    71347141  } 
    7135   arg2 = buf2
     7142  arg2 = reinterpret_cast< char * >(buf2)
    71367143  OGRFieldDefnShadow_SetName(arg1,(char const *)arg2); 
    71377144  resultobj = SWIG_Py_Void(); 
     
    73767383  arg2 = static_cast< OGRFieldType >(val2); 
    73777384  result = (char *)OGRFieldDefnShadow_GetFieldTypeName(arg1,arg2); 
    7378   resultobj = SWIG_FromCharPtr(result); 
     7385  resultobj = SWIG_FromCharPtr((const char *)result); 
    73797386  return resultobj; 
    73807387fail: 
     
    74077414  { 
    74087415    /* %typemap(in,numinputs=1) (int nLen, char *pBuf ) */ 
    7409     PyString_AsStringAndSize(obj0, &arg2, &arg1 ); 
     7416     
     7417     
     7418     
     7419     
     7420     
     7421     
     7422     
     7423     
     7424     
    74107425  } 
    74117426  if (obj1) { 
     
    74737488    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CreateGeometryFromGML" "', argument " "1"" of type '" "char const *""'"); 
    74747489  } 
    7475   arg1 = buf1
     7490  arg1 = reinterpret_cast< char * >(buf1)
    74767491  result = (OGRGeometryShadow *)CreateGeometryFromGML((char const *)arg1); 
    74777492  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRGeometryShadow, SWIG_POINTER_OWN |  0 ); 
     
    75497564      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_Geometry" "', argument " "2"" of type '" "char *""'"); 
    75507565    } 
    7551     arg2 = buf2
     7566    arg2 = reinterpret_cast< char * >(buf2)
    75527567  } 
    75537568  if (obj2) { 
     
    75637578      SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_Geometry" "', argument " "4"" of type '" "char *""'"); 
    75647579    } 
    7565     arg4 = buf4
     7580    arg4 = reinterpret_cast< char * >(buf4)
    75667581  } 
    75677582  if (obj4) { 
     
    75707585      SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "new_Geometry" "', argument " "5"" of type '" "char *""'"); 
    75717586    } 
    7572     arg5 = buf5
     7587    arg5 = reinterpret_cast< char * >(buf5)
    75737588  } 
    75747589  result = (OGRGeometryShadow *)new_OGRGeometryShadow(arg1,arg2,arg3,arg4,arg5); 
     
    77457760  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1); 
    77467761  result = (char *)OGRGeometryShadow_ExportToGML(arg1); 
    7747   resultobj = SWIG_FromCharPtr(result); 
     7762  resultobj = SWIG_FromCharPtr((const char *)result); 
    77487763  return resultobj; 
    77497764fail: 
     
    79567971  arg1 = reinterpret_cast< OGRGeometryShadow * >(argp1); 
    79577972  result = (char *)OGRGeometryShadow_GetGeometryName(arg1); 
    7958   resultobj = SWIG_FromCharPtr(result); 
     7973  resultobj = SWIG_FromCharPtr((const char *)result); 
    79597974  return resultobj; 
    79607975fail: 
     
    92079222    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Open" "', argument " "1"" of type '" "char const *""'"); 
    92089223  } 
    9209   arg1 = buf1
     9224  arg1 = reinterpret_cast< char * >(buf1)
    92109225  if (obj1) { 
    92119226    ecode2 = SWIG_AsVal_int(obj1, &val2); 
     
    92469261    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OpenShared" "', argument " "1"" of type '" "char const *""'"); 
    92479262  } 
    9248   arg1 = buf1
     9263  arg1 = reinterpret_cast< char * >(buf1)
    92499264  if (obj1) { 
    92509265    ecode2 = SWIG_AsVal_int(obj1, &val2); 
     
    92789293    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetDriverByName" "', argument " "1"" of type '" "char const *""'"); 
    92799294  } 
    9280   arg1 = buf1
     9295  arg1 = reinterpret_cast< char * >(buf1)
    92819296  result = (OGRDriverShadow *)GetDriverByName((char const *)arg1); 
    92829297  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_OGRDriverShadow, 0 |  0 ); 
     
    95669581 * 
    95679582 * The generated swig_type_info structures are assigned staticly to an initial  
    9568  * array. We just loop though that array, and handle each type individually. 
     9583 * array. We just loop through that array, and handle each type individually. 
    95699584 * First we lookup if this type has been already loaded, and if so, use the 
    95709585 * loaded structure instead of the generated one. Then we have to fill in the 
     
    96049619#endif 
    96059620 
     9621 
    96069622SWIGRUNTIME void 
    96079623SWIG_InitializeModule(void *clientdata) { 
    96089624  size_t i; 
    9609   swig_module_info *module_head
    9610   static int init_run = 0
     9625  swig_module_info *module_head, *iter
     9626  int found
    96119627   
    96129628  clientdata = clientdata; 
    96139629   
    9614   if (init_run) return; 
    9615   init_run = 1; 
    9616    
    9617   /* Initialize the swig_module */ 
    9618   swig_module.type_initial = swig_type_initial; 
    9619   swig_module.cast_initial = swig_cast_initial; 
     9630  /* check to see if the circular list has been setup, if not, set it up */ 
     9631  if (swig_module.next==0) { 
     9632    /* Initialize the swig_module */ 
     9633    swig_module.type_initial = swig_type_initial; 
     9634    swig_module.cast_initial = swig_cast_initial; 
     9635    swig_module.next = &swig_module; 
     9636  } 
    96209637   
    96219638  /* Try and load any already created modules */ 
    96229639  module_head = SWIG_GetModule(clientdata); 
    9623   if (module_head) { 
     9640  if (!module_head) { 
     9641    /* This is the first module loaded for this interpreter */ 
     9642    /* so set the swig module into the interpreter */ 
     9643    SWIG_SetModule(clientdata, &swig_module); 
     9644    module_head = &swig_module; 
     9645  } else { 
     9646    /* the interpreter has loaded a SWIG module, but has it loaded this one? */ 
     9647    found=0; 
     9648    iter=module_head; 
     9649    do { 
     9650      if (iter==&swig_module) { 
     9651        found=1; 
     9652        break; 
     9653      } 
     9654      iter=iter->next; 
     9655    } while (iter!= module_head); 
     9656     
     9657    /* if the is found in the list, then all is done and we may leave */ 
     9658    if (found) return; 
     9659    /* otherwise we must add out module into the list */ 
    96249660    swig_module.next = module_head->next; 
    96259661    module_head->next = &swig_module; 
    9626   } else { 
    9627     /* This is the first module loaded */ 
    9628     swig_module.next = &swig_module; 
    9629     SWIG_SetModule(clientdata, &swig_module); 
    96309662  } 
    96319663   
     
    99409972   
    99419973  SWIGINTERN PyObject * 
    9942   SWIG_globals() { 
     9974  SWIG_globals(void) { 
    99439975    static PyObject *_SWIG_globals = 0;  
    99449976    if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();   
     
    998510017    size_t i; 
    998610018    for (i = 0; methods[i].ml_name; ++i) { 
    9987       char *c = methods[i].ml_doc; 
     10019      const char *c = methods[i].ml_doc; 
    998810020      if (c && (c = strstr(c, "swig_ptr: "))) { 
    998910021        int j; 
    999010022        swig_const_info *ci = 0; 
    9991         char *name = c + 10; 
     10023        const char *name = c + 10; 
    999210024        for (j = 0; const_table[j].type; ++j) { 
    999310025          if (strncmp(const_table[j].name, name,  
  • branches/1.4/gdal/swig/python/osr.py

    r10420 r11385  
    1 # This file was created automatically by SWIG 1.3.29. 
     1# This file was automatically generated by SWIG (http://www.swig.org). 
     2# Version 1.3.31 
     3
    24# Don't modify this file, modify the SWIG interface instead. 
    35# This file is compatible with both classic and new-style classes. 
     
    68import new 
    79new_instancemethod = new.instancemethod 
     10try: 
     11    _swig_property = property 
     12except NameError: 
     13    pass # Python < 2.2 doesn't have 'property'. 
    814def _swig_setattr_nondynamic(self,class_type,name,value,static=1): 
    915    if (name == "thisown"): return self.this.own(value) 
  • branches/1.4/gdal/swig/python/osr_wrap.cpp

    </
    r10420 r11385  
    11/* ---------------------------------------------------------------------------- 
    22 * This file was automatically generated by SWIG (http://www.swig.org). 
    3  * Version 1.3.29 
     3 * Version 1.3.31 
    44 *  
    55 * This file is not intended to be easily readable and contains a number of  
     
    121121 
    122122/* Deal with Microsoft's attempt at deprecating C standard runtime functions */ 
    123 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) 
     123#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE) 
    124124# define _CRT_SECURE_NO_DEPRECATE 
    125125#endif 
     
    138138/* This should only be incremented when either the layout of swig_type_info changes, 
    139139   or for whatever reason, the runtime changes incompatibly */ 
    140 #define SWIG_RUNTIME_VERSION "2
     140#define SWIG_RUNTIME_VERSION "3
    141141 
    142142/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */ 
     
    715715 
    716716 
    717 /* Python.h has to appear first */ 
    718 #include <Python.h> 
    719717 
    720718/* Add PyOS_snprintf for old Pythons */ 
     
    797795#endif 
    798796 
     797/* Py_ssize_t for old Pythons */ 
     798/* This code is as recommended by: */ 
     799/* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */ 
     800#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN) 
     801typedef int Py_ssize_t; 
     802# define PY_SSIZE_T_MAX INT_MAX 
     803# define PY_SSIZE_T_MIN INT_MIN 
     804#endif 
    799805 
    800806/* ----------------------------------------------------------------------------- 
     
    11901196_SWIG_Py_None(void) 
    11911197{ 
    1192   PyObject *none = Py_BuildValue(""); 
     1198  PyObject *none = Py_BuildValue((char*)""); 
    11931199  Py_DECREF(none); 
    11941200  return none; 
     
    20492055     
    20502056    /* here we get the method pointer for callbacks */ 
    2051     char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); 
     2057    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc); 
    20522058    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0; 
    20532059    if (desc) { 
     
    21702176 } 
    21712177#endif 
    2172  dict = PyObject_GetAttrString(inst, "__dict__"); 
     2178 dict = PyObject_GetAttrString(inst, (char*)"__dict__"); 
    21732179 PyDict_SetItem(dict, SWIG_This(), swig_this); 
    21742180 Py_DECREF(dict); 
     
    23112317/* The python cached type query */ 
    23122318SWIGRUNTIME PyObject * 
    2313 SWIG_Python_TypeCache() { 
     2319SWIG_Python_TypeCache(void) { 
    23142320  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New(); 
    23152321  return cache; 
     
    24772483#if (PY_VERSION_HEX <= 0x02000000) 
    24782484# if !defined(SWIG_PYTHON_CLASSIC) 
    2479 #  error "This python version requires to use swig with the '-classic' option" 
     2485#  error "This python version requires swig to be run with the '-classic' option" 
    24802486# endif 
    24812487#endif 
     
    24882494#define SWIG_name    "_osr" 
    24892495 
    2490 #define SWIGVERSION 0x010329  
     2496#define SWIGVERSION 0x010331  
     2497#define SWIG_VERSION SWIGVERSION 
    24912498 
    24922499 
     
    25592566 
    25602567SWIGINTERN swig_type_info* 
    2561 SWIG_pchar_descriptor(
     2568SWIG_pchar_descriptor(void
    25622569{ 
    25632570  static int init = 0; 
     
    26832690{ 
    26842691  if (PyString_Check(obj)) { 
    2685     char *cstr; int len; 
     2692    char *cstr; Py_ssize_t len; 
    26862693    PyString_AsStringAndSize(obj, &cstr, &len); 
    26872694    if (cptr)  { 
     
    31923199    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetWellKnownGeogCSAsWKT" "', argument " "1"" of type '" "char const *""'"); 
    31933200  } 
    3194   arg1 = buf1
     3201  arg1 = reinterpret_cast< char * >(buf1)
    31953202  result = (OGRErr)GetWellKnownGeogCSAsWKT((char const *)arg1,arg2); 
    31963203  { 
     
    32613268    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GetUserInputAsWKT" "', argument " "1"" of type '" "char const *""'"); 
    32623269  } 
    3263   arg1 = buf1
     3270  arg1 = reinterpret_cast< char * >(buf1)
    32643271  result = (OGRErr)GetUserInputAsWKT((char const *)arg1,arg2); 
    32653272  { 
     
    33283335      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SpatialReference" "', argument " "1"" of type '" "char const *""'"); 
    33293336    } 
    3330     arg1 = buf1
     3337    arg1 = reinterpret_cast< char * >(buf1)
    33313338  } 
    33323339  result = (OSRSpatialReferenceShadow *)new_OSRSpatialReferenceShadow((char const *)arg1); 
     
    33773384  arg1 = reinterpret_cast< OSRSpatialReferenceShadow * >(argp1); 
    33783385  result = (char *)OSRSpatialReferenceShadow___str__(arg1); 
    3379   resultobj = SWIG_FromCharPtr(result); 
     3386  resultobj = SWIG_FromCharPtr((const char *)result); 
    33803387  delete[] result; 
    33813388  return resultobj; 
     
    35403547    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SpatialReference_GetAttrValue" "', argument " "2"" of type '" "char const *""'"); 
    35413548  } 
    3542   arg2 = buf2
     3549  arg2 = reinterpret_cast< char * >(buf2)
    35433550  if (obj2) { 
    35443551    ecode3 = SWIG_AsVal_int(obj2, &val3);