Break the standard Ruby typemaps out into a number of smaller files
which are included by ruby.swg. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6121 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
faf48cb585
commit
db3148bad0
9 changed files with 692 additions and 625 deletions
33
Lib/ruby/rubyvoid.swg
Normal file
33
Lib/ruby/rubyvoid.swg
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
/* ------------------------------------------------------------
|
||||
* Void * - Accepts any kind of pointer
|
||||
* ------------------------------------------------------------ */
|
||||
|
||||
/* in */
|
||||
|
||||
%typemap(in) void *
|
||||
"SWIG_ConvertPtr($input, (void **) &$1, 0, 1);";
|
||||
|
||||
/* out */
|
||||
|
||||
%typemap(out) void "$result = Qnil;";
|
||||
|
||||
/* varin */
|
||||
|
||||
%typemap(varin) void *
|
||||
"SWIG_ConvertPtr($input, (void **) &$1, 0, 1);";
|
||||
|
||||
/* varout */
|
||||
|
||||
%typemap(varout) void "$result = Qnil;";
|
||||
|
||||
/* directorout */
|
||||
|
||||
%typemap(directorout) void * "if ((SWIG_ConvertPtr($input,(void **) &$result, 0, SWIG_POINTER_EXCEPTION | $disown )) == -1) throw Swig::DirectorTypeMismatchException(\"Pointer conversion failed.\");";
|
||||
|
||||
/* typecheck */
|
||||
|
||||
%typecheck(SWIG_TYPECHECK_VOIDPTR) void * {
|
||||
void *ptr;
|
||||
$1 = (NIL_P($input) || (TYPE($input) == T_DATA && SWIG_ConvertPtr($input, &ptr, 0, 0) != -1)) ? 1 : 0;
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue