Commit graph

299 commits

Author SHA1 Message Date
Olly Betts
90f9117e10 Fix various comment and documentation typos 2017-08-13 18:04:33 +12:00
Mike Romberg
c3ba9506bf as() no longer uses memset and always throws. 2017-07-20 14:48:51 -06:00
William S Fulton
82969b0755 Fix warning in generated code - traits_asptr.
Visual Studio 2015 debug builds:
error C4703: potentially uninitialized local pointer variable 'p' used
2017-06-13 19:02:59 +01:00
William S Fulton
5d5fd5b122 Fix scilab fragment dependency problem in STL headers
import_stl test now working again
2017-06-06 19:56:59 +01:00
William S Fulton
ab1e9f5bd9 Consistent whitespace amongst all the shared_ptr and intrusive_ptr typemaps
[skip ci]
2017-04-20 19:21:47 +01:00
Simon Marchetto
e517128e08 [Scilab] fix compilation, missing return 2016-12-20 10:09:07 +01:00
Simon Marchetto
94bee6b35a [Scilab] put typemap int/double check into function (to reduce generated code size) 2016-12-19 15:04:30 +01:00
Simon Marchetto
4d46527c9c scilab: clean 2016-12-19 15:04:30 +01:00
Simon Marchetto
88b4827d87 scilab: SWIG_ptr() accepts mlist typed pointers and converts them to pointers 2016-12-15 23:57:42 +01:00
Simon Marchetto
6b2caca8b9 scilab: add runtime function SWIG_Scilab_TypeQuery() checks runtime is initialized 2016-10-05 14:09:08 +02:00
Simon Marchetto
36156a2295 scilab: clean runtime code (move error functions..) 2016-10-05 14:09:08 +02:00
Simon Marchetto
457ea5d209 scilab: remove compilation warnings 2016-09-26 13:55:45 +02:00
Simon Marchetto
0c09b00d6e scilab: mlists that map pointers can be given a custom type name 2016-09-26 11:54:17 +02:00
Simon Marchetto
c252d5cb40 scilab: pointer is mapped to mlist instead of tlist (for scilab overloading) 2016-09-02 11:36:02 +02:00
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
Simon Marchetto
9f4ad6e7dc scilab: fix pointer type name 2016-04-06 13:22:59 +02:00
Simon Marchetto
2e556a4cda scilab: fix warnings 2016-03-14 17:49:05 +01:00
Simon Marchetto
46a8acb538 scilab: fix compilation error (no return in SWIG_CheckPtr()) 2016-03-14 17:42:04 +01:00
simon
e2e06c0031 scilab: fix C90 non conformance 2016-03-11 18:03:32 +01:00
simon
1846dec899 scilab: remove debug stuff 2016-03-11 12:29:21 +01:00
simon
b9bddada7a scilab: fix object/pointer type checking 2016-03-08 17:37:39 +01:00
simon
424bebb165 scilab: pointers are mapped as a tlist (instead of pointers) containing type info 2016-03-08 17:37:39 +01:00
simon
e5f4a60fbf scilab: fix indentation 2016-03-02 05:14:44 -05:00
simon
94a94edae4 scilab: fix scilab 6.0 beta1 compilation error 2016-03-02 05:14:44 -05:00
William S Fulton
6b4e57245d Fix STL wrappers to not generate <: digraphs.
For example std::vector<::X::Y> was sometimes generated, now
corrected to std::vector< ::X::Y >.
2015-12-12 14:05:46 +00:00
William S Fulton
fcb383b46b shared_ptr typemap error message fix for global variables
$argnum was not being expanded in the generated code
Correct to use the error message from the standard typemaps
2015-09-25 22:57:59 +01:00
Simon Marchetto
078ad6cb86 simplify SWIG_SciString_AsChar() 2015-06-23 16:24:35 +02:00
Simon Marchetto
b05f0057ca improve support of varargs 2015-06-23 16:24:35 +02:00
Simon Marchetto
05cfa06dbb scilab: use freeAllocatedSingleString() after getAllocatedSingleTree() 2015-06-23 16:24:35 +02:00
Simon Marchetto
64e5215f29 scilab: fix memory leak 2015-06-23 16:24:35 +02:00
Simon Marchetto
4c6f29b778 scilab: fix possible crash by using consistent allocation/free methods (use SWIG macros) 2015-03-24 16:52:18 +01:00
Simon Marchetto
4b2ccd2892 scilab: fix compilation error on Windows 2015-02-13 12:07:27 +01:00
William S Fulton
4e86210e74 Scilab typecheck typemaps fix for C90
Fix mix of mixed declarations and code.
Also redo these typemaps so that the SWIG preprocessor comments don't appear
in the generated code.
2015-02-11 23:32:45 +00:00
William S Fulton
0236435c48 Scilab typemap fixes for C89 2015-02-11 23:24:40 +00:00
Simon Marchetto
78705a5175 gateway source is moved into wrapper source 2015-01-07 18:04:29 +01:00
Simon Marchetto
aba56486fe scilab: fix std::string length issue 2014-10-23 11:08:34 +02:00
Simon Marchetto
06614ebb79 scilab: fix compilation warnings in primitive_types test 2014-10-21 10:03:29 +02:00
Simon Marchetto
f93e23b32f scilab: fix matrix2 example compilation warnings 2014-10-20 17:44:46 +02:00
Simon Marchetto
d3afd65698 scilab: fix compilation error in scilab 5.3.3 2014-10-20 17:03:17 +02:00
Simon Marchetto
20fc167624 scilab: support typed constants (U UL L) in scilabconst(1) 2014-10-16 16:00:51 +02:00
Simon Marchetto
6791e3ac7a scilab: fix SWIG_SciString_FromChar compilation error on some compilers 2014-10-14 09:26:12 +02:00
Simon Marchetto
3997b03f4c scilab: fix int typemaps (functions and fragment names) 2014-09-29 14:56:28 +02:00
Simon Marchetto
2bfb473b6f scilab: fix li_std_string_extra test, missing std_char_traits.i 2014-09-26 11:11:44 +02:00
Simon Marchetto
95c842a9c0 scilab: fix li_std_string_extra, missing lib std_basic_string.i 2014-09-26 09:03:09 +02:00
Simon Marchetto
0567a9765d scilab: remove useless SWIG_Scilab_GetOutputPositionAndReset() 2014-09-11 14:53:28 +02:00
Simon Marchetto
f58be33005 scilab: rename function name management routines 2014-09-11 14:46:44 +02:00
Simon Marchetto
d8dd9e5484 scilab: fix li_std_vector test 2014-09-11 12:33:49 +02:00
Simon Marchetto
7289fa7e75 scilab: rename wrapper global variable fname to SwigFuncName 2014-09-11 12:14:11 +02:00
Simon Marchetto
4bb8c90101 Revert "scilab: remove useless SWIG_Scilab_SetOutput() second parameter"
This reverts commit 99c82bffa5.
2014-09-11 11:44:38 +02:00
Simon Marchetto
429af4052f Revert "scilab: fix compilation error (extra parenthesis)"
This reverts commit 7249cd6a97.
2014-09-11 11:44:15 +02:00