Added correct (I hope) typechecking for native scripting objects
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4821 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
10d279f17f
commit
418ed3416b
3 changed files with 7 additions and 4 deletions
|
|
@ -295,6 +295,7 @@
|
|||
typedef unsigned long SCM;
|
||||
%typemap (in) SCM "$1=$input;";
|
||||
%typemap (out) SCM "$result=$1;";
|
||||
%typecheck(SWIG_TYPECHECK_POINTER) SCM "$1=1;";
|
||||
|
||||
/* Some ANSI C typemaps */
|
||||
|
||||
|
|
|
|||
|
|
@ -263,6 +263,8 @@ REF_MAP(double, SCHEME_REALP, scheme_real_to_double,
|
|||
|
||||
%typemap (in) Scheme_Object * "$1=$input;";
|
||||
%typemap (out) Scheme_Object * "$result=$1;";
|
||||
%typecheck(SWIG_TYPECHECK_POINTER) Scheme_Object * "$1=1;";
|
||||
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* String & length
|
||||
|
|
@ -340,4 +342,3 @@ REF_MAP(double, SCHEME_REALP, scheme_real_to_double,
|
|||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -372,14 +372,15 @@
|
|||
|
||||
%typemap(constant) SWIGTYPE (CLASS::*) "rb_define_const($module, \"$symname\", SWIG_NewPackedObj((void *) &$1, sizeof($type), $1_descriptor));";
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* typedef & typemaps for VALUE (passed through unmodified)
|
||||
* ------------------------------------------------------------ */
|
||||
/* ---------------------------------------------------------------------
|
||||
* typedef & typemaps for VALUE (passed through unmodified and unchecked)
|
||||
* --------------------------------------------------------------------- */
|
||||
|
||||
typedef unsigned long VALUE;
|
||||
|
||||
%typemap(ruby,in) VALUE "$1 = $input;";
|
||||
%typemap(ruby,out) VALUE "$result = $1;";
|
||||
%typecheck(SWIG_TYPECHECK_POINTER) VALUE "$1 = 1;";
|
||||
|
||||
/* ------------------------------------------------------------
|
||||
* String & length
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue