1
1
/* ----------------------------------------------------------------------------
2
2
* This file was automatically generated by SWIG (http://www.swig.org).
5
5
* This file is not intended to be easily readable and contains a number of
6
6
* coding conventions designed to improve portability and efficiency. Do not make
282
282
Flags/methods for returning states.
284
The SWIG conversion methods, as ConvertPtr, return and integer
284
The SWIG conversion methods, as ConvertPtr, return an integer
285
285
that tells if the conversion was successful or not. And if not,
286
286
an error code can be returned (see swigerrors.swg for the codes).
832
832
#include <ruby.h>
834
/* Ruby 1.9.1 has a "memoisation optimisation" when compiling with GCC which
835
* breaks using rb_intern as an lvalue, as SWIG does. We work around this
836
* issue for now by disabling this.
837
* https://sourceforge.net/tracker/?func=detail&aid=2859614&group_id=1645&atid=101645
834
843
/* Remove global macros defined in Ruby's win32.h */
990
999
/* Define custom exceptions for errors that do not map to existing Ruby
991
1000
exceptions. Note this only works for C++ since a global cannot be
992
initialized by a funtion in C. For C, fallback to rb_eRuntimeError.*/
1001
initialized by a function in C. For C, fallback to rb_eRuntimeError.*/
994
1003
SWIGINTERN VALUE
995
1004
getNullReferenceError(void) {
1136
1145
/* -----------------------------------------------------------------------------
1137
* See the LICENSE file for information on copyright, usage and redistribution
1138
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
1140
1146
* rubytracking.swg
1142
1148
* This file contains support for tracking mappings from
1334
1340
/* -----------------------------------------------------------------------------
1335
* See the LICENSE file for information on copyright, usage and redistribution
1336
* of SWIG, and the README file for authors - http://www.swig.org/release.html.
1340
1343
* This file contains the runtime support for Ruby modules
1378
1381
/* Error manipulation */
1380
1383
#define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code)
1381
#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), msg)
1384
#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), "%s", msg)
1382
1385
#define SWIG_fail goto fail
1433
1436
++swig_virtual_calls;
1434
1437
# define SWIG_RELEASE_STACK --swig_virtual_calls;
1435
1438
# define Ruby_DirectorTypeMismatchException(x) \
1436
rb_raise( rb_eTypeError, x ); return c_result;
1439
rb_raise( rb_eTypeError, "%s", x ); return c_result;
1438
1441
static unsigned int swig_virtual_calls = 0;
1525
1528
downcast methods. */
1526
1529
if (obj != Qnil) {
1527
1530
VALUE value = rb_iv_get(obj, "@__swigtype__");
1528
char* type_name = RSTRING_PTR(value);
1531
const char* type_name = RSTRING_PTR(value);
1530
1533
if (strcmp(type->name, type_name) == 0) {
1977
/*@SWIG:/usr/share/swig1.3/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
1980
/*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
1978
1981
SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
1980
1983
VALUE obj = args[0];
2036
/*@SWIG:/usr/share/swig1.3/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
2039
/*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/
2037
2040
SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
2039
2042
VALUE obj = args[0];
2315
2318
SWIGINTERN VALUE
2319
_wrap_librdf_new_hash(int argc, VALUE *argv, VALUE self) {
2320
librdf_world *arg1 = (librdf_world *) 0 ;
2321
char *arg2 = (char *) 0 ;
2327
librdf_hash *result = 0 ;
2328
VALUE vresult = Qnil;
2330
if ((argc < 2) || (argc > 2)) {
2331
rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
2333
res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_librdf_world_s, 0 | 0 );
2334
if (!SWIG_IsOK(res1)) {
2335
SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "librdf_world *","librdf_new_hash", 1, argv[0] ));
2337
arg1 = (librdf_world *)(argp1);
2338
res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2339
if (!SWIG_IsOK(res2)) {
2340
SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char const *","librdf_new_hash", 2, argv[1] ));
2342
arg2 = (char *)(buf2);
2343
result = (librdf_hash *)librdf_new_hash(arg1,(char const *)arg2);
2344
vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_librdf_hash_s, SWIG_POINTER_OWN | 0 );
2345
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2348
if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
2316
2354
_wrap_librdf_new_hash_from_string(int argc, VALUE *argv, VALUE self) {
2317
2355
librdf_world *arg1 = (librdf_world *) 0 ;
2318
2356
char *arg2 = (char *) 0 ;
8510
8548
rb_define_module_function(mRedland, "librdf_digest_update_string", _wrap_librdf_digest_update_string, -1);
8511
8549
rb_define_module_function(mRedland, "librdf_digest_final", _wrap_librdf_digest_final, -1);
8512
8550
rb_define_module_function(mRedland, "librdf_digest_to_string", _wrap_librdf_digest_to_string, -1);
8551
rb_define_module_function(mRedland, "librdf_new_hash", _wrap_librdf_new_hash, -1);
8513
8552
rb_define_module_function(mRedland, "librdf_new_hash_from_string", _wrap_librdf_new_hash_from_string, -1);
8514
8553
rb_define_module_function(mRedland, "librdf_new_hash_from_array_of_strings", _wrap_librdf_new_hash_from_array_of_strings, -1);
8515
8554
rb_define_module_function(mRedland, "librdf_hash_to_string", _wrap_librdf_hash_to_string, -1);