ext/oboe_metal/src/oboe_wrap.cxx in oboe-heroku-0.9.0.1 vs ext/oboe_metal/src/oboe_wrap.cxx in oboe-heroku-0.9.7.1

- old
+ new

@@ -1,8 +1,8 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 2.0.11 + * Version 2.0.4 * * This file is not intended to be easily readable and contains a number of * coding conventions designed to improve portability and efficiency. Do not make * changes to this file unless you know what you are doing--modify the SWIG * interface file instead. @@ -420,11 +420,11 @@ } SWIGINTERNINLINE int SWIG_CheckState(int r) { return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; } #else /* no cast-rank mode */ -# define SWIG_AddCast(r) (r) +# define SWIG_AddCast # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) #endif #include <string.h> @@ -484,36 +484,47 @@ return (int)((l1 - f1) - (l2 - f2)); } /* Check type equivalence in a name list like <name1>|<name2>|... - Return 0 if equal, -1 if nb < tb, 1 if nb > tb + Return 0 if not equal, 1 if equal */ SWIGRUNTIME int -SWIG_TypeCmp(const char *nb, const char *tb) { - int equiv = 1; +SWIG_TypeEquiv(const char *nb, const char *tb) { + int equiv = 0; const char* te = tb + strlen(tb); const char* ne = nb; - while (equiv != 0 && *ne) { + while (!equiv && *ne) { for (nb = ne; *ne; ++ne) { if (*ne == '|') break; } - equiv = SWIG_TypeNameComp(nb, ne, tb, te); + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; if (*ne) ++ne; } return equiv; } /* Check type equivalence in a name list like <name1>|<name2>|... - Return 0 if not equal, 1 if equal + Return 0 if equal, -1 if nb < tb, 1 if nb > tb */ SWIGRUNTIME int -SWIG_TypeEquiv(const char *nb, const char *tb) { - return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0; +SWIG_TypeCompare(const char *nb, const char *tb) { + int equiv = 0; + const char* te = tb + strlen(tb); + const char* ne = nb; + while (!equiv && *ne) { + for (nb = ne; *ne; ++ne) { + if (*ne == '|') break; + } + equiv = (SWIG_TypeNameComp(nb, ne, tb, te) == 0) ? 1 : 0; + if (*ne) ++ne; + } + return equiv; } + /* Check the typename */ SWIGRUNTIME swig_cast_info * SWIG_TypeCheck(const char *c, swig_type_info *ty) { @@ -1385,11 +1396,11 @@ #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) /* Runtime API */ -#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule(clientdata) +#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule() #define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer) /* Error manipulation */ @@ -1539,11 +1550,11 @@ /* Check the object's type and make sure it has the correct type. It might not in cases where methods do things like downcast methods. */ if (obj != Qnil) { VALUE value = rb_iv_get(obj, "@__swigtype__"); - const char* type_name = RSTRING_PTR(value); + char* type_name = RSTRING_PTR(value); if (strcmp(type->name, type_name) == 0) { return obj; } } @@ -1721,11 +1732,11 @@ type_error: return SWIG_ERROR; } SWIGRUNTIME swig_module_info * -SWIG_Ruby_GetModule(void *SWIGUNUSEDPARM(clientdata)) +SWIG_Ruby_GetModule(void) { VALUE pointer; swig_module_info *ret = 0; VALUE verbose = rb_gv_get("VERBOSE"); @@ -1761,11 +1772,11 @@ } */ SWIGINTERN int SWIG_Ruby_isCallable( VALUE proc ) { - if ( rb_respond_to( proc, swig_call_id ) ) + if ( rb_respond_to( proc, swig_call_id ) == Qtrue ) return 1; return 0; } /* This function can be used to check the arity (number of arguments) @@ -1774,11 +1785,11 @@ which indicate a variable number of parameters at the end. */ SWIGINTERN int SWIG_Ruby_arity( VALUE proc, int minimal ) { - if ( rb_respond_to( proc, swig_arity_id ) ) + if ( rb_respond_to( proc, swig_arity_id ) == Qtrue ) { VALUE num = rb_funcall( proc, swig_arity_id, 0 ); int arity = NUM2INT(num); if ( arity < 0 && (arity+1) < -minimal ) return 1; if ( arity == minimal ) return 1; @@ -1829,11 +1840,11 @@ #define SWIG_RUBY_THREAD_BEGIN_BLOCK #define SWIG_RUBY_THREAD_END_BLOCK -#define SWIGVERSION 0x020011 +#define SWIGVERSION 0x020004 #define SWIG_VERSION SWIGVERSION #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a)) #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a)) @@ -1883,11 +1894,15 @@ SWIGINTERN int SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) { if (TYPE(obj) == T_STRING) { + #if defined(StringValuePtr) char *cstr = StringValuePtr(obj); + #else + char *cstr = STR2CSTR(obj); + #endif size_t size = RSTRING_LEN(obj) + 1; if (cptr) { if (alloc) { if (*alloc == SWIG_NEWOBJ) { *cptr = reinterpret_cast< char* >(memcpy((new char[size]), cstr, sizeof(char)*(size))); @@ -1982,11 +1997,11 @@ { return Qnil; } -/*@SWIG:/tmp/local/share/swig/2.0.11/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +/*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args) { VALUE obj = args[0]; VALUE type = TYPE(obj); long *res = (long *)(args[1]); @@ -2030,11 +2045,11 @@ -/*@SWIG:/tmp/local/share/swig/2.0.11/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ +/*@SWIG:/usr/share/swig2.0/ruby/rubyprimtypes.swg,19,%ruby_aux_method@*/ SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args) { VALUE obj = args[0]; VALUE type = TYPE(obj); double *res = (double *)(args[1]); @@ -2058,11 +2073,11 @@ } } return SWIG_TypeError; } -static swig_class SwigClassMetadata; +swig_class SwigClassMetadata; #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_Metadata_allocate(VALUE self) { #else @@ -2243,11 +2258,11 @@ fail: return Qnil; } -static swig_class SwigClassContext; +swig_class SwigClassContext; SWIGINTERN VALUE _wrap_Context_setTracingMode(int argc, VALUE *argv, VALUE self) { int arg1 ; int val1 ; @@ -2292,11 +2307,11 @@ SWIGINTERN VALUE _wrap_Context_sampleRequest(int argc, VALUE *argv, VALUE self) { std::string arg1 ; std::string arg2 ; std::string arg3 ; - bool result; + int result; VALUE vresult = Qnil; if ((argc < 3) || (argc > 3)) { rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; } @@ -2325,12 +2340,12 @@ SWIG_exception_fail(SWIG_ArgError((ptr ? res : SWIG_TypeError)), Ruby_Format_TypeError( "", "std::string","Context::sampleRequest", 3, argv[2] )); } arg3 = *ptr; if (SWIG_IsNewObj(res)) delete ptr; } - result = (bool)Context::sampleRequest(arg1,arg2,arg3); - vresult = SWIG_From_bool(static_cast< bool >(result)); + result = (int)Context::sampleRequest(arg1,arg2,arg3); + vresult = SWIG_From_int(static_cast< int >(result)); return vresult; fail: return Qnil; } @@ -2588,11 +2603,11 @@ SWIGINTERN void free_Context(Context *arg1) { delete arg1; } -static swig_class SwigClassEvent; +swig_class SwigClassEvent; SWIGINTERN void free_Event(Event *arg1) { delete arg1; } @@ -3035,11 +3050,11 @@ fail: return Qnil; } -static swig_class SwigClassReporter; +swig_class SwigClassReporter; #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_Reporter_allocate(VALUE self) { #else @@ -3222,11 +3237,11 @@ return Qnil; } -static swig_class SwigClassSslReporter; +swig_class SwigClassSslReporter; #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_SslReporter_allocate(VALUE self) { #else @@ -3398,11 +3413,11 @@ return Qnil; } -static swig_class SwigClassUdpReporter; +swig_class SwigClassUdpReporter; SWIGINTERN VALUE _wrap_new_UdpReporter__SWIG_0(int argc, VALUE *argv, VALUE self) { char *arg1 = (char *) 0 ; char *arg2 = (char *) 0 ; @@ -3651,11 +3666,11 @@ return Qnil; } -static swig_class SwigClassFileReporter; +swig_class SwigClassFileReporter; #ifdef HAVE_RB_DEFINE_ALLOC_FUNC SWIGINTERN VALUE _wrap_FileReporter_allocate(VALUE self) { #else @@ -3827,11 +3842,11 @@ return Qnil; } -static swig_class SwigClassDebugLogger; +swig_class SwigClassDebugLogger; SWIGINTERN VALUE _wrap_DebugLogger_log(int argc, VALUE *argv, VALUE self) { DebugLogger *arg1 = (DebugLogger *) 0 ; int arg2 ; @@ -3966,11 +3981,11 @@ if (alloc6 == SWIG_NEWOBJ) delete[] buf6; return Qnil; } -static swig_class SwigClassDebugLog; +swig_class SwigClassDebugLog; SWIGINTERN VALUE _wrap_DebugLog_getLevelName(int argc, VALUE *argv, VALUE self) { int arg1 ; int val1 ; @@ -4272,11 +4287,11 @@ SWIGINTERN void free_DebugLog(DebugLog *arg1) { delete arg1; } -static swig_class SwigClassConfig; +swig_class SwigClassConfig; SWIGINTERN VALUE _wrap_Config_checkVersion(int argc, VALUE *argv, VALUE self) { int arg1 ; int arg2 ; @@ -4503,10 +4518,12 @@ SWIG_InitializeModule(void *clientdata) { size_t i; swig_module_info *module_head, *iter; int found, init; + clientdata = clientdata; + /* check to see if the circular list has been setup, if not, set it up */ if (swig_module.next==0) { /* Initialize the swig_module */ swig_module.type_initial = swig_type_initial; swig_module.cast_initial = swig_cast_initial; @@ -4540,10 +4557,10 @@ /* otherwise we must add out module into the list */ swig_module.next = module_head->next; module_head->next = &swig_module; } - /* When multiple interpreters are used, a module could have already been initialized in + /* When multiple interpeters are used, a module could have already been initialized in a different interpreter, but not yet have a pointer in this interpreter. In this case, we do not want to continue adding types... everything should be set up already */ if (init == 0) return;