ruby/redland-types.i
raw| 1 | /* optional input strings - can be NULL, need special conversions */ |
| 2 | %typemap(in) const char *inStrOrNull { |
| 3 | $1 = ($input == Qnil) ? NULL : STR2CSTR($input); |
| 4 | } |
| 5 | /* returning char* or NULL, need special conversions */ |
| 6 | %typemap(out) char *{ |
| 7 | $result = ($1 == NULL) ? Qnil : rb_str_new2($1); |
| 8 | } |
| 9 |