1/* ------------------------------------------------------------
2 *  Typemap specializations for Ruby
3 * ------------------------------------------------------------ */
4/* ------------------------------------------------------------
5 *  Fragment section
6 * ------------------------------------------------------------ */
7/* bool is dangerous in Ruby, change precedence */
8#undef SWIG_TYPECHECK_BOOL
9%define SWIG_TYPECHECK_BOOL             10000 %enddef
10
11/* Include fundamental fragemt definitions */
12%include <typemaps/fragments.swg>
13
14/* Look for user fragments file. */
15%include <rubyfragments.swg>
16
17/* Ruby fragments for primitive types */
18%include <rubyprimtypes.swg>
19
20/* Ruby fragments for char* strings */
21%include <rubystrings.swg>
22
23/* Backward compatibility output helper */
24%fragment("output_helper","header") %{
25#define output_helper SWIG_Ruby_AppendOutput
26%}
27
28/* ------------------------------------------------------------
29 *  Unified typemap section
30 * ------------------------------------------------------------ */
31
32/* Directors are supported in Ruby */
33#ifndef SWIG_DIRECTOR_TYPEMAPS
34#define SWIG_DIRECTOR_TYPEMAPS
35#endif
36
37
38/* Ruby types */
39#define SWIG_Object                      VALUE
40#define VOID_Object                      Qnil
41
42/* Overload of the output/constant/exception handling */
43
44/* append output */
45#define SWIG_AppendOutput(result,obj)    SWIG_Ruby_AppendOutput(result, obj)
46
47/* set constant */
48#define SWIG_SetConstant(name, obj)      rb_define_const($module, name, obj)
49
50/* raise */
51#define SWIG_Raise(obj, type, desc)      rb_exc_raise(SWIG_Ruby_ExceptionType(desc, obj))
52
53/* Get the address of the 'Ruby self' object */
54
55%typemap(in,numinputs=0,noblock=1) VALUE* RUBY_SELF {
56  $1 = &self;
57}
58
59/* Include the unified typemap library */
60%include <typemaps/swigtypemaps.swg>
61
62
63