Commit | Line | Data |
---|---|---|
920dae64 AT |
1 | /* ------------------------------------------------------------ |
2 | * Void * - Accepts any kind of pointer | |
3 | * ------------------------------------------------------------ */ | |
4 | ||
5 | /* in */ | |
6 | ||
7 | %typemap(in) void * | |
8 | "SWIG_ConvertPtr($input, (void **) &$1, 0, SWIG_POINTER_EXCEPTION|$disown);"; | |
9 | ||
10 | /* out */ | |
11 | ||
12 | %typemap(out) void "$result = Qnil;"; | |
13 | ||
14 | /* varin */ | |
15 | ||
16 | %typemap(varin) void * | |
17 | "SWIG_ConvertPtr($input, (void **) &$1, 0, 1);"; | |
18 | ||
19 | /* varout */ | |
20 | ||
21 | %typemap(varout) void "$result = Qnil;"; | |
22 | ||
23 | /* directorout */ | |
24 | ||
25 | %typemap(directorout) void * "if ((SWIG_ConvertPtr($input,(void **) &$result, 0, SWIG_POINTER_EXCEPTION | $disown )) == -1) throw Swig::DirectorTypeMismatchException(\"Pointer conversion failed.\");"; | |
26 | ||
27 | /* typecheck */ | |
28 | ||
29 | %typecheck(SWIG_TYPECHECK_VOIDPTR) void * { | |
30 | void *ptr; | |
31 | $1 = (NIL_P($input) || (TYPE($input) == T_DATA && SWIG_ConvertPtr($input, &ptr, 0, 0) != -1)) ? 1 : 0; | |
32 | } | |
33 |