Perl added to the Unified typemap library, cleaner way to use the library, and 'normalized' macro names

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7707 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2005-10-24 14:59:05 +00:00
commit 3c65cea431
112 changed files with 3262 additions and 3375 deletions

View file

@ -10,37 +10,31 @@
/* -----------------------------------------------------------------------------
* Basic definitions
* ----------------------------------------------------------------------------- */
#define %convertptr_flags $track
#define %newpointer_flags $track
#define %newinstance_flags $track
%define_swig_object(VALUE)
#define SWIG_Object VALUE
#define VOID_Object Qnil
#define SWIG_VoidObject() Qnil
#define SWIG_SetResultObj(obj) $result = obj
#define SWIG_AppendResultObj(obj) $result = SWIG_Ruby_AppendResult($result, obj)
#define SWIG_SetConstantObj(name, obj) rb_define_const($module, name, obj)
#define SWIG_Raise(obj, type, desc) rb_exc_raise(rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj)))
#define SWIG_DirOutFail(code, msg) Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(code), msg)
#define SWIG_AppendOutput(result,obj) SWIG_Ruby_AppendOutput(result, obj)
#define SWIG_SetConstant(name, obj) rb_define_const($module, name, obj)
#define SWIG_Raise(obj, type, desc) rb_exc_raise(rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj)))
#define SWIG_DirOutFail(code, msg) Swig::DirectorTypeMismatchException::raise(SWIG_ErrorType(code), msg)
/* -----------------------------------------------------------------------------
* All the typemaps
* ----------------------------------------------------------------------------- */
%include <typemaps/exception.swg>
%include <typemaps/swigtype.swg>
%include <typemaps/void.swg>
%include <typemaps/valtypes.swg>
%include <typemaps/ptrtypes.swg>
%include <typemaps/swigobject.swg>
%include <typemaps/inoutlist.swg>
%include <rubyprimtypes.swg>
%include <rubystrings.swg>
%include <typemaps/misctypes.swg>
%include <typemaps/enumint.swg>
%include <typemaps/swigtypemaps.swg>
/* -----------------------------------------------------------------------------
* Backward compatibility output helper
* ----------------------------------------------------------------------------- */
%fragment("output_helper","header") %{
#define output_helper SWIG_Ruby_AppendResult
#define output_helper SWIG_Ruby_AppendOutput
%}