swig/Lib/octave
William S Fulton 91aba9f719 UTL STL container descriptor checks
The vector of pointers (just fixed) were not working correctly because the
descriptors returned from swig::type_info() were sometimes returning
zero. Zero should only be used for void * as the subsequent call to
SWIG_ConvertPtr will blindly cast the pointer without checking
descriptor.

std::vector<void *> does not work and will require further changes:
specializing traits_info<void *> to return 0 and traits_asptr<void *>.
I tried this and traits_asptr<void> also needs to be added in which
seems odd and requires further investigation...

Lib/python/pystdcommon.swg:
  template <> struct traits_info<void *> {
    static swig_type_info *type_info() {
      static swig_type_info *info = 0;
    }
  };

Lib/std/std_common.i:
  template <>
  struct traits_asptr<void *> {
    static int asptr(PyObject *obj, void ***val) {
      void **p;
      swig_type_info *descriptor = 0;
      int res = SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0);
      if (SWIG_IsOK(res)) {
	if (val) *val = p;
      }
      return res;
    }
  };

  // this is needed, but am not sure this is expected
  template <>
  struct traits_asptr<void> {
    static int asptr(PyObject *obj, void **val) {
      void **p;
      swig_type_info *descriptor = 0;
      int res = SWIG_ConvertPtr(obj, (void **)&p, descriptor, 0);
      if (SWIG_IsOK(res)) {
	if (val) *val = p;
      }
      return res;
    }
  };
2016-07-28 22:51:29 +01:00
..
attribute.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
boost_shared_ptr.i shared_ptr typemap error message fix for global variables 2015-09-25 22:57:59 +01:00
carrays.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
cdata.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
cmalloc.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
director.swg Fix cut-and-paste typo 2015-03-12 17:50:52 +13:00
exception.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
factory.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
implicit.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
octave.swg Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
octcomplex.swg Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
octcontainer.swg UTL STL container descriptor checks 2016-07-28 22:51:29 +01:00
octfragments.swg Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
octiterators.swg Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
octopers.swg Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
octprimtypes.swg Don't use long long if it isn't available 2016-01-06 16:52:37 -05:00
octrun.swg octave: map unary functions to __...___ Python-style unary members 2016-02-07 20:22:39 +01:00
octruntime.swg octave: recognize Python __float__ numeric conversion operator 2016-02-07 20:22:39 +01:00
octstdcommon.swg UTL STL container descriptor checks 2016-07-28 22:51:29 +01:00
octtypemaps.swg Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
octuserdir.swg Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
std_alloc.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
std_basic_string.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
std_carray.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
std_char_traits.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
std_common.i Fix STL wrappers to not generate <: digraphs. 2015-12-12 14:05:46 +00:00
std_complex.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
std_container.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
std_deque.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
std_except.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
std_list.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
std_map.i UTL STL container descriptor checks 2016-07-28 22:51:29 +01:00
std_pair.i UTL STL container descriptor checks 2016-07-28 22:51:29 +01:00
std_shared_ptr.i Attempting fixes for Octave shared_ptr support 2015-01-05 10:53:06 -05:00
std_string.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
std_vector.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
stl.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00
typemaps.i Revert "Octave: cleanup/restructure library files" 2014-10-09 19:34:02 +01:00