swig/Lib/ruby/rubyvoid.swg
Lyle Johnson db3148bad0 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
2004-08-24 12:28:07 +00:00

33 lines
864 B
Text

/* ------------------------------------------------------------
* 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;
}