ext/swig_wrap.cin in ruby-vpi-8.0.0 vs ext/swig_wrap.cin in ruby-vpi-8.1.0

- old
+ new

@@ -1,29 +1,34 @@ /* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). - * Version 1.3.27 + * Version 1.3.28 * * 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. * ----------------------------------------------------------------------------- */ +#define SWIGRUBY /*********************************************************************** * * This section contains generic SWIG labels for method/variable * declarations/attributes, and other compiler dependent labels. * ************************************************************************/ /* template workaround for compilers that cannot correctly implement the C++ standard */ #ifndef SWIGTEMPLATEDISAMBIGUATOR -# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560) -# define SWIGTEMPLATEDISAMBIGUATOR template -# else -# define SWIGTEMPLATEDISAMBIGUATOR -# endif +# if defined(__SUNPRO_CC) +# if (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif #endif /* inline attribute */ #ifndef SWIGINLINE # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) @@ -33,17 +38,31 @@ # endif #endif /* attribute recognised by some compilers to avoid 'unused' warnings */ #ifndef SWIGUNUSED -# if defined(__GNUC__) || defined(__ICC) -# define SWIGUNUSED __attribute__ ((unused)) +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) # else # define SWIGUNUSED # endif #endif +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif +#endif + /* internal SWIG method */ #ifndef SWIGINTERN # define SWIGINTERN static SWIGUNUSED #endif @@ -72,129 +91,94 @@ # else # define SWIGSTDCALL # endif #endif +/*********************************************************************** + * + * This section contains generic SWIG labels for method/variable + * declarations/attributes, and other compiler dependent labels. + * + ************************************************************************/ -/* ruby.swg */ -/* Implementation : RUBY */ -#define SWIGRUBY 1 +/* template workaround for compilers that cannot correctly implement the C++ standard */ +#ifndef SWIGTEMPLATEDISAMBIGUATOR +# if defined(__SUNPRO_CC) +# if (__SUNPRO_CC <= 0x560) +# define SWIGTEMPLATEDISAMBIGUATOR template +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +# else +# define SWIGTEMPLATEDISAMBIGUATOR +# endif +#endif -#include "ruby.h" +/* inline attribute */ +#ifndef SWIGINLINE +# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__)) +# define SWIGINLINE inline +# else +# define SWIGINLINE +# endif +#endif -/* Flags for pointer conversion */ -#define SWIG_POINTER_EXCEPTION 0x1 -#define SWIG_POINTER_OWN 0x1 -#define SWIG_POINTER_DISOWN 0x2 -#define SWIG_TRACK_OBJECTS 0x4 +/* attribute recognised by some compilers to avoid 'unused' warnings */ +#ifndef SWIGUNUSED +# if defined(__GNUC__) +# if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +# elif defined(__ICC) +# define SWIGUNUSED __attribute__ ((__unused__)) +# else +# define SWIGUNUSED +# endif +#endif -#define NUM2USHRT(n) (\ - (0 <= NUM2UINT(n) && NUM2UINT(n) <= USHRT_MAX)\ - ? (unsigned short) NUM2UINT(n) \ - : (rb_raise(rb_eArgError, "integer %d out of range of `unsigned short'",\ - NUM2UINT(n)), (short)0)\ -) - -#define NUM2SHRT(n) (\ - (SHRT_MIN <= NUM2INT(n) && NUM2INT(n) <= SHRT_MAX)\ - ? (short)NUM2INT(n)\ - : (rb_raise(rb_eArgError, "integer %d out of range of `short'",\ - NUM2INT(n)), (short)0)\ -) - -/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */ -#ifndef NUM2LL -#define NUM2LL(x) NUM2LONG((x)) +#ifndef SWIGUNUSEDPARM +# ifdef __cplusplus +# define SWIGUNUSEDPARM(p) +# else +# define SWIGUNUSEDPARM(p) p SWIGUNUSED +# endif #endif -#ifndef LL2NUM -#define LL2NUM(x) INT2NUM((long) (x)) -#endif -#ifndef ULL2NUM -#define ULL2NUM(x) UINT2NUM((unsigned long) (x)) -#endif -/* Ruby 1.7 doesn't (yet) define NUM2ULL() */ -#ifndef NUM2ULL -#ifdef HAVE_LONG_LONG -#define NUM2ULL(x) rb_num2ull((x)) -#else -#define NUM2ULL(x) NUM2ULONG(x) +/* internal SWIG method */ +#ifndef SWIGINTERN +# define SWIGINTERN static SWIGUNUSED #endif -#endif -/* - * Need to be very careful about how these macros are defined, especially - * when compiling C++ code or C code with an ANSI C compiler. - * - * VALUEFUNC(f) is a macro used to typecast a C function that implements - * a Ruby method so that it can be passed as an argument to API functions - * like rb_define_method() and rb_define_singleton_method(). - * - * VOIDFUNC(f) is a macro used to typecast a C function that implements - * either the "mark" or "free" stuff for a Ruby Data object, so that it - * can be passed as an argument to API functions like Data_Wrap_Struct() - * and Data_Make_Struct(). - */ - -#ifdef __cplusplus -# ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */ -# define PROTECTFUNC(f) ((VALUE (*)()) f) -# define VALUEFUNC(f) ((VALUE (*)()) f) -# define VOIDFUNC(f) ((void (*)()) f) -# else -# ifndef ANYARGS /* These definitions should work for Ruby 1.6 */ -# define PROTECTFUNC(f) ((VALUE (*)()) f) -# define VALUEFUNC(f) ((VALUE (*)()) f) -# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f) -# else /* These definitions should work for Ruby 1.7+ */ -# define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f) -# define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f) -# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f) -# endif -# endif -#else -# define VALUEFUNC(f) (f) -# define VOIDFUNC(f) (f) +/* internal inline SWIG method */ +#ifndef SWIGINTERNINLINE +# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE #endif -typedef struct { - VALUE klass; - VALUE mImpl; - void (*mark)(void *); - void (*destroy)(void *); -} swig_class; - -/* Don't use for expressions have side effect */ -#ifndef RB_STRING_VALUE -#define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s))) +/* exporting methods for Windows DLLs */ +#ifndef SWIGEXPORT +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# if defined(STATIC_LINKED) +# define SWIGEXPORT +# else +# define SWIGEXPORT __declspec(dllexport) +# endif +# else +# define SWIGEXPORT +# endif #endif -#ifndef StringValue -#define StringValue(s) RB_STRING_VALUE(s) -#endif -#ifndef StringValuePtr -#define StringValuePtr(s) RSTRING(RB_STRING_VALUE(s))->ptr -#endif -#ifndef StringValueLen -#define StringValueLen(s) RSTRING(RB_STRING_VALUE(s))->len -#endif -#ifndef SafeStringValue -#define SafeStringValue(v) do {\ - StringValue(v);\ - rb_check_safe_str(v);\ -} while (0) -#endif -#ifndef HAVE_RB_DEFINE_ALLOC_FUNC -#define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1) -#define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new") +/* calling conventions for Windows */ +#ifndef SWIGSTDCALL +# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__) +# define SWIGSTDCALL __stdcall +# else +# define SWIGSTDCALL +# endif #endif -/* Contract support */ - -#define SWIG_contract_assert(expr, msg) if (!(expr)) { rb_raise(rb_eRuntimeError, (char *) msg ); } else - - /*********************************************************************** * swigrun.swg * * This file contains generic CAPI SWIG runtime support for pointer * type checking. @@ -229,10 +213,151 @@ #ifndef SWIGRUNTIMEINLINE # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE #endif +/* Generic buffer size */ +#ifndef SWIG_BUFFER_SIZE +# define SWIG_BUFFER_SIZE 1024 +#endif + +/* Flags for pointer conversions */ +#define SWIG_POINTER_DISOWN 0x1 + +/* Flags for new pointer objects */ +#define SWIG_POINTER_OWN 0x1 + + +/* + Flags/methods for returning states. + + The swig conversion methods, as ConvertPtr, return and integer + that tells if the conversion was successful or not. And if not, + an error code can be returned (see swigerrors.swg for the codes). + + Use the following macros/flags to set or process the returning + states. + + In old swig versions, you usually write code as: + + if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) { + // success code + } else { + //fail code + } + + Now you can be more explicit as: + + int res = SWIG_ConvertPtr(obj,vptr,ty.flags); + if (SWIG_IsOK(res)) { + // success code + } else { + // fail code + } + + that seems to be the same, but now you can also do + + Type *ptr; + int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags); + if (SWIG_IsOK(res)) { + // success code + if (SWIG_IsNewObj(res) { + ... + delete *ptr; + } else { + ... + } + } else { + // fail code + } + + I.e., now SWIG_ConvertPtr can return new objects and you can + identify the case and take care of the deallocation. Of course that + requires also to SWIG_ConvertPtr to return new result values, as + + int SWIG_ConvertPtr(obj, ptr,...) { + if (<obj is ok>) { + if (<need new object>) { + *ptr = <ptr to new allocated object>; + return SWIG_NEWOBJ; + } else { + *ptr = <ptr to old object>; + return SWIG_OLDOBJ; + } + } else { + return SWIG_BADOBJ; + } + } + + Of course, returning the plain '0(success)/-1(fail)' still works, but you can be + more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the + swig errors code. + + Finally, if the SWIG_CASTRANK_MODE is enabled, the result code + allows to return the 'cast rank', for example, if you have this + + int food(double) + int fooi(int); + + and you call + + food(1) // cast rank '1' (1 -> 1.0) + fooi(1) // cast rank '0' + + just use the SWIG_AddCast()/SWIG_CheckState() + + + */ +#define SWIG_OK (0) +#define SWIG_ERROR (-1) +#define SWIG_IsOK(r) (r >= 0) +#define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError) + +/* The CastRankLimit says how many bits are used for the cast rank */ +#define SWIG_CASTRANKLIMIT (1 << 8) +/* The NewMask denotes the object was created (using new/malloc) */ +#define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1) +/* The TmpMask is for in/out typemaps that use temporal objects */ +#define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1) +/* Simple returning values */ +#define SWIG_BADOBJ (SWIG_ERROR) +#define SWIG_OLDOBJ (SWIG_OK) +#define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK) +#define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK) +/* Check, add and del mask methods */ +#define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r) +#define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r) +#define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK)) +#define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r) +#define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r) +#define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK)) + + +/* Cast-Rank Mode */ +#if defined(SWIG_CASTRANK_MODE) +# ifndef SWIG_TypeRank +# define SWIG_TypeRank unsigned long +# endif +# ifndef SWIG_MAXCASTRANK /* Default cast allowed */ +# define SWIG_MAXCASTRANK (2) +# endif +# define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1) +# define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK) +SWIGINTERNINLINE int SWIG_AddCast(int r) { + return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r; +} +SWIGINTERNINLINE int SWIG_CheckState(int r) { + return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0; +} +#else /* no cast-rank mode */ +# define SWIG_AddCast +# define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0) +#endif + + + + #include <string.h> #ifdef __cplusplus extern "C" { #endif @@ -245,10 +370,11 @@ const char *name; /* mangled name of this type */ const char *str; /* human readable name of this type */ swig_dycast_func dcast; /* dynamic cast function down a hierarchy */ struct swig_cast_info *cast; /* linked list of types that can cast into this type */ void *clientdata; /* language specific type data */ + int owndata; /* flag if the structure owns the clientdata */ } swig_type_info; /* Structure to store a type and conversion function used for casting */ typedef struct swig_cast_info { swig_type_info *type; /* pointer to type that is equivalent to this type */ @@ -267,11 +393,10 @@ swig_type_info **type_initial; /* Array of initially generated type structures */ swig_cast_info **cast_initial; /* Array of initially generated casting structures */ void *clientdata; /* Language specific module data */ } swig_module_info; - /* Compare two type names skipping the space characters, therefore "char*" == "char *" and "Class<int>" == "Class<int >", etc. Return 0 when the two name types are equivalent, as in @@ -401,10 +526,11 @@ SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the type, separated by vertical-bar characters. We choose to print the last name, as it is often (?) the most specific. */ + if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; const char *s; for (s = type->str; *s; s++) if (*s == '|') last_name = s+1; @@ -431,11 +557,16 @@ } } cast = cast->next; } } - +SWIGRUNTIME void +SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) { + SWIG_TypeClientData(ti, clientdata); + ti->owndata = 1; +} + /* Search for a swig_type_info structure only by mangled name Search is a O(log #types) We start searching at module start, and finish searching when start == end. @@ -511,11 +642,10 @@ /* neither found a match */ return 0; } - /* Pack binary data into a string */ SWIGRUNTIME char * SWIG_PackData(char *c, void *ptr, size_t sz) { @@ -537,11 +667,11 @@ SWIG_UnpackData(const char *c, void *ptr, size_t sz) { register unsigned char *u = (unsigned char *) ptr; register const unsigned char *eu = u + sz; for (; u != eu; ++u) { register char d = *(c++); - register unsigned char uu = 0; + register unsigned char uu; if ((d >= '0') && (d <= '9')) uu = ((d - '0') << 4); else if ((d >= 'a') && (d <= 'f')) uu = ((d - ('a'-10)) << 4); else @@ -615,330 +745,654 @@ #ifdef __cplusplus } #endif -/*********************************************************************** - * rubytracking.swg - * - * This file contains support for tracking mappings from - * Ruby objects to C++ objects. This functionality is needed - * to implement mark functions for Ruby's mark and sweep - * garbage collector. - ************************************************************************/ - -/* Global Ruby hash table to store Trackings from C/C++ - structs to Ruby Objects. */ -static VALUE swig_ruby_trackings; - -/* Setup a Ruby hash table to store Trackings */ -static void SWIG_RubyInitializeTrackings() { - /* Create a ruby hash table to store Trackings from C++ - objects to Ruby objects. Also make sure to tell - the garabage collector about the hash table. */ - swig_ruby_trackings = rb_hash_new(); - rb_gc_register_address(&swig_ruby_trackings); -} - -/* Get a Ruby number to reference a pointer */ -static VALUE SWIG_RubyPtrToReference(void* ptr) { - /* We cast the pointer to an unsigned long - and then store a reference to it using - a Ruby number object. */ - - /* Convert the pointer to a Ruby number */ - unsigned long value = (unsigned long) ptr; - return LONG2NUM(value); -} - -/* Get a Ruby number to reference an object */ -static VALUE SWIG_RubyObjectToReference(VALUE object) { - /* We cast the object to an unsigned long - and then store a reference to it using - a Ruby number object. */ - - /* Convert the Object to a Ruby number */ - unsigned long value = (unsigned long) object; - return LONG2NUM(value); -} - -/* Get a Ruby object from a previously stored reference */ -static VALUE SWIG_RubyReferenceToObject(VALUE reference) { - /* The provided Ruby number object is a reference - to the Ruby object we want.*/ - - /* First convert the Ruby number to a C number */ - unsigned long value = NUM2LONG(reference); - return (VALUE) value; -} - -/* Add a Tracking from a C/C++ struct to a Ruby object */ -static void SWIG_RubyAddTracking(void* ptr, VALUE object) { - /* In a Ruby hash table we store the pointer and - the associated Ruby object. The trick here is - that we cannot store the Ruby object directly - if - we do then it cannot be garbage collected. So - instead we typecast it as a unsigned long and - convert it to a Ruby number object.*/ - - /* Get a reference to the pointer as a Ruby number */ - VALUE key = SWIG_RubyPtrToReference(ptr); - - /* Get a reference to the Ruby object as a Ruby number */ - VALUE value = SWIG_RubyObjectToReference(object); - - /* Store the mapping to the global hash table. */ - rb_hash_aset(swig_ruby_trackings, key, value); -} - -/* Get the Ruby object that owns the specified C/C++ struct */ -static VALUE SWIG_RubyInstanceFor(void* ptr) { - /* Get a reference to the pointer as a Ruby number */ - VALUE key = SWIG_RubyPtrToReference(ptr); - - /* Now lookup the value stored in the global hash table */ - VALUE value = rb_hash_aref(swig_ruby_trackings, key); - - if (value == Qnil) { - /* No object exists - return nil. */ - return Qnil; - } - else { - /* Convert this value to Ruby object */ - return SWIG_RubyReferenceToObject(value); - } +/* Errors in SWIG */ +#define SWIG_UnknownError -1 +#define SWIG_IOError -2 +#define SWIG_RuntimeError -3 +#define SWIG_IndexError -4 +#define SWIG_TypeError -5 +#define SWIG_DivisionByZero -6 +#define SWIG_OverflowError -7 +#define SWIG_SyntaxError -8 +#define SWIG_ValueError -9 +#define SWIG_SystemError -10 +#define SWIG_AttributeError -11 +#define SWIG_MemoryError -12 +#define SWIG_NullReferenceError -13 + + + +#include <ruby.h> + +/* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */ +#ifndef NUM2LL +#define NUM2LL(x) NUM2LONG((x)) +#endif +#ifndef LL2NUM +#define LL2NUM(x) INT2NUM((long) (x)) +#endif +#ifndef ULL2NUM +#define ULL2NUM(x) UINT2NUM((unsigned long) (x)) +#endif + +/* Ruby 1.7 doesn't (yet) define NUM2ULL() */ +#ifndef NUM2ULL +#ifdef HAVE_LONG_LONG +#define NUM2ULL(x) rb_num2ull((x)) +#else +#define NUM2ULL(x) NUM2ULONG(x) +#endif +#endif + +/* + * Need to be very careful about how these macros are defined, especially + * when compiling C++ code or C code with an ANSI C compiler. + * + * VALUEFUNC(f) is a macro used to typecast a C function that implements + * a Ruby method so that it can be passed as an argument to API functions + * like rb_define_method() and rb_define_singleton_method(). + * + * VOIDFUNC(f) is a macro used to typecast a C function that implements + * either the "mark" or "free" stuff for a Ruby Data object, so that it + * can be passed as an argument to API functions like Data_Wrap_Struct() + * and Data_Make_Struct(). + */ + +#ifdef __cplusplus +# ifndef RUBY_METHOD_FUNC /* These definitions should work for Ruby 1.4.6 */ +# define PROTECTFUNC(f) ((VALUE (*)()) f) +# define VALUEFUNC(f) ((VALUE (*)()) f) +# define VOIDFUNC(f) ((void (*)()) f) +# else +# ifndef ANYARGS /* These definitions should work for Ruby 1.6 */ +# define PROTECTFUNC(f) ((VALUE (*)()) f) +# define VALUEFUNC(f) ((VALUE (*)()) f) +# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f) +# else /* These definitions should work for Ruby 1.7+ */ +# define PROTECTFUNC(f) ((VALUE (*)(VALUE)) f) +# define VALUEFUNC(f) ((VALUE (*)(ANYARGS)) f) +# define VOIDFUNC(f) ((RUBY_DATA_FUNC) f) +# endif +# endif +#else +# define VALUEFUNC(f) (f) +# define VOIDFUNC(f) (f) +#endif + +/* Don't use for expressions have side effect */ +#ifndef RB_STRING_VALUE +#define RB_STRING_VALUE(s) (TYPE(s) == T_STRING ? (s) : (*(volatile VALUE *)&(s) = rb_str_to_str(s))) +#endif +#ifndef StringValue +#define StringValue(s) RB_STRING_VALUE(s) +#endif +#ifndef StringValuePtr +#define StringValuePtr(s) RSTRING(RB_STRING_VALUE(s))->ptr +#endif +#ifndef StringValueLen +#define StringValueLen(s) RSTRING(RB_STRING_VALUE(s))->len +#endif +#ifndef SafeStringValue +#define SafeStringValue(v) do {\ + StringValue(v);\ + rb_check_safe_str(v);\ +} while (0) +#endif + +#ifndef HAVE_RB_DEFINE_ALLOC_FUNC +#define rb_define_alloc_func(klass, func) rb_define_singleton_method((klass), "new", VALUEFUNC((func)), -1) +#define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new") +#endif + + +/* ----------------------------------------------------------------------------- + * error manipulation + * ----------------------------------------------------------------------------- */ + + +/* Define some additional error types */ +#define SWIG_ObjectPreviouslyDeletedError -100 + + +/* Define custom exceptions for errors that do not map to existing Ruby + exceptions. Note this only works for C++ since a global cannot be + initialized by a funtion in C. For C, fallback to rb_eRuntimeError.*/ + +SWIGINTERN VALUE +getNullReferenceError(void) { + static int init = 0; + static VALUE rb_eNullReferenceError ; + if (!init) { + init = 1; + rb_eNullReferenceError = rb_define_class("NullReferenceError", rb_eRuntimeError); + } + return rb_eNullReferenceError; +} + +SWIGINTERN VALUE +getObjectPreviouslyDeletedError(void) { + static int init = 0; + static VALUE rb_eObjectPreviouslyDeleted ; + if (!init) { + init = 1; + rb_eObjectPreviouslyDeleted = rb_define_class("ObjectPreviouslyDeleted", rb_eRuntimeError); + } + return rb_eObjectPreviouslyDeleted; +} + + +SWIGINTERN VALUE +SWIG_Ruby_ErrorType(int SWIG_code) { + VALUE type; + switch (SWIG_code) { + case SWIG_MemoryError: + type = rb_eNoMemError; + break; + case SWIG_IOError: + type = rb_eIOError; + break; + case SWIG_RuntimeError: + type = rb_eRuntimeError; + break; + case SWIG_IndexError: + type = rb_eIndexError; + break; + case SWIG_TypeError: + type = rb_eTypeError; + break; + case SWIG_DivisionByZero: + type = rb_eZeroDivError; + break; + case SWIG_OverflowError: + type = rb_eRangeError; + break; + case SWIG_SyntaxError: + type = rb_eSyntaxError; + break; + case SWIG_ValueError: + type = rb_eArgError; + break; + case SWIG_SystemError: + type = rb_eFatal; + break; + case SWIG_AttributeError: + type = rb_eRuntimeError; + break; + case SWIG_NullReferenceError: + type = getNullReferenceError(); + break; + case SWIG_ObjectPreviouslyDeletedError: + type = getObjectPreviouslyDeletedError(); + break; + case SWIG_UnknownError: + type = rb_eRuntimeError; + break; + default: + type = rb_eRuntimeError; + } + return type; } - -/* Remove a Tracking from a C/C++ struct to a Ruby object */ -static void SWIG_RubyRemoveTracking(void* ptr) { - /* Get a reference to the pointer as a Ruby number */ - VALUE key = SWIG_RubyPtrToReference(ptr); - /* Define delete method - in C++ this could be marked as - static but unfortunately not in C. */ - VALUE delete_function = rb_intern("delete"); - /* Delete the object from the hash table by calling Ruby's - do this we need to call the Hash.delete method.*/ - rb_funcall(swig_ruby_trackings, delete_function, 1, key); -} + + +/*********************************************************************** + * rubytracking.swg + * + * This file contains support for tracking mappings from + * Ruby objects to C++ objects. This functionality is needed + * to implement mark functions for Ruby's mark and sweep + * garbage collector. + ************************************************************************/ + + +#ifdef __cplusplus +extern "C" { +#endif + + +/* Global Ruby hash table to store Trackings from C/C++ + structs to Ruby Objects. */ +static VALUE swig_ruby_trackings; -/* This is a helper method that unlinks a Ruby object from its - underlying C++ object. This is needed if the lifetime of the - Ruby object is longer than the C++ object */ -static void SWIG_RubyUnlinkObjects(void* ptr) { - VALUE object = SWIG_RubyInstanceFor(ptr); - - if (object != Qnil) { - DATA_PTR(object) = 0; - } -} +/* Global variable that stores a reference to the ruby + hash table delete function. */ +static ID swig_ruby_hash_delete = 0; -/* Common SWIG API */ -#define SWIG_ConvertPtr(obj, pp, type, flags) \ - SWIG_Ruby_ConvertPtr(obj, pp, type, flags) -#define SWIG_NewPointerObj(p, type, flags) \ - SWIG_Ruby_NewPointerObj(p, type, flags) -#define SWIG_MustGetPtr(p, type, argnum, flags) \ - SWIG_Ruby_MustGetPtr(p, type, argnum, flags) -#define SWIG_GetModule(clientdata) \ - SWIG_Ruby_GetModule() -#define SWIG_SetModule(clientdata, pointer) \ - SWIG_Ruby_SetModule(pointer) +/* Setup a Ruby hash table to store Trackings */ +SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) { + /* Create a ruby hash table to store Trackings from C++ + objects to Ruby objects. Also make sure to tell + the garabage collector about the hash table. */ + swig_ruby_trackings = rb_hash_new(); + rb_gc_register_address(&swig_ruby_trackings); + + /* Now store a reference to the hash table delete function + so that we only have to look it up once.*/ + swig_ruby_hash_delete = rb_intern("delete"); +} +/* Get a Ruby number to reference a pointer */ +SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) { + /* We cast the pointer to an unsigned long + and then store a reference to it using + a Ruby number object. */ + + /* Convert the pointer to a Ruby number */ + unsigned long value = (unsigned long) ptr; + return LONG2NUM(value); +} + +/* Get a Ruby number to reference an object */ +SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) { + /* We cast the object to an unsigned long + and then store a reference to it using + a Ruby number object. */ + + /* Convert the Object to a Ruby number */ + unsigned long value = (unsigned long) object; + return LONG2NUM(value); +} + +/* Get a Ruby object from a previously stored reference */ +SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) { + /* The provided Ruby number object is a reference + to the Ruby object we want.*/ + + /* First convert the Ruby number to a C number */ + unsigned long value = NUM2LONG(reference); + return (VALUE) value; +} + +/* Add a Tracking from a C/C++ struct to a Ruby object */ +SWIGRUNTIME void SWIG_RubyAddTracking(void* ptr, VALUE object) { + /* In a Ruby hash table we store the pointer and + the associated Ruby object. The trick here is + that we cannot store the Ruby object directly - if + we do then it cannot be garbage collected. So + instead we typecast it as a unsigned long and + convert it to a Ruby number object.*/ + + /* Get a reference to the pointer as a Ruby number */ + VALUE key = SWIG_RubyPtrToReference(ptr); + + /* Get a reference to the Ruby object as a Ruby number */ + VALUE value = SWIG_RubyObjectToReference(object); + + /* Store the mapping to the global hash table. */ + rb_hash_aset(swig_ruby_trackings, key, value); +} + +/* Get the Ruby object that owns the specified C/C++ struct */ +SWIGRUNTIME VALUE SWIG_RubyInstanceFor(void* ptr) { + /* Get a reference to the pointer as a Ruby number */ + VALUE key = SWIG_RubyPtrToReference(ptr); + + /* Now lookup the value stored in the global hash table */ + VALUE value = rb_hash_aref(swig_ruby_trackings, key); + + if (value == Qnil) { + /* No object exists - return nil. */ + return Qnil; + } + else { + /* Convert this value to Ruby object */ + return SWIG_RubyReferenceToObject(value); + } +} + +/* Remove a Tracking from a C/C++ struct to a Ruby object. It + is very important to remove objects once they are destroyed + since the same memory address may be reused later to create + a new object. */ +SWIGRUNTIME void SWIG_RubyRemoveTracking(void* ptr) { + /* Get a reference to the pointer as a Ruby number */ + VALUE key = SWIG_RubyPtrToReference(ptr); + + /* Delete the object from the hash table by calling Ruby's + do this we need to call the Hash.delete method.*/ + rb_funcall(swig_ruby_trackings, swig_ruby_hash_delete, 1, key); +} + +/* This is a helper method that unlinks a Ruby object from its + underlying C++ object. This is needed if the lifetime of the + Ruby object is longer than the C++ object */ +SWIGRUNTIME void SWIG_RubyUnlinkObjects(void* ptr) { + VALUE object = SWIG_RubyInstanceFor(ptr); + + if (object != Qnil) { + DATA_PTR(object) = 0; + } +} + + +#ifdef __cplusplus +} +#endif + +/* ----------------------------------------------------------------------------- + * Ruby API portion that goes into the runtime + * ----------------------------------------------------------------------------- */ + +#ifdef __cplusplus +extern "C" { +#endif + +SWIGINTERN VALUE +SWIG_Ruby_AppendOutput(VALUE target, VALUE o) { + if (NIL_P(target)) { + target = o; + } else { + if (TYPE(target) != T_ARRAY) { + VALUE o2 = target; + target = rb_ary_new(); + rb_ary_push(target, o2); + } + rb_ary_push(target, o); + } + return target; +} + +#ifdef __cplusplus +} +#endif + + +/*********************************************************************** + * rubyrun.swg + * + * This file contains the runtime support for Ruby modules + * and includes code for managing global variables and pointer + * type checking. + * + ************************************************************************/ + +/* For backward compatibility only */ +#define SWIG_POINTER_EXCEPTION 0 + +/* for raw pointers */ +#define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, 0) +#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Ruby_ConvertPtrAndOwn(obj, pptr, type, flags, own) +#define SWIG_NewPointerObj(ptr, type, flags) SWIG_Ruby_NewPointerObj(ptr, type, flags) +#define SWIG_AcquirePtr(ptr, own) SWIG_Ruby_AcquirePtr(ptr, own) +#define swig_owntype ruby_owntype + +/* for raw packed data */ +#define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags) +#define SWIG_NewPackedObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) + +/* for class or struct pointers */ +#define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags) +#define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags) + +/* for C or C++ function pointers */ +#define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_ConvertPtr(obj, pptr, type, 0) +#define SWIG_NewFunctionPtrObj(ptr, type) SWIG_NewPointerObj(ptr, type, 0) + +/* for C++ member pointers, ie, member methods */ +#define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty) +#define SWIG_NewMemberObj(ptr, sz, type) SWIG_Ruby_NewPackedObj(ptr, sz, type) + + +/* Runtime API */ + +#define SWIG_GetModule(clientdata) SWIG_Ruby_GetModule() +#define SWIG_SetModule(clientdata, pointer) SWIG_Ruby_SetModule(pointer) + + +/* Error manipulation */ + +#define SWIG_ErrorType(code) SWIG_Ruby_ErrorType(code) +#define SWIG_Error(code, msg) rb_raise(SWIG_Ruby_ErrorType(code), msg) +#define SWIG_fail goto fail + + /* Ruby-specific SWIG API */ -#define SWIG_InitRuntime() \ - SWIG_Ruby_InitRuntime() -#define SWIG_define_class(ty) \ - SWIG_Ruby_define_class(ty) -#define SWIG_NewClassInstance(value, ty) \ - SWIG_Ruby_NewClassInstance(value, ty) -#define SWIG_MangleStr(value) \ - SWIG_Ruby_MangleStr(value) -#define SWIG_CheckConvert(value, ty) \ - SWIG_Ruby_CheckConvert(value, ty) -#define SWIG_NewPackedObj(ptr, sz, ty) \ - SWIG_Ruby_NewPackedObj(ptr, sz, ty) -#define SWIG_ConvertPacked(obj, ptr, sz, ty, flags) \ - SWIG_Ruby_ConvertPacked(obj, ptr, sz, ty, flags) +#define SWIG_InitRuntime() SWIG_Ruby_InitRuntime() +#define SWIG_define_class(ty) SWIG_Ruby_define_class(ty) +#define SWIG_NewClassInstance(value, ty) SWIG_Ruby_NewClassInstance(value, ty) +#define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value) +#define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty) -/* rubydef.swg */ + +/* ----------------------------------------------------------------------------- + * pointers/data manipulation + * ----------------------------------------------------------------------------- */ + #ifdef __cplusplus extern "C" { +#if 0 +} /* cc-mode */ #endif +#endif +typedef struct { + VALUE klass; + VALUE mImpl; + void (*mark)(void *); + void (*destroy)(void *); + int trackObjects; +} swig_class; + + static VALUE _mSWIG = Qnil; static VALUE _cSWIG_Pointer = Qnil; static VALUE swig_runtime_data_type_pointer = Qnil; +SWIGRUNTIME VALUE +getExceptionClass(void) { + static int init = 0; + static VALUE rubyExceptionClass ; + if (!init) { + init = 1; + rubyExceptionClass = rb_const_get(_mSWIG, rb_intern("Exception")); + } + return rubyExceptionClass; +} + +/* This code checks to see if the Ruby object being raised as part + of an exception inherits from the Ruby class Exception. If so, + the object is simply returned. If not, then a new Ruby exception + object is created and that will be returned to Ruby.*/ +SWIGRUNTIME VALUE +SWIG_Ruby_ExceptionType(swig_type_info *desc, VALUE obj) { + VALUE exceptionClass = getExceptionClass(); + if (rb_obj_is_kind_of(obj, exceptionClass)) { + return obj; + } else { + return rb_exc_new3(rb_eRuntimeError, rb_obj_as_string(obj)); + } +} + /* Initialize Ruby runtime support */ -static void +SWIGRUNTIME void SWIG_Ruby_InitRuntime(void) { - if (_mSWIG == Qnil) { - _mSWIG = rb_define_module("SWIG"); - } + if (_mSWIG == Qnil) { + _mSWIG = rb_define_module("SWIG"); + } } /* Define Ruby class for C type */ -static void +SWIGRUNTIME void SWIG_Ruby_define_class(swig_type_info *type) { - VALUE klass; - char *klass_name = (char *) malloc(4 + strlen(type->name) + 1); - sprintf(klass_name, "TYPE%s", type->name); - if (NIL_P(_cSWIG_Pointer)) { - _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject); - rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new"); - } - klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer); - free((void *) klass_name); + VALUE klass; + char *klass_name = (char *) malloc(4 + strlen(type->name) + 1); + sprintf(klass_name, "TYPE%s", type->name); + if (NIL_P(_cSWIG_Pointer)) { + _cSWIG_Pointer = rb_define_class_under(_mSWIG, "Pointer", rb_cObject); + rb_undef_method(CLASS_OF(_cSWIG_Pointer), "new"); + } + klass = rb_define_class_under(_mSWIG, klass_name, _cSWIG_Pointer); + free((void *) klass_name); } /* Create a new pointer object */ -static VALUE +SWIGRUNTIME VALUE SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags) { - int own = flags & SWIG_POINTER_OWN; - int track = flags & SWIG_TRACK_OBJECTS; - - char *klass_name; - swig_class *sklass; - VALUE klass; - VALUE obj; - - if (!ptr) - return Qnil; - - /* Have we already wrapped this pointer? */ - if (track) { - obj = SWIG_RubyInstanceFor(ptr); - if (obj != Qnil) { - return obj; - } - } + int own = flags & SWIG_POINTER_OWN; + + char *klass_name; + swig_class *sklass; + VALUE klass; + VALUE obj; + + if (!ptr) + return Qnil; + + if (type->clientdata) { + sklass = (swig_class *) type->clientdata; - if (type->clientdata) { - sklass = (swig_class *) type->clientdata; - obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), (own ? VOIDFUNC(sklass->destroy) : 0), ptr); - } else { - klass_name = (char *) malloc(4 + strlen(type->name) + 1); - sprintf(klass_name, "TYPE%s", type->name); - klass = rb_const_get(_mSWIG, rb_intern(klass_name)); - free((void *) klass_name); - obj = Data_Wrap_Struct(klass, 0, 0, ptr); + /* Are we tracking this class and have we already returned this Ruby object? */ + if (sklass->trackObjects) { + obj = SWIG_RubyInstanceFor(ptr); + if (obj != Qnil) { + return obj; + } } - rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name)); - - /* Keep track of this object if necessary */ - if (track) { - SWIG_RubyAddTracking(ptr, obj); + + /* Create a new Ruby object */ + obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), (own ? VOIDFUNC(sklass->destroy) : 0), ptr); + + /* If tracking is on for this class then track this object. */ + if (sklass->trackObjects) { + SWIG_RubyAddTracking(ptr, obj); } - - return obj; + } else { + klass_name = (char *) malloc(4 + strlen(type->name) + 1); + sprintf(klass_name, "TYPE%s", type->name); + klass = rb_const_get(_mSWIG, rb_intern(klass_name)); + free((void *) klass_name); + obj = Data_Wrap_Struct(klass, 0, 0, ptr); + } + rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name)); + + return obj; } /* Create a new class instance (always owned) */ -static VALUE +SWIGRUNTIME VALUE SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type) { - VALUE obj; - swig_class *sklass = (swig_class *) type->clientdata; - obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0); - rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name)); - return obj; + VALUE obj; + swig_class *sklass = (swig_class *) type->clientdata; + obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0); + rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name)); + return obj; } /* Get type mangle from class name */ -static SWIGINLINE char * +SWIGRUNTIMEINLINE char * SWIG_Ruby_MangleStr(VALUE obj) { VALUE stype = rb_iv_get(obj, "__swigtype__"); return StringValuePtr(stype); } +/* Acquire a pointer value */ +typedef void (*ruby_owntype)(void*); + +SWIGRUNTIME ruby_owntype +SWIG_Ruby_AcquirePtr(VALUE obj, ruby_owntype own) { + if (obj) { + ruby_owntype oldown = RDATA(obj)->dfree; + RDATA(obj)->dfree = own; + return oldown; + } else { + return 0; + } +} + /* Convert a pointer value */ -static int -SWIG_Ruby_ConvertPtr(VALUE obj, void **ptr, swig_type_info *ty, int flags) +SWIGRUNTIME int +SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags, ruby_owntype *own) { char *c; swig_cast_info *tc; + void *vptr = 0; /* Grab the pointer */ if (NIL_P(obj)) { *ptr = 0; - return 0; + return SWIG_OK; } else { - Data_Get_Struct(obj, void, *ptr); + if (TYPE(obj) != T_DATA) { + return SWIG_ERROR; + } + Data_Get_Struct(obj, void, vptr); } + if (own) *own = RDATA(obj)->dfree; + /* Check to see if the input object is giving up ownership of the underlying C struct or C++ object. If so then we need to reset the destructor since the Ruby object no longer owns the underlying C++ object.*/ if (flags & SWIG_POINTER_DISOWN) { - if (flags & SWIG_TRACK_OBJECTS) { - /* We are tracking objects. Thus we change the destructor - * to SWIG_RubyRemoveTracking. This allows us to - * remove the mapping from the C++ to Ruby object - * when the Ruby object is garbage collected. If we don't - * do this, then it is possible we will return a reference - * to a Ruby object that no longer exists thereby crashing Ruby. */ - RDATA(obj)->dfree = SWIG_RubyRemoveTracking; - } else { + /* Is tracking on for this class? */ + int track = 0; + if (ty && ty->clientdata) { + swig_class *sklass = (swig_class *) ty->clientdata; + track = sklass->trackObjects; + } + + if (track) { + /* We are tracking objects for this class. Thus we change the destructor + * to SWIG_RubyRemoveTracking. This allows us to + * remove the mapping from the C++ to Ruby object + * when the Ruby object is garbage collected. If we don't + * do this, then it is possible we will return a reference + * to a Ruby object that no longer exists thereby crashing Ruby. */ + RDATA(obj)->dfree = SWIG_RubyRemoveTracking; + } else { RDATA(obj)->dfree = 0; } } /* Do type-checking if type info was provided */ if (ty) { if (ty->clientdata) { - if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) { - if (*ptr == 0) - rb_raise(rb_eRuntimeError, "This %s already released", ty->str); - return 0; + if (rb_obj_is_kind_of(obj, ((swig_class *) (ty->clientdata))->klass)) { + if (vptr == 0) { + /* The object has already been deleted */ + return SWIG_ObjectPreviouslyDeletedError; } + *ptr = vptr; + return SWIG_OK; + } } if ((c = SWIG_MangleStr(obj)) == NULL) { - if (flags & SWIG_POINTER_EXCEPTION) - rb_raise(rb_eTypeError, "Expected %s", ty->str); - else - return -1; + return SWIG_ERROR; } tc = SWIG_TypeCheck(c, ty); if (!tc) { - if (flags & SWIG_POINTER_EXCEPTION) - rb_raise(rb_eTypeError, "Expected %s", ty->str); - else - return -1; + return SWIG_ERROR; } - *ptr = SWIG_TypeCast(tc, *ptr); + *ptr = SWIG_TypeCast(tc, vptr); + } else { + *ptr = vptr; } - return 0; + + return SWIG_OK; } -/* Convert a pointer value, signal an exception on a type mismatch */ -static SWIGINLINE void * -SWIG_Ruby_MustGetPtr(VALUE obj, swig_type_info *ty, int argnum, int flags) -{ - void *result; - SWIG_ConvertPtr(obj, &result, ty, flags | SWIG_POINTER_EXCEPTION); - return result; -} - /* Check convert */ -static SWIGINLINE int +SWIGRUNTIMEINLINE int SWIG_Ruby_CheckConvert(VALUE obj, swig_type_info *ty) { char *c = SWIG_MangleStr(obj); - if (!c) - return 0; + if (!c) return 0; return SWIG_TypeCheck(c,ty) != 0; } -static VALUE +SWIGRUNTIME VALUE SWIG_Ruby_NewPackedObj(void *ptr, int sz, swig_type_info *type) { char result[1024]; char *r = result; if ((2*sz + 1 + strlen(type->name)) > 1000) return 0; *(r++) = '_'; @@ -946,12 +1400,12 @@ strcpy(r, type->name); return rb_str_new2(result); } /* Convert a packed value value */ -static void -SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty, int flags) { +SWIGRUNTIME int +SWIG_Ruby_ConvertPacked(VALUE obj, void *ptr, int sz, swig_type_info *ty) { swig_cast_info *tc; const char *c; if (TYPE(obj) != T_STRING) goto type_error; c = StringValuePtr(obj); @@ -961,49 +1415,62 @@ c = SWIG_UnpackData(c, ptr, sz); if (ty) { tc = SWIG_TypeCheck(c, ty); if (!tc) goto type_error; } - return; + return SWIG_OK; -type_error: - - if (flags) { - if (ty) { - rb_raise(rb_eTypeError, "Type error. Expected %s", ty->name); - } else { - rb_raise(rb_eTypeError, "Expected a pointer"); - } - } + type_error: + return SWIG_ERROR; } -static swig_module_info *SWIG_Ruby_GetModule() { - VALUE pointer; - swig_module_info *ret = 0; +SWIGRUNTIME swig_module_info * +SWIG_Ruby_GetModule(void) +{ + VALUE pointer; + swig_module_info *ret = 0; + VALUE verbose = rb_gv_get("VERBOSE"); - /* first check if pointer already created */ - pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME); - if (pointer != Qnil) { - Data_Get_Struct(pointer, swig_module_info, ret); - } - return ret; + /* temporarily disable warnings, since the pointer check causes warnings with 'ruby -w' */ + rb_gv_set("VERBOSE", Qfalse); + + /* first check if pointer already created */ + pointer = rb_gv_get("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME); + if (pointer != Qnil) { + Data_Get_Struct(pointer, swig_module_info, ret); + } + + /* reinstate warnings */ + rb_gv_set("VERBOSE", verbose); + return ret; } -static void SWIG_Ruby_SetModule(swig_module_info *pointer) { - /* register a new class */ - VALUE cl = rb_define_class("swig_runtime_data", rb_cObject); - /* create and store the structure pointer to a global variable */ - swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer); - rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer); +SWIGRUNTIME void +SWIG_Ruby_SetModule(swig_module_info *pointer) +{ + /* register a new class */ + VALUE cl = rb_define_class("swig_runtime_data", rb_cObject); + /* create and store the structure pointer to a global variable */ + swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, pointer); + rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer); } #ifdef __cplusplus +#if 0 +{ /* cc-mode */ +#endif } #endif +#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) + +#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else + + + /* -------- TYPES TABLE (BEGIN) -------- */ #define SWIGTYPE_p_char swig_types[0] #define SWIGTYPE_p_f_p_char__int swig_types[1] #define SWIGTYPE_p_f_p_struct_t_cb_data__int swig_types[2] @@ -1021,35 +1488,200 @@ #define SWIGTYPE_p_t_vpi_value swig_types[14] #define SWIGTYPE_p_t_vpi_vecval swig_types[15] #define SWIGTYPE_p_t_vpi_vlog_info swig_types[16] #define SWIGTYPE_p_unsigned_char swig_types[17] #define SWIGTYPE_p_unsigned_int swig_types[18] -#define SWIGTYPE_p_unsigned_long swig_types[19] -#define SWIGTYPE_p_unsigned_short swig_types[20] -#define SWIGTYPE_p_void swig_types[21] -static swig_type_info *swig_types[23]; -static swig_module_info swig_module = {swig_types, 22, 0, 0, 0, 0}; +#define SWIGTYPE_p_unsigned_short swig_types[19] +#define SWIGTYPE_p_void swig_types[20] +static swig_type_info *swig_types[22]; +static swig_module_info swig_module = {swig_types, 21, 0, 0, 0, 0}; #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name) #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name) /* -------- TYPES TABLE (END) -------- */ #define SWIG_init Init_vpi #define SWIG_name "Vpi" static VALUE mVpi; -static void SWIG_AsVal(VALUE obj, int *val) -{ - *val = (int) NUM2INT(obj); -} +#define SWIGVERSION 0x010328 +#define SWIG_as_voidptr(a) (void *)((const void *)(a)) +#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) + + /* Includes the header in the wrapper code */ #include "swig_vpi.h" +#include <limits.h> +#ifndef LLONG_MIN +# define LLONG_MIN LONG_LONG_MIN +#endif +#ifndef LLONG_MAX +# define LLONG_MAX LONG_LONG_MAX +#endif +#ifndef ULLONG_MAX +# define ULLONG_MAX ULONG_LONG_MAX +#endif + + + #define SWIG_From_long LONG2NUM + + +SWIGINTERNINLINE VALUE +SWIG_From_int (int value) +{ + return SWIG_From_long (value); +} + + +SWIGINTERN VALUE +SWIG_ruby_failed(void) +{ + return Qnil; +} + + +/*@SWIG:%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args) +{ + VALUE obj = args[0]; + VALUE type = TYPE(obj); + long *res = (long *)(args[1]); + *res = type == T_FIXNUM ? NUM2LONG(obj) : rb_big2long(obj); + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_long (VALUE obj, long* val) +{ + VALUE type = TYPE(obj); + if ((type == T_FIXNUM) || (type == T_BIGNUM)) { + long v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2LONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsVal_int (VALUE obj, int *val) +{ + long v; + int res = SWIG_AsVal_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v < INT_MIN || v > INT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = (int)(v); + } + } + return res; +} + + +/*@SWIG:%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args) +{ + VALUE obj = args[0]; + VALUE type = TYPE(obj); + unsigned long *res = (unsigned long *)(args[1]); + *res = type == T_FIXNUM ? NUM2ULONG(obj) : rb_big2ulong(obj); + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_long (VALUE obj, unsigned long *val) +{ + VALUE type = TYPE(obj); + if ((type == T_FIXNUM) || (type == T_BIGNUM)) { + unsigned long v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2ULONG), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} + + +SWIGINTERN int +SWIG_AsVal_unsigned_SS_int (VALUE obj, unsigned int *val) +{ + unsigned long v; + int res = SWIG_AsVal_unsigned_SS_long (obj, &v); + if (SWIG_IsOK(res)) { + if ((v > UINT_MAX)) { + return SWIG_OverflowError; + } else { + if (val) *val = (unsigned int)(v); + } + } + return res; +} + + +SWIGINTERNINLINE VALUE +SWIG_From_unsigned_SS_long (unsigned long value) +{ + return ULONG2NUM(value); +} + + +SWIGINTERNINLINE VALUE +SWIG_From_unsigned_SS_int (unsigned int value) +{ + return SWIG_From_unsigned_SS_long (value); +} + + +/*@SWIG:%ruby_aux_method@*/ +SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args) +{ + VALUE obj = args[0]; + VALUE type = TYPE(obj); + double *res = (double *)(args[1]); + *res = (type == T_FLOAT ? NUM2DBL(obj) : (type == T_FIXNUM ? (double) FIX2INT(obj) : rb_big2dbl(obj))); + return obj; +} +/*@SWIG@*/ + +SWIGINTERN int +SWIG_AsVal_double (VALUE obj, double *val) +{ + VALUE type = TYPE(obj); + if ((type == T_FLOAT) || (type == T_FIXNUM) || (type == T_BIGNUM)) { + double v; + VALUE a[2]; + a[0] = obj; + a[1] = (VALUE)(&v); + if (rb_rescue(RUBY_METHOD_FUNC(SWIG_AUX_NUM2DBL), (VALUE)a, RUBY_METHOD_FUNC(SWIG_ruby_failed), 0) != Qnil) { + if (val) *val = v; + return SWIG_OK; + } + } + return SWIG_TypeError; +} + + + #define SWIG_From_double rb_float_new + + typedef union { PLI_BYTE8 *str; /* string value */ PLI_INT32 scalar; /* vpi[0,1,X,Z] */ PLI_INT32 integer; /* integer value */ double real; /* real value */ @@ -1058,2668 +1690,4487 @@ struct t_vpi_strengthval *strength; /* strength value */ PLI_BYTE8 *misc; /* ...other */ } s_vpi_value_value; + +SWIGINTERN swig_type_info* +SWIG_pchar_descriptor() +{ + static int init = 0; + static swig_type_info* info = 0; + if (!init) { + info = SWIG_TypeQuery("_p_char"); + init = 1; + } + return info; +} + + +SWIGINTERN int +SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc) +{ + if (TYPE(obj) == T_STRING) { + char *cstr = rb_string_value_ptr(&(obj)); + size_t size = RSTRING(obj)->len + 1; + if (cptr) { + if (alloc) { + if (*alloc == SWIG_NEWOBJ) { + *cptr = (char *)memcpy((char *)malloc((size)*sizeof(char)), cstr, sizeof(char)*(size)); + } else { + *cptr = cstr; + *alloc = SWIG_OLDOBJ; + } + } + } + if (psize) *psize = size; + return SWIG_OK; + } else { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + if (pchar_descriptor) { + char* vptr = 0; + if (SWIG_ConvertPtr(obj, (void**)&vptr, pchar_descriptor, 0) == SWIG_OK) { + if (cptr) *cptr = vptr; + if (psize) *psize = vptr ? (strlen(vptr) + 1) : 0; + if (alloc) *alloc = SWIG_OLDOBJ; + return SWIG_OK; + } + } + } + return SWIG_TypeError; +} + + + + + +SWIGINTERNINLINE VALUE +SWIG_FromCharPtrAndSize(const char* carray, size_t size) +{ + if (carray) { + if (size > LONG_MAX) { + swig_type_info* pchar_descriptor = SWIG_pchar_descriptor(); + return pchar_descriptor ? + SWIG_NewPointerObj((char *)(carray), pchar_descriptor, 0) : Qnil; + } else { + return rb_str_new(carray, (long)(size)); + } + } else { + return Qnil; + } +} + + +SWIGINTERNINLINE VALUE +SWIG_FromCharPtr(const char *cptr) +{ + return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0)); +} + swig_class cS_vpi_time; -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_time_type_set(int argc, VALUE *argv, VALUE self) { - s_vpi_time *arg1 = (s_vpi_time *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_time, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->type = arg2; - - return Qnil; + s_vpi_time *arg1 = (s_vpi_time *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "type" "', argument " "1"" of type '" "s_vpi_time *""'"); + } + arg1 = (s_vpi_time *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "type" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->type = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_time_type_get(int argc, VALUE *argv, VALUE self) { - s_vpi_time *arg1 = (s_vpi_time *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_time, 0); - result = (PLI_INT32) ((arg1)->type); - - vresult = INT2NUM(result); - return vresult; + s_vpi_time *arg1 = (s_vpi_time *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "type" "', argument " "1"" of type '" "s_vpi_time *""'"); + } + arg1 = (s_vpi_time *)(argp1); + result = (PLI_INT32) ((arg1)->type); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_time_high_set(int argc, VALUE *argv, VALUE self) { - s_vpi_time *arg1 = (s_vpi_time *) 0 ; - PLI_UINT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_time, 0); - arg2 = NUM2UINT(argv[0]); - if (arg1) (arg1)->high = arg2; - - return Qnil; + s_vpi_time *arg1 = (s_vpi_time *) 0 ; + PLI_UINT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "high" "', argument " "1"" of type '" "s_vpi_time *""'"); + } + arg1 = (s_vpi_time *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "high" "', argument " "2"" of type '" "PLI_UINT32""'"); + } + arg2 = (PLI_UINT32)(val2); + if (arg1) (arg1)->high = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_time_high_get(int argc, VALUE *argv, VALUE self) { - s_vpi_time *arg1 = (s_vpi_time *) 0 ; - PLI_UINT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_time, 0); - result = (PLI_UINT32) ((arg1)->high); - - vresult = UINT2NUM(result); - return vresult; + s_vpi_time *arg1 = (s_vpi_time *) 0 ; + PLI_UINT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "high" "', argument " "1"" of type '" "s_vpi_time *""'"); + } + arg1 = (s_vpi_time *)(argp1); + result = (PLI_UINT32) ((arg1)->high); + + vresult = SWIG_From_unsigned_SS_int((unsigned int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_time_low_set(int argc, VALUE *argv, VALUE self) { - s_vpi_time *arg1 = (s_vpi_time *) 0 ; - PLI_UINT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_time, 0); - arg2 = NUM2UINT(argv[0]); - if (arg1) (arg1)->low = arg2; - - return Qnil; + s_vpi_time *arg1 = (s_vpi_time *) 0 ; + PLI_UINT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + unsigned int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "low" "', argument " "1"" of type '" "s_vpi_time *""'"); + } + arg1 = (s_vpi_time *)(argp1); + ecode2 = SWIG_AsVal_unsigned_SS_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "low" "', argument " "2"" of type '" "PLI_UINT32""'"); + } + arg2 = (PLI_UINT32)(val2); + if (arg1) (arg1)->low = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_time_low_get(int argc, VALUE *argv, VALUE self) { - s_vpi_time *arg1 = (s_vpi_time *) 0 ; - PLI_UINT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_time, 0); - result = (PLI_UINT32) ((arg1)->low); - - vresult = UINT2NUM(result); - return vresult; + s_vpi_time *arg1 = (s_vpi_time *) 0 ; + PLI_UINT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "low" "', argument " "1"" of type '" "s_vpi_time *""'"); + } + arg1 = (s_vpi_time *)(argp1); + result = (PLI_UINT32) ((arg1)->low); + + vresult = SWIG_From_unsigned_SS_int((unsigned int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_time_real_set(int argc, VALUE *argv, VALUE self) { - s_vpi_time *arg1 = (s_vpi_time *) 0 ; - double arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_time, 0); - arg2 = (double) NUM2DBL(argv[0]); - if (arg1) (arg1)->real = arg2; - - return Qnil; + s_vpi_time *arg1 = (s_vpi_time *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "real" "', argument " "1"" of type '" "s_vpi_time *""'"); + } + arg1 = (s_vpi_time *)(argp1); + ecode2 = SWIG_AsVal_double(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "real" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + if (arg1) (arg1)->real = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_time_real_get(int argc, VALUE *argv, VALUE self) { - s_vpi_time *arg1 = (s_vpi_time *) 0 ; - double result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_time, 0); - result = (double) ((arg1)->real); - - vresult = rb_float_new(result); - return vresult; + s_vpi_time *arg1 = (s_vpi_time *) 0 ; + double result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_time, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "real" "', argument " "1"" of type '" "s_vpi_time *""'"); + } + arg1 = (s_vpi_time *)(argp1); + result = (double) ((arg1)->real); + + vresult = SWIG_From_double((double)(result)); + return vresult; +fail: + return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_time_allocate(VALUE self) { #else - static VALUE - _wrap_s_vpi_time_allocate(int argc, VALUE *argv, VALUE self) { + SWIGINTERN VALUE + _wrap_s_vpi_time_allocate(int argc, VALUE *argv, VALUE self) { #endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_vpi_time); + + + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_vpi_time); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); + rb_obj_call_init(vresult, argc, argv); #endif - return vresult; - } - + return vresult; + } + -static VALUE +SWIGINTERN VALUE _wrap_new_s_vpi_time(int argc, VALUE *argv, VALUE self) { - s_vpi_time *result; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - result = (s_vpi_time *)(s_vpi_time *) calloc(1, sizeof(s_vpi_time)); - DATA_PTR(self) = result; - - return self; + s_vpi_time *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (s_vpi_time *)(s_vpi_time *) calloc(1, sizeof(s_vpi_time)); + DATA_PTR(self) = result; + + return self; +fail: + return Qnil; } -static void +SWIGINTERN void free_s_vpi_time(s_vpi_time *arg1) { free((char *) arg1); } swig_class cS_vpi_delay; -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_delay_da_set(int argc, VALUE *argv, VALUE self) { - s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; - struct t_vpi_time *arg2 = (struct t_vpi_time *) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_delay, 0); - SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_t_vpi_time, SWIG_POINTER_DISOWN); - if (arg1) (arg1)->da = arg2; - - return Qnil; + s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; + struct t_vpi_time *arg2 = (struct t_vpi_time *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_delay, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "da" "', argument " "1"" of type '" "s_vpi_delay *""'"); + } + arg1 = (s_vpi_delay *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_t_vpi_time, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "da" "', argument " "2"" of type '" "struct t_vpi_time *""'"); + } + arg2 = (struct t_vpi_time *)(argp2); + if (arg1) (arg1)->da = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_delay_da_get(int argc, VALUE *argv, VALUE self) { - s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; - struct t_vpi_time *result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_delay, 0); - result = (struct t_vpi_time *) ((arg1)->da); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_t_vpi_time,0); - return vresult; + s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; + struct t_vpi_time *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_delay, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "da" "', argument " "1"" of type '" "s_vpi_delay *""'"); + } + arg1 = (s_vpi_delay *)(argp1); + result = (struct t_vpi_time *) ((arg1)->da); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_t_vpi_time, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_delay_no_of_delays_set(int argc, VALUE *argv, VALUE self) { - s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_delay, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->no_of_delays = arg2; - - return Qnil; + s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_delay, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "no_of_delays" "', argument " "1"" of type '" "s_vpi_delay *""'"); + } + arg1 = (s_vpi_delay *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "no_of_delays" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->no_of_delays = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_delay_no_of_delays_get(int argc, VALUE *argv, VALUE self) { - s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_delay, 0); - result = (PLI_INT32) ((arg1)->no_of_delays); - - vresult = INT2NUM(result); - return vresult; + s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_delay, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "no_of_delays" "', argument " "1"" of type '" "s_vpi_delay *""'"); + } + arg1 = (s_vpi_delay *)(argp1); + result = (PLI_INT32) ((arg1)->no_of_delays); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_delay_time_type_set(int argc, VALUE *argv, VALUE self) { - s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_delay, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->time_type = arg2; - - return Qnil; + s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_delay, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "time_type" "', argument " "1"" of type '" "s_vpi_delay *""'"); + } + arg1 = (s_vpi_delay *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "time_type" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->time_type = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_delay_time_type_get(int argc, VALUE *argv, VALUE self) { - s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_delay, 0); - result = (PLI_INT32) ((arg1)->time_type); - - vresult = INT2NUM(result); - return vresult; + s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_delay, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "time_type" "', argument " "1"" of type '" "s_vpi_delay *""'"); + } + arg1 = (s_vpi_delay *)(argp1); + result = (PLI_INT32) ((arg1)->time_type); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_delay_mtm_flag_set(int argc, VALUE *argv, VALUE self) { - s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_delay, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->mtm_flag = arg2; - - return Qnil; + s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_delay, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mtm_flag" "', argument " "1"" of type '" "s_vpi_delay *""'"); + } + arg1 = (s_vpi_delay *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "mtm_flag" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->mtm_flag = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_delay_mtm_flag_get(int argc, VALUE *argv, VALUE self) { - s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_delay, 0); - result = (PLI_INT32) ((arg1)->mtm_flag); - - vresult = INT2NUM(result); - return vresult; + s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_delay, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "mtm_flag" "', argument " "1"" of type '" "s_vpi_delay *""'"); + } + arg1 = (s_vpi_delay *)(argp1); + result = (PLI_INT32) ((arg1)->mtm_flag); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_delay_append_flag_set(int argc, VALUE *argv, VALUE self) { - s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_delay, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->append_flag = arg2; - - return Qnil; + s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_delay, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "append_flag" "', argument " "1"" of type '" "s_vpi_delay *""'"); + } + arg1 = (s_vpi_delay *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "append_flag" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->append_flag = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_delay_append_flag_get(int argc, VALUE *argv, VALUE self) { - s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_delay, 0); - result = (PLI_INT32) ((arg1)->append_flag); - - vresult = INT2NUM(result); - return vresult; + s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_delay, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "append_flag" "', argument " "1"" of type '" "s_vpi_delay *""'"); + } + arg1 = (s_vpi_delay *)(argp1); + result = (PLI_INT32) ((arg1)->append_flag); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_delay_pulsere_flag_set(int argc, VALUE *argv, VALUE self) { - s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_delay, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->pulsere_flag = arg2; - - return Qnil; + s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_delay, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pulsere_flag" "', argument " "1"" of type '" "s_vpi_delay *""'"); + } + arg1 = (s_vpi_delay *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pulsere_flag" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->pulsere_flag = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_delay_pulsere_flag_get(int argc, VALUE *argv, VALUE self) { - s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_delay, 0); - result = (PLI_INT32) ((arg1)->pulsere_flag); - - vresult = INT2NUM(result); - return vresult; + s_vpi_delay *arg1 = (s_vpi_delay *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_delay, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "pulsere_flag" "', argument " "1"" of type '" "s_vpi_delay *""'"); + } + arg1 = (s_vpi_delay *)(argp1); + result = (PLI_INT32) ((arg1)->pulsere_flag); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_delay_allocate(VALUE self) { #else - static VALUE - _wrap_s_vpi_delay_allocate(int argc, VALUE *argv, VALUE self) { + SWIGINTERN VALUE + _wrap_s_vpi_delay_allocate(int argc, VALUE *argv, VALUE self) { #endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_vpi_delay); + + + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_vpi_delay); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); + rb_obj_call_init(vresult, argc, argv); #endif - return vresult; - } - + return vresult; + } + -static VALUE +SWIGINTERN VALUE _wrap_new_s_vpi_delay(int argc, VALUE *argv, VALUE self) { - s_vpi_delay *result; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - result = (s_vpi_delay *)(s_vpi_delay *) calloc(1, sizeof(s_vpi_delay)); - DATA_PTR(self) = result; - - return self; + s_vpi_delay *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (s_vpi_delay *)(s_vpi_delay *) calloc(1, sizeof(s_vpi_delay)); + DATA_PTR(self) = result; + + return self; +fail: + return Qnil; } -static void +SWIGINTERN void free_s_vpi_delay(s_vpi_delay *arg1) { free((char *) arg1); } swig_class cS_vpi_vecval; -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_vecval_aval_set(int argc, VALUE *argv, VALUE self) { - s_vpi_vecval *arg1 = (s_vpi_vecval *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_vecval, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->aval = arg2; - - return Qnil; + s_vpi_vecval *arg1 = (s_vpi_vecval *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_vecval, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aval" "', argument " "1"" of type '" "s_vpi_vecval *""'"); + } + arg1 = (s_vpi_vecval *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "aval" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->aval = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_vecval_aval_get(int argc, VALUE *argv, VALUE self) { - s_vpi_vecval *arg1 = (s_vpi_vecval *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_vecval, 0); - result = (PLI_INT32) ((arg1)->aval); - - vresult = INT2NUM(result); - return vresult; + s_vpi_vecval *arg1 = (s_vpi_vecval *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_vecval, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "aval" "', argument " "1"" of type '" "s_vpi_vecval *""'"); + } + arg1 = (s_vpi_vecval *)(argp1); + result = (PLI_INT32) ((arg1)->aval); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_vecval_bval_set(int argc, VALUE *argv, VALUE self) { - s_vpi_vecval *arg1 = (s_vpi_vecval *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_vecval, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->bval = arg2; - - return Qnil; + s_vpi_vecval *arg1 = (s_vpi_vecval *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_vecval, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bval" "', argument " "1"" of type '" "s_vpi_vecval *""'"); + } + arg1 = (s_vpi_vecval *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bval" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->bval = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_vecval_bval_get(int argc, VALUE *argv, VALUE self) { - s_vpi_vecval *arg1 = (s_vpi_vecval *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_vecval, 0); - result = (PLI_INT32) ((arg1)->bval); - - vresult = INT2NUM(result); - return vresult; + s_vpi_vecval *arg1 = (s_vpi_vecval *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_vecval, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bval" "', argument " "1"" of type '" "s_vpi_vecval *""'"); + } + arg1 = (s_vpi_vecval *)(argp1); + result = (PLI_INT32) ((arg1)->bval); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_vecval_allocate(VALUE self) { #else - static VALUE - _wrap_s_vpi_vecval_allocate(int argc, VALUE *argv, VALUE self) { + SWIGINTERN VALUE + _wrap_s_vpi_vecval_allocate(int argc, VALUE *argv, VALUE self) { #endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_vpi_vecval); + + + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_vpi_vecval); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); + rb_obj_call_init(vresult, argc, argv); #endif - return vresult; - } - + return vresult; + } + -static VALUE +SWIGINTERN VALUE _wrap_new_s_vpi_vecval(int argc, VALUE *argv, VALUE self) { - s_vpi_vecval *result; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - result = (s_vpi_vecval *)(s_vpi_vecval *) calloc(1, sizeof(s_vpi_vecval)); - DATA_PTR(self) = result; - - return self; + s_vpi_vecval *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (s_vpi_vecval *)(s_vpi_vecval *) calloc(1, sizeof(s_vpi_vecval)); + DATA_PTR(self) = result; + + return self; +fail: + return Qnil; } -static void +SWIGINTERN void free_s_vpi_vecval(s_vpi_vecval *arg1) { free((char *) arg1); } swig_class cS_vpi_strengthval; -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_strengthval_logic_set(int argc, VALUE *argv, VALUE self) { - s_vpi_strengthval *arg1 = (s_vpi_strengthval *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_strengthval, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->logic = arg2; - - return Qnil; + s_vpi_strengthval *arg1 = (s_vpi_strengthval *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_strengthval, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "logic" "', argument " "1"" of type '" "s_vpi_strengthval *""'"); + } + arg1 = (s_vpi_strengthval *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "logic" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->logic = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_strengthval_logic_get(int argc, VALUE *argv, VALUE self) { - s_vpi_strengthval *arg1 = (s_vpi_strengthval *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_strengthval, 0); - result = (PLI_INT32) ((arg1)->logic); - - vresult = INT2NUM(result); - return vresult; + s_vpi_strengthval *arg1 = (s_vpi_strengthval *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_strengthval, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "logic" "', argument " "1"" of type '" "s_vpi_strengthval *""'"); + } + arg1 = (s_vpi_strengthval *)(argp1); + result = (PLI_INT32) ((arg1)->logic); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_strengthval_s0_set(int argc, VALUE *argv, VALUE self) { - s_vpi_strengthval *arg1 = (s_vpi_strengthval *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_strengthval, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->s0 = arg2; - - return Qnil; + s_vpi_strengthval *arg1 = (s_vpi_strengthval *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_strengthval, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "s0" "', argument " "1"" of type '" "s_vpi_strengthval *""'"); + } + arg1 = (s_vpi_strengthval *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "s0" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->s0 = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_strengthval_s0_get(int argc, VALUE *argv, VALUE self) { - s_vpi_strengthval *arg1 = (s_vpi_strengthval *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_strengthval, 0); - result = (PLI_INT32) ((arg1)->s0); - - vresult = INT2NUM(result); - return vresult; + s_vpi_strengthval *arg1 = (s_vpi_strengthval *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_strengthval, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "s0" "', argument " "1"" of type '" "s_vpi_strengthval *""'"); + } + arg1 = (s_vpi_strengthval *)(argp1); + result = (PLI_INT32) ((arg1)->s0); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_strengthval_s1_set(int argc, VALUE *argv, VALUE self) { - s_vpi_strengthval *arg1 = (s_vpi_strengthval *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_strengthval, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->s1 = arg2; - - return Qnil; + s_vpi_strengthval *arg1 = (s_vpi_strengthval *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_strengthval, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "s1" "', argument " "1"" of type '" "s_vpi_strengthval *""'"); + } + arg1 = (s_vpi_strengthval *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "s1" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->s1 = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_strengthval_s1_get(int argc, VALUE *argv, VALUE self) { - s_vpi_strengthval *arg1 = (s_vpi_strengthval *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_strengthval, 0); - result = (PLI_INT32) ((arg1)->s1); - - vresult = INT2NUM(result); - return vresult; + s_vpi_strengthval *arg1 = (s_vpi_strengthval *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_strengthval, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "s1" "', argument " "1"" of type '" "s_vpi_strengthval *""'"); + } + arg1 = (s_vpi_strengthval *)(argp1); + result = (PLI_INT32) ((arg1)->s1); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_strengthval_allocate(VALUE self) { #else - static VALUE - _wrap_s_vpi_strengthval_allocate(int argc, VALUE *argv, VALUE self) { + SWIGINTERN VALUE + _wrap_s_vpi_strengthval_allocate(int argc, VALUE *argv, VALUE self) { #endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_vpi_strengthval); + + + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_vpi_strengthval); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); + rb_obj_call_init(vresult, argc, argv); #endif - return vresult; - } - + return vresult; + } + -static VALUE +SWIGINTERN VALUE _wrap_new_s_vpi_strengthval(int argc, VALUE *argv, VALUE self) { - s_vpi_strengthval *result; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - result = (s_vpi_strengthval *)(s_vpi_strengthval *) calloc(1, sizeof(s_vpi_strengthval)); - DATA_PTR(self) = result; - - return self; + s_vpi_strengthval *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (s_vpi_strengthval *)(s_vpi_strengthval *) calloc(1, sizeof(s_vpi_strengthval)); + DATA_PTR(self) = result; + + return self; +fail: + return Qnil; } -static void +SWIGINTERN void free_s_vpi_strengthval(s_vpi_strengthval *arg1) { free((char *) arg1); } swig_class cS_vpi_value; -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_format_set(int argc, VALUE *argv, VALUE self) { - s_vpi_value *arg1 = (s_vpi_value *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_value, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->format = arg2; - - return Qnil; + s_vpi_value *arg1 = (s_vpi_value *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "format" "', argument " "1"" of type '" "s_vpi_value *""'"); + } + arg1 = (s_vpi_value *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "format" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->format = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_format_get(int argc, VALUE *argv, VALUE self) { - s_vpi_value *arg1 = (s_vpi_value *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_value, 0); - result = (PLI_INT32) ((arg1)->format); - - vresult = INT2NUM(result); - return vresult; + s_vpi_value *arg1 = (s_vpi_value *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "format" "', argument " "1"" of type '" "s_vpi_value *""'"); + } + arg1 = (s_vpi_value *)(argp1); + result = (PLI_INT32) ((arg1)->format); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_get(int argc, VALUE *argv, VALUE self) { - s_vpi_value *arg1 = (s_vpi_value *) 0 ; - s_vpi_value_value *result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_value, 0); - result = (s_vpi_value_value *)& ((arg1)->value); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_s_vpi_value_value,0); - return vresult; + s_vpi_value *arg1 = (s_vpi_value *) 0 ; + s_vpi_value_value *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "value" "', argument " "1"" of type '" "s_vpi_value *""'"); + } + arg1 = (s_vpi_value *)(argp1); + result = (s_vpi_value_value *)& ((arg1)->value); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + return vresult; +fail: + return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_allocate(VALUE self) { #else - static VALUE - _wrap_s_vpi_value_allocate(int argc, VALUE *argv, VALUE self) { + SWIGINTERN VALUE + _wrap_s_vpi_value_allocate(int argc, VALUE *argv, VALUE self) { #endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_vpi_value); + + + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_vpi_value); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); + rb_obj_call_init(vresult, argc, argv); #endif - return vresult; - } - + return vresult; + } + -static VALUE +SWIGINTERN VALUE _wrap_new_s_vpi_value(int argc, VALUE *argv, VALUE self) { - s_vpi_value *result; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - result = (s_vpi_value *)(s_vpi_value *) calloc(1, sizeof(s_vpi_value)); - DATA_PTR(self) = result; - - return self; + s_vpi_value *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (s_vpi_value *)(s_vpi_value *) calloc(1, sizeof(s_vpi_value)); + DATA_PTR(self) = result; + + return self; +fail: + return Qnil; } -static void +SWIGINTERN void free_s_vpi_value(s_vpi_value *arg1) { free((char *) arg1); } swig_class cS_vpi_value_value; -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_str_set(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; - PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_s_vpi_value_value, 0); - arg2 = StringValuePtr(argv[0]); - { - if (arg1->str) free((char*)arg1->str); - if (arg2) { - arg1->str = (PLI_BYTE8 *) malloc(strlen(arg2)+1); - strcpy((char*)arg1->str,arg2); - } else { - arg1->str = 0; - } - } - return Qnil; + s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; + PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "str" "', argument " "1"" of type '" "s_vpi_value_value *""'"); + } + arg1 = (s_vpi_value_value *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "str" "', argument " "2"" of type '" "PLI_BYTE8 *""'"); + } + arg2 = buf2; + if (arg1->str) free((char*)arg1->str); + if (arg2) { + size_t size = strlen(arg2) + 1; + arg1->str = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); + } else { + arg1->str = 0; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_str_get(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; - PLI_BYTE8 *result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_s_vpi_value_value, 0); - result = (PLI_BYTE8 *) ((arg1)->str); - - vresult = rb_str_new2(result); - return vresult; + s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; + PLI_BYTE8 *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "str" "', argument " "1"" of type '" "s_vpi_value_value *""'"); + } + arg1 = (s_vpi_value_value *)(argp1); + result = (PLI_BYTE8 *) ((arg1)->str); + + vresult = SWIG_FromCharPtr(result); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_scalar_set(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_s_vpi_value_value, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->scalar = arg2; - - return Qnil; + s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "scalar" "', argument " "1"" of type '" "s_vpi_value_value *""'"); + } + arg1 = (s_vpi_value_value *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "scalar" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->scalar = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_scalar_get(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_s_vpi_value_value, 0); - result = (PLI_INT32) ((arg1)->scalar); - - vresult = INT2NUM(result); - return vresult; + s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "scalar" "', argument " "1"" of type '" "s_vpi_value_value *""'"); + } + arg1 = (s_vpi_value_value *)(argp1); + result = (PLI_INT32) ((arg1)->scalar); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_integer_set(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_s_vpi_value_value, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->integer = arg2; - - return Qnil; + s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integer" "', argument " "1"" of type '" "s_vpi_value_value *""'"); + } + arg1 = (s_vpi_value_value *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "integer" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->integer = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_integer_get(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_s_vpi_value_value, 0); - result = (PLI_INT32) ((arg1)->integer); - - vresult = INT2NUM(result); - return vresult; + s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "integer" "', argument " "1"" of type '" "s_vpi_value_value *""'"); + } + arg1 = (s_vpi_value_value *)(argp1); + result = (PLI_INT32) ((arg1)->integer); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_real_set(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; - double arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_s_vpi_value_value, 0); - arg2 = (double) NUM2DBL(argv[0]); - if (arg1) (arg1)->real = arg2; - - return Qnil; + s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; + double arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + double val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "real" "', argument " "1"" of type '" "s_vpi_value_value *""'"); + } + arg1 = (s_vpi_value_value *)(argp1); + ecode2 = SWIG_AsVal_double(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "real" "', argument " "2"" of type '" "double""'"); + } + arg2 = (double)(val2); + if (arg1) (arg1)->real = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_real_get(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; - double result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_s_vpi_value_value, 0); - result = (double) ((arg1)->real); - - vresult = rb_float_new(result); - return vresult; + s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; + double result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "real" "', argument " "1"" of type '" "s_vpi_value_value *""'"); + } + arg1 = (s_vpi_value_value *)(argp1); + result = (double) ((arg1)->real); + + vresult = SWIG_From_double((double)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_time_set(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; - struct t_vpi_time *arg2 = (struct t_vpi_time *) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_s_vpi_value_value, 0); - SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_t_vpi_time, SWIG_POINTER_DISOWN); - if (arg1) (arg1)->time = arg2; - - return Qnil; + s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; + struct t_vpi_time *arg2 = (struct t_vpi_time *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "time" "', argument " "1"" of type '" "s_vpi_value_value *""'"); + } + arg1 = (s_vpi_value_value *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_t_vpi_time, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "time" "', argument " "2"" of type '" "struct t_vpi_time *""'"); + } + arg2 = (struct t_vpi_time *)(argp2); + if (arg1) (arg1)->time = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_time_get(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; - struct t_vpi_time *result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_s_vpi_value_value, 0); - result = (struct t_vpi_time *) ((arg1)->time); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_t_vpi_time,0); - return vresult; + s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; + struct t_vpi_time *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "time" "', argument " "1"" of type '" "s_vpi_value_value *""'"); + } + arg1 = (s_vpi_value_value *)(argp1); + result = (struct t_vpi_time *) ((arg1)->time); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_t_vpi_time, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_vector_set(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; - struct t_vpi_vecval *arg2 = (struct t_vpi_vecval *) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_s_vpi_value_value, 0); - SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_t_vpi_vecval, SWIG_POINTER_DISOWN); - if (arg1) (arg1)->vector = arg2; - - return Qnil; + s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; + struct t_vpi_vecval *arg2 = (struct t_vpi_vecval *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector" "', argument " "1"" of type '" "s_vpi_value_value *""'"); + } + arg1 = (s_vpi_value_value *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_t_vpi_vecval, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vector" "', argument " "2"" of type '" "struct t_vpi_vecval *""'"); + } + arg2 = (struct t_vpi_vecval *)(argp2); + if (arg1) (arg1)->vector = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_vector_get(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; - struct t_vpi_vecval *result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_s_vpi_value_value, 0); - result = (struct t_vpi_vecval *) ((arg1)->vector); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_t_vpi_vecval,0); - return vresult; + s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; + struct t_vpi_vecval *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vector" "', argument " "1"" of type '" "s_vpi_value_value *""'"); + } + arg1 = (s_vpi_value_value *)(argp1); + result = (struct t_vpi_vecval *) ((arg1)->vector); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_t_vpi_vecval, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_strength_set(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; - struct t_vpi_strengthval *arg2 = (struct t_vpi_strengthval *) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_s_vpi_value_value, 0); - SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_t_vpi_strengthval, SWIG_POINTER_DISOWN); - if (arg1) (arg1)->strength = arg2; - - return Qnil; + s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; + struct t_vpi_strengthval *arg2 = (struct t_vpi_strengthval *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "strength" "', argument " "1"" of type '" "s_vpi_value_value *""'"); + } + arg1 = (s_vpi_value_value *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_t_vpi_strengthval, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "strength" "', argument " "2"" of type '" "struct t_vpi_strengthval *""'"); + } + arg2 = (struct t_vpi_strengthval *)(argp2); + if (arg1) (arg1)->strength = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_strength_get(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; - struct t_vpi_strengthval *result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_s_vpi_value_value, 0); - result = (struct t_vpi_strengthval *) ((arg1)->strength); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_t_vpi_strengthval,0); - return vresult; + s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; + struct t_vpi_strengthval *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "strength" "', argument " "1"" of type '" "s_vpi_value_value *""'"); + } + arg1 = (s_vpi_value_value *)(argp1); + result = (struct t_vpi_strengthval *) ((arg1)->strength); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_t_vpi_strengthval, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_misc_set(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; - PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_s_vpi_value_value, 0); - arg2 = StringValuePtr(argv[0]); - { - if (arg1->misc) free((char*)arg1->misc); - if (arg2) { - arg1->misc = (PLI_BYTE8 *) malloc(strlen(arg2)+1); - strcpy((char*)arg1->misc,arg2); - } else { - arg1->misc = 0; - } - } - return Qnil; + s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; + PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "misc" "', argument " "1"" of type '" "s_vpi_value_value *""'"); + } + arg1 = (s_vpi_value_value *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "misc" "', argument " "2"" of type '" "PLI_BYTE8 *""'"); + } + arg2 = buf2; + if (arg1->misc) free((char*)arg1->misc); + if (arg2) { + size_t size = strlen(arg2) + 1; + arg1->misc = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); + } else { + arg1->misc = 0; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_misc_get(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; - PLI_BYTE8 *result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_s_vpi_value_value, 0); - result = (PLI_BYTE8 *) ((arg1)->misc); - - vresult = rb_str_new2(result); - return vresult; + s_vpi_value_value *arg1 = (s_vpi_value_value *) 0 ; + PLI_BYTE8 *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_s_vpi_value_value, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "misc" "', argument " "1"" of type '" "s_vpi_value_value *""'"); + } + arg1 = (s_vpi_value_value *)(argp1); + result = (PLI_BYTE8 *) ((arg1)->misc); + + vresult = SWIG_FromCharPtr(result); + return vresult; +fail: + return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_value_value_allocate(VALUE self) { #else - static VALUE - _wrap_s_vpi_value_value_allocate(int argc, VALUE *argv, VALUE self) { + SWIGINTERN VALUE + _wrap_s_vpi_value_value_allocate(int argc, VALUE *argv, VALUE self) { #endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_s_vpi_value_value); + + + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_s_vpi_value_value); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); + rb_obj_call_init(vresult, argc, argv); #endif - return vresult; - } - + return vresult; + } + -static VALUE +SWIGINTERN VALUE _wrap_new_s_vpi_value_value(int argc, VALUE *argv, VALUE self) { - s_vpi_value_value *result; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - result = (s_vpi_value_value *)(s_vpi_value_value *) calloc(1, sizeof(s_vpi_value_value)); - DATA_PTR(self) = result; - - return self; + s_vpi_value_value *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (s_vpi_value_value *)(s_vpi_value_value *) calloc(1, sizeof(s_vpi_value_value)); + DATA_PTR(self) = result; + + return self; +fail: + return Qnil; } -static void +SWIGINTERN void free_s_vpi_value_value(s_vpi_value_value *arg1) { free((char *) arg1); } swig_class cS_vpi_systf_data; -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_systf_data_type_set(int argc, VALUE *argv, VALUE self) { - s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_systf_data, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->type = arg2; - - return Qnil; + s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_systf_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "type" "', argument " "1"" of type '" "s_vpi_systf_data *""'"); + } + arg1 = (s_vpi_systf_data *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "type" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->type = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_systf_data_type_get(int argc, VALUE *argv, VALUE self) { - s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_systf_data, 0); - result = (PLI_INT32) ((arg1)->type); - - vresult = INT2NUM(result); - return vresult; + s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_systf_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "type" "', argument " "1"" of type '" "s_vpi_systf_data *""'"); + } + arg1 = (s_vpi_systf_data *)(argp1); + result = (PLI_INT32) ((arg1)->type); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_systf_data_sysfunctype_set(int argc, VALUE *argv, VALUE self) { - s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_systf_data, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->sysfunctype = arg2; - - return Qnil; + s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_systf_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sysfunctype" "', argument " "1"" of type '" "s_vpi_systf_data *""'"); + } + arg1 = (s_vpi_systf_data *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sysfunctype" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->sysfunctype = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_systf_data_sysfunctype_get(int argc, VALUE *argv, VALUE self) { - s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_systf_data, 0); - result = (PLI_INT32) ((arg1)->sysfunctype); - - vresult = INT2NUM(result); - return vresult; + s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_systf_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sysfunctype" "', argument " "1"" of type '" "s_vpi_systf_data *""'"); + } + arg1 = (s_vpi_systf_data *)(argp1); + result = (PLI_INT32) ((arg1)->sysfunctype); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_systf_data_tfname_set(int argc, VALUE *argv, VALUE self) { - s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; - PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_systf_data, 0); - arg2 = StringValuePtr(argv[0]); - { - if (arg1->tfname) free((char*)arg1->tfname); - if (arg2) { - arg1->tfname = (PLI_BYTE8 *) malloc(strlen(arg2)+1); - strcpy((char*)arg1->tfname,arg2); - } else { - arg1->tfname = 0; - } - } - return Qnil; + s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; + PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_systf_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tfname" "', argument " "1"" of type '" "s_vpi_systf_data *""'"); + } + arg1 = (s_vpi_systf_data *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tfname" "', argument " "2"" of type '" "PLI_BYTE8 *""'"); + } + arg2 = buf2; + if (arg1->tfname) free((char*)arg1->tfname); + if (arg2) { + size_t size = strlen(arg2) + 1; + arg1->tfname = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); + } else { + arg1->tfname = 0; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_systf_data_tfname_get(int argc, VALUE *argv, VALUE self) { - s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; - PLI_BYTE8 *result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_systf_data, 0); - result = (PLI_BYTE8 *) ((arg1)->tfname); - - vresult = rb_str_new2(result); - return vresult; + s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; + PLI_BYTE8 *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_systf_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tfname" "', argument " "1"" of type '" "s_vpi_systf_data *""'"); + } + arg1 = (s_vpi_systf_data *)(argp1); + result = (PLI_BYTE8 *) ((arg1)->tfname); + + vresult = SWIG_FromCharPtr(result); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_systf_data_calltf_set(int argc, VALUE *argv, VALUE self) { - s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; - PLI_INT32 (*arg2)(PLI_BYTE8 *) = (PLI_INT32 (*)(PLI_BYTE8 *)) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_systf_data, 0); - SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_f_p_char__int, 0); - if (arg1) (arg1)->calltf = arg2; - - return Qnil; + s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; + PLI_INT32 (*arg2)(PLI_BYTE8 *) = (PLI_INT32 (*)(PLI_BYTE8 *)) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_systf_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "calltf" "', argument " "1"" of type '" "s_vpi_systf_data *""'"); + } + arg1 = (s_vpi_systf_data *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_char__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in method '" "calltf" "', argument " "2"" of type '" "PLI_INT32 (*)(PLI_BYTE8 *)""'"); + } + } + if (arg1) (arg1)->calltf = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_systf_data_calltf_get(int argc, VALUE *argv, VALUE self) { - s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; - PLI_INT32 (*result)(PLI_BYTE8 *); - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_systf_data, 0); - result = (PLI_INT32 (*)(PLI_BYTE8 *)) ((arg1)->calltf); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_f_p_char__int,0); - return vresult; + s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; + PLI_INT32 (*result)(PLI_BYTE8 *) = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_systf_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "calltf" "', argument " "1"" of type '" "s_vpi_systf_data *""'"); + } + arg1 = (s_vpi_systf_data *)(argp1); + result = (PLI_INT32 (*)(PLI_BYTE8 *)) ((arg1)->calltf); + + vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_char__int); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_systf_data_compiletf_set(int argc, VALUE *argv, VALUE self) { - s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; - PLI_INT32 (*arg2)(PLI_BYTE8 *) = (PLI_INT32 (*)(PLI_BYTE8 *)) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_systf_data, 0); - SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_f_p_char__int, 0); - if (arg1) (arg1)->compiletf = arg2; - - return Qnil; + s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; + PLI_INT32 (*arg2)(PLI_BYTE8 *) = (PLI_INT32 (*)(PLI_BYTE8 *)) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_systf_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "compiletf" "', argument " "1"" of type '" "s_vpi_systf_data *""'"); + } + arg1 = (s_vpi_systf_data *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_char__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in method '" "compiletf" "', argument " "2"" of type '" "PLI_INT32 (*)(PLI_BYTE8 *)""'"); + } + } + if (arg1) (arg1)->compiletf = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_systf_data_compiletf_get(int argc, VALUE *argv, VALUE self) { - s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; - PLI_INT32 (*result)(PLI_BYTE8 *); - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_systf_data, 0); - result = (PLI_INT32 (*)(PLI_BYTE8 *)) ((arg1)->compiletf); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_f_p_char__int,0); - return vresult; + s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; + PLI_INT32 (*result)(PLI_BYTE8 *) = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_systf_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "compiletf" "', argument " "1"" of type '" "s_vpi_systf_data *""'"); + } + arg1 = (s_vpi_systf_data *)(argp1); + result = (PLI_INT32 (*)(PLI_BYTE8 *)) ((arg1)->compiletf); + + vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_char__int); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_systf_data_sizetf_set(int argc, VALUE *argv, VALUE self) { - s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; - PLI_INT32 (*arg2)(PLI_BYTE8 *) = (PLI_INT32 (*)(PLI_BYTE8 *)) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_systf_data, 0); - SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_f_p_char__int, 0); - if (arg1) (arg1)->sizetf = arg2; - - return Qnil; + s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; + PLI_INT32 (*arg2)(PLI_BYTE8 *) = (PLI_INT32 (*)(PLI_BYTE8 *)) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_systf_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sizetf" "', argument " "1"" of type '" "s_vpi_systf_data *""'"); + } + arg1 = (s_vpi_systf_data *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_char__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sizetf" "', argument " "2"" of type '" "PLI_INT32 (*)(PLI_BYTE8 *)""'"); + } + } + if (arg1) (arg1)->sizetf = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_systf_data_sizetf_get(int argc, VALUE *argv, VALUE self) { - s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; - PLI_INT32 (*result)(PLI_BYTE8 *); - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_systf_data, 0); - result = (PLI_INT32 (*)(PLI_BYTE8 *)) ((arg1)->sizetf); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_f_p_char__int,0); - return vresult; + s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; + PLI_INT32 (*result)(PLI_BYTE8 *) = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_systf_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sizetf" "', argument " "1"" of type '" "s_vpi_systf_data *""'"); + } + arg1 = (s_vpi_systf_data *)(argp1); + result = (PLI_INT32 (*)(PLI_BYTE8 *)) ((arg1)->sizetf); + + vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_char__int); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_systf_data_user_data_set(int argc, VALUE *argv, VALUE self) { - s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; - PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_systf_data, 0); - arg2 = StringValuePtr(argv[0]); - { - if (arg1->user_data) free((char*)arg1->user_data); - if (arg2) { - arg1->user_data = (PLI_BYTE8 *) malloc(strlen(arg2)+1); - strcpy((char*)arg1->user_data,arg2); - } else { - arg1->user_data = 0; - } - } - return Qnil; + s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; + PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_systf_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "user_data" "', argument " "1"" of type '" "s_vpi_systf_data *""'"); + } + arg1 = (s_vpi_systf_data *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "user_data" "', argument " "2"" of type '" "PLI_BYTE8 *""'"); + } + arg2 = buf2; + if (arg1->user_data) free((char*)arg1->user_data); + if (arg2) { + size_t size = strlen(arg2) + 1; + arg1->user_data = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); + } else { + arg1->user_data = 0; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_systf_data_user_data_get(int argc, VALUE *argv, VALUE self) { - s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; - PLI_BYTE8 *result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_systf_data, 0); - result = (PLI_BYTE8 *) ((arg1)->user_data); - - vresult = rb_str_new2(result); - return vresult; + s_vpi_systf_data *arg1 = (s_vpi_systf_data *) 0 ; + PLI_BYTE8 *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_systf_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "user_data" "', argument " "1"" of type '" "s_vpi_systf_data *""'"); + } + arg1 = (s_vpi_systf_data *)(argp1); + result = (PLI_BYTE8 *) ((arg1)->user_data); + + vresult = SWIG_FromCharPtr(result); + return vresult; +fail: + return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_systf_data_allocate(VALUE self) { #else - static VALUE - _wrap_s_vpi_systf_data_allocate(int argc, VALUE *argv, VALUE self) { + SWIGINTERN VALUE + _wrap_s_vpi_systf_data_allocate(int argc, VALUE *argv, VALUE self) { #endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_vpi_systf_data); + + + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_vpi_systf_data); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); + rb_obj_call_init(vresult, argc, argv); #endif - return vresult; - } - + return vresult; + } + -static VALUE +SWIGINTERN VALUE _wrap_new_s_vpi_systf_data(int argc, VALUE *argv, VALUE self) { - s_vpi_systf_data *result; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - result = (s_vpi_systf_data *)(s_vpi_systf_data *) calloc(1, sizeof(s_vpi_systf_data)); - DATA_PTR(self) = result; - - return self; + s_vpi_systf_data *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (s_vpi_systf_data *)(s_vpi_systf_data *) calloc(1, sizeof(s_vpi_systf_data)); + DATA_PTR(self) = result; + + return self; +fail: + return Qnil; } -static void +SWIGINTERN void free_s_vpi_systf_data(s_vpi_systf_data *arg1) { free((char *) arg1); } swig_class cS_vpi_vlog_info; -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_vlog_info_argc_set(int argc, VALUE *argv, VALUE self) { - s_vpi_vlog_info *arg1 = (s_vpi_vlog_info *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_vlog_info, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->argc = arg2; - - return Qnil; + s_vpi_vlog_info *arg1 = (s_vpi_vlog_info *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_vlog_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "argc" "', argument " "1"" of type '" "s_vpi_vlog_info *""'"); + } + arg1 = (s_vpi_vlog_info *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "argc" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->argc = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_vlog_info_argc_get(int argc, VALUE *argv, VALUE self) { - s_vpi_vlog_info *arg1 = (s_vpi_vlog_info *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_vlog_info, 0); - result = (PLI_INT32) ((arg1)->argc); - - vresult = INT2NUM(result); - return vresult; + s_vpi_vlog_info *arg1 = (s_vpi_vlog_info *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_vlog_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "argc" "', argument " "1"" of type '" "s_vpi_vlog_info *""'"); + } + arg1 = (s_vpi_vlog_info *)(argp1); + result = (PLI_INT32) ((arg1)->argc); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_vlog_info_argv_set(int argc, VALUE *argv, VALUE self) { - s_vpi_vlog_info *arg1 = (s_vpi_vlog_info *) 0 ; - PLI_BYTE8 **arg2 = (PLI_BYTE8 **) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_vlog_info, 0); - SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_p_char, 0); - if (arg1) (arg1)->argv = arg2; - - return Qnil; + s_vpi_vlog_info *arg1 = (s_vpi_vlog_info *) 0 ; + PLI_BYTE8 **arg2 = (PLI_BYTE8 **) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_vlog_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "argv" "', argument " "1"" of type '" "s_vpi_vlog_info *""'"); + } + arg1 = (s_vpi_vlog_info *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_p_char, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "argv" "', argument " "2"" of type '" "PLI_BYTE8 **""'"); + } + arg2 = (PLI_BYTE8 **)(argp2); + if (arg1) (arg1)->argv = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_vlog_info_argv_get(int argc, VALUE *argv, VALUE self) { - s_vpi_vlog_info *arg1 = (s_vpi_vlog_info *) 0 ; - PLI_BYTE8 **result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_vlog_info, 0); - result = (PLI_BYTE8 **) ((arg1)->argv); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_p_char,0); - return vresult; + s_vpi_vlog_info *arg1 = (s_vpi_vlog_info *) 0 ; + PLI_BYTE8 **result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_vlog_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "argv" "', argument " "1"" of type '" "s_vpi_vlog_info *""'"); + } + arg1 = (s_vpi_vlog_info *)(argp1); + result = (PLI_BYTE8 **) ((arg1)->argv); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_char, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_vlog_info_product_set(int argc, VALUE *argv, VALUE self) { - s_vpi_vlog_info *arg1 = (s_vpi_vlog_info *) 0 ; - PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_vlog_info, 0); - arg2 = StringValuePtr(argv[0]); - { - if (arg1->product) free((char*)arg1->product); - if (arg2) { - arg1->product = (PLI_BYTE8 *) malloc(strlen(arg2)+1); - strcpy((char*)arg1->product,arg2); - } else { - arg1->product = 0; - } - } - return Qnil; + s_vpi_vlog_info *arg1 = (s_vpi_vlog_info *) 0 ; + PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_vlog_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "product" "', argument " "1"" of type '" "s_vpi_vlog_info *""'"); + } + arg1 = (s_vpi_vlog_info *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "product" "', argument " "2"" of type '" "PLI_BYTE8 *""'"); + } + arg2 = buf2; + if (arg1->product) free((char*)arg1->product); + if (arg2) { + size_t size = strlen(arg2) + 1; + arg1->product = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); + } else { + arg1->product = 0; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_vlog_info_product_get(int argc, VALUE *argv, VALUE self) { - s_vpi_vlog_info *arg1 = (s_vpi_vlog_info *) 0 ; - PLI_BYTE8 *result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_vlog_info, 0); - result = (PLI_BYTE8 *) ((arg1)->product); - - vresult = rb_str_new2(result); - return vresult; + s_vpi_vlog_info *arg1 = (s_vpi_vlog_info *) 0 ; + PLI_BYTE8 *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_vlog_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "product" "', argument " "1"" of type '" "s_vpi_vlog_info *""'"); + } + arg1 = (s_vpi_vlog_info *)(argp1); + result = (PLI_BYTE8 *) ((arg1)->product); + + vresult = SWIG_FromCharPtr(result); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_vlog_info_version_set(int argc, VALUE *argv, VALUE self) { - s_vpi_vlog_info *arg1 = (s_vpi_vlog_info *) 0 ; - PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_vlog_info, 0); - arg2 = StringValuePtr(argv[0]); - { - if (arg1->version) free((char*)arg1->version); - if (arg2) { - arg1->version = (PLI_BYTE8 *) malloc(strlen(arg2)+1); - strcpy((char*)arg1->version,arg2); - } else { - arg1->version = 0; - } - } - return Qnil; + s_vpi_vlog_info *arg1 = (s_vpi_vlog_info *) 0 ; + PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_vlog_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "version" "', argument " "1"" of type '" "s_vpi_vlog_info *""'"); + } + arg1 = (s_vpi_vlog_info *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "version" "', argument " "2"" of type '" "PLI_BYTE8 *""'"); + } + arg2 = buf2; + if (arg1->version) free((char*)arg1->version); + if (arg2) { + size_t size = strlen(arg2) + 1; + arg1->version = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); + } else { + arg1->version = 0; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_vlog_info_version_get(int argc, VALUE *argv, VALUE self) { - s_vpi_vlog_info *arg1 = (s_vpi_vlog_info *) 0 ; - PLI_BYTE8 *result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_vlog_info, 0); - result = (PLI_BYTE8 *) ((arg1)->version); - - vresult = rb_str_new2(result); - return vresult; + s_vpi_vlog_info *arg1 = (s_vpi_vlog_info *) 0 ; + PLI_BYTE8 *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_vlog_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "version" "', argument " "1"" of type '" "s_vpi_vlog_info *""'"); + } + arg1 = (s_vpi_vlog_info *)(argp1); + result = (PLI_BYTE8 *) ((arg1)->version); + + vresult = SWIG_FromCharPtr(result); + return vresult; +fail: + return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_vlog_info_allocate(VALUE self) { #else - static VALUE - _wrap_s_vpi_vlog_info_allocate(int argc, VALUE *argv, VALUE self) { + SWIGINTERN VALUE + _wrap_s_vpi_vlog_info_allocate(int argc, VALUE *argv, VALUE self) { #endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_vpi_vlog_info); + + + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_vpi_vlog_info); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); + rb_obj_call_init(vresult, argc, argv); #endif - return vresult; - } - + return vresult; + } + -static VALUE +SWIGINTERN VALUE _wrap_new_s_vpi_vlog_info(int argc, VALUE *argv, VALUE self) { - s_vpi_vlog_info *result; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - result = (s_vpi_vlog_info *)(s_vpi_vlog_info *) calloc(1, sizeof(s_vpi_vlog_info)); - DATA_PTR(self) = result; - - return self; + s_vpi_vlog_info *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (s_vpi_vlog_info *)(s_vpi_vlog_info *) calloc(1, sizeof(s_vpi_vlog_info)); + DATA_PTR(self) = result; + + return self; +fail: + return Qnil; } -static void +SWIGINTERN void free_s_vpi_vlog_info(s_vpi_vlog_info *arg1) { free((char *) arg1); } swig_class cS_vpi_error_info; -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_error_info_state_set(int argc, VALUE *argv, VALUE self) { - s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_error_info, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->state = arg2; - - return Qnil; + s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_error_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "state" "', argument " "1"" of type '" "s_vpi_error_info *""'"); + } + arg1 = (s_vpi_error_info *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "state" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->state = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_error_info_state_get(int argc, VALUE *argv, VALUE self) { - s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_error_info, 0); - result = (PLI_INT32) ((arg1)->state); - - vresult = INT2NUM(result); - return vresult; + s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_error_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "state" "', argument " "1"" of type '" "s_vpi_error_info *""'"); + } + arg1 = (s_vpi_error_info *)(argp1); + result = (PLI_INT32) ((arg1)->state); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_error_info_level_set(int argc, VALUE *argv, VALUE self) { - s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_error_info, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->level = arg2; - - return Qnil; + s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_error_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "level" "', argument " "1"" of type '" "s_vpi_error_info *""'"); + } + arg1 = (s_vpi_error_info *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "level" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->level = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_error_info_level_get(int argc, VALUE *argv, VALUE self) { - s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_error_info, 0); - result = (PLI_INT32) ((arg1)->level); - - vresult = INT2NUM(result); - return vresult; + s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_error_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "level" "', argument " "1"" of type '" "s_vpi_error_info *""'"); + } + arg1 = (s_vpi_error_info *)(argp1); + result = (PLI_INT32) ((arg1)->level); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_error_info_message_set(int argc, VALUE *argv, VALUE self) { - s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; - PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_error_info, 0); - arg2 = StringValuePtr(argv[0]); - { - if (arg1->message) free((char*)arg1->message); - if (arg2) { - arg1->message = (PLI_BYTE8 *) malloc(strlen(arg2)+1); - strcpy((char*)arg1->message,arg2); - } else { - arg1->message = 0; - } - } - return Qnil; + s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; + PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_error_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "message" "', argument " "1"" of type '" "s_vpi_error_info *""'"); + } + arg1 = (s_vpi_error_info *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "message" "', argument " "2"" of type '" "PLI_BYTE8 *""'"); + } + arg2 = buf2; + if (arg1->message) free((char*)arg1->message); + if (arg2) { + size_t size = strlen(arg2) + 1; + arg1->message = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); + } else { + arg1->message = 0; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_error_info_message_get(int argc, VALUE *argv, VALUE self) { - s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; - PLI_BYTE8 *result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_error_info, 0); - result = (PLI_BYTE8 *) ((arg1)->message); - - vresult = rb_str_new2(result); - return vresult; + s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; + PLI_BYTE8 *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_error_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "message" "', argument " "1"" of type '" "s_vpi_error_info *""'"); + } + arg1 = (s_vpi_error_info *)(argp1); + result = (PLI_BYTE8 *) ((arg1)->message); + + vresult = SWIG_FromCharPtr(result); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_error_info_product_set(int argc, VALUE *argv, VALUE self) { - s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; - PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_error_info, 0); - arg2 = StringValuePtr(argv[0]); - { - if (arg1->product) free((char*)arg1->product); - if (arg2) { - arg1->product = (PLI_BYTE8 *) malloc(strlen(arg2)+1); - strcpy((char*)arg1->product,arg2); - } else { - arg1->product = 0; - } - } - return Qnil; + s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; + PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_error_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "product" "', argument " "1"" of type '" "s_vpi_error_info *""'"); + } + arg1 = (s_vpi_error_info *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "product" "', argument " "2"" of type '" "PLI_BYTE8 *""'"); + } + arg2 = buf2; + if (arg1->product) free((char*)arg1->product); + if (arg2) { + size_t size = strlen(arg2) + 1; + arg1->product = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); + } else { + arg1->product = 0; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_error_info_product_get(int argc, VALUE *argv, VALUE self) { - s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; - PLI_BYTE8 *result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_error_info, 0); - result = (PLI_BYTE8 *) ((arg1)->product); - - vresult = rb_str_new2(result); - return vresult; + s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; + PLI_BYTE8 *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_error_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "product" "', argument " "1"" of type '" "s_vpi_error_info *""'"); + } + arg1 = (s_vpi_error_info *)(argp1); + result = (PLI_BYTE8 *) ((arg1)->product); + + vresult = SWIG_FromCharPtr(result); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_error_info_code_set(int argc, VALUE *argv, VALUE self) { - s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; - PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_error_info, 0); - arg2 = StringValuePtr(argv[0]); - { - if (arg1->code) free((char*)arg1->code); - if (arg2) { - arg1->code = (PLI_BYTE8 *) malloc(strlen(arg2)+1); - strcpy((char*)arg1->code,arg2); - } else { - arg1->code = 0; - } - } - return Qnil; + s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; + PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_error_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "code" "', argument " "1"" of type '" "s_vpi_error_info *""'"); + } + arg1 = (s_vpi_error_info *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "code" "', argument " "2"" of type '" "PLI_BYTE8 *""'"); + } + arg2 = buf2; + if (arg1->code) free((char*)arg1->code); + if (arg2) { + size_t size = strlen(arg2) + 1; + arg1->code = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); + } else { + arg1->code = 0; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_error_info_code_get(int argc, VALUE *argv, VALUE self) { - s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; - PLI_BYTE8 *result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_error_info, 0); - result = (PLI_BYTE8 *) ((arg1)->code); - - vresult = rb_str_new2(result); - return vresult; + s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; + PLI_BYTE8 *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_error_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "code" "', argument " "1"" of type '" "s_vpi_error_info *""'"); + } + arg1 = (s_vpi_error_info *)(argp1); + result = (PLI_BYTE8 *) ((arg1)->code); + + vresult = SWIG_FromCharPtr(result); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_error_info_file_set(int argc, VALUE *argv, VALUE self) { - s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; - PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_error_info, 0); - arg2 = StringValuePtr(argv[0]); - { - if (arg1->file) free((char*)arg1->file); - if (arg2) { - arg1->file = (PLI_BYTE8 *) malloc(strlen(arg2)+1); - strcpy((char*)arg1->file,arg2); - } else { - arg1->file = 0; - } - } - return Qnil; + s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; + PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_error_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "file" "', argument " "1"" of type '" "s_vpi_error_info *""'"); + } + arg1 = (s_vpi_error_info *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "file" "', argument " "2"" of type '" "PLI_BYTE8 *""'"); + } + arg2 = buf2; + if (arg1->file) free((char*)arg1->file); + if (arg2) { + size_t size = strlen(arg2) + 1; + arg1->file = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); + } else { + arg1->file = 0; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_error_info_file_get(int argc, VALUE *argv, VALUE self) { - s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; - PLI_BYTE8 *result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_error_info, 0); - result = (PLI_BYTE8 *) ((arg1)->file); - - vresult = rb_str_new2(result); - return vresult; + s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; + PLI_BYTE8 *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_error_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "file" "', argument " "1"" of type '" "s_vpi_error_info *""'"); + } + arg1 = (s_vpi_error_info *)(argp1); + result = (PLI_BYTE8 *) ((arg1)->file); + + vresult = SWIG_FromCharPtr(result); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_error_info_line_set(int argc, VALUE *argv, VALUE self) { - s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_error_info, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->line = arg2; - - return Qnil; + s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_error_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "line" "', argument " "1"" of type '" "s_vpi_error_info *""'"); + } + arg1 = (s_vpi_error_info *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "line" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->line = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_error_info_line_get(int argc, VALUE *argv, VALUE self) { - s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_vpi_error_info, 0); - result = (PLI_INT32) ((arg1)->line); - - vresult = INT2NUM(result); - return vresult; + s_vpi_error_info *arg1 = (s_vpi_error_info *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_vpi_error_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "line" "', argument " "1"" of type '" "s_vpi_error_info *""'"); + } + arg1 = (s_vpi_error_info *)(argp1); + result = (PLI_INT32) ((arg1)->line); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC -static VALUE +SWIGINTERN VALUE _wrap_s_vpi_error_info_allocate(VALUE self) { #else - static VALUE - _wrap_s_vpi_error_info_allocate(int argc, VALUE *argv, VALUE self) { + SWIGINTERN VALUE + _wrap_s_vpi_error_info_allocate(int argc, VALUE *argv, VALUE self) { #endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_vpi_error_info); + + + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_vpi_error_info); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); + rb_obj_call_init(vresult, argc, argv); #endif - return vresult; - } - + return vresult; + } + -static VALUE +SWIGINTERN VALUE _wrap_new_s_vpi_error_info(int argc, VALUE *argv, VALUE self) { - s_vpi_error_info *result; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - result = (s_vpi_error_info *)(s_vpi_error_info *) calloc(1, sizeof(s_vpi_error_info)); - DATA_PTR(self) = result; - - return self; + s_vpi_error_info *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (s_vpi_error_info *)(s_vpi_error_info *) calloc(1, sizeof(s_vpi_error_info)); + DATA_PTR(self) = result; + + return self; +fail: + return Qnil; } -static void +SWIGINTERN void free_s_vpi_error_info(s_vpi_error_info *arg1) { free((char *) arg1); } swig_class cS_cb_data; -static VALUE +SWIGINTERN VALUE _wrap_s_cb_data_reason_set(int argc, VALUE *argv, VALUE self) { - s_cb_data *arg1 = (s_cb_data *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_cb_data, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->reason = arg2; - - return Qnil; + s_cb_data *arg1 = (s_cb_data *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_cb_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "reason" "', argument " "1"" of type '" "s_cb_data *""'"); + } + arg1 = (s_cb_data *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "reason" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->reason = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_cb_data_reason_get(int argc, VALUE *argv, VALUE self) { - s_cb_data *arg1 = (s_cb_data *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_cb_data, 0); - result = (PLI_INT32) ((arg1)->reason); - - vresult = INT2NUM(result); - return vresult; + s_cb_data *arg1 = (s_cb_data *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_cb_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "reason" "', argument " "1"" of type '" "s_cb_data *""'"); + } + arg1 = (s_cb_data *)(argp1); + result = (PLI_INT32) ((arg1)->reason); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_cb_data_cb_rtn_set(int argc, VALUE *argv, VALUE self) { - s_cb_data *arg1 = (s_cb_data *) 0 ; - PLI_INT32 (*arg2)(struct t_cb_data *) = (PLI_INT32 (*)(struct t_cb_data *)) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_cb_data, 0); - SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_f_p_struct_t_cb_data__int, 0); - if (arg1) (arg1)->cb_rtn = arg2; - - return Qnil; + s_cb_data *arg1 = (s_cb_data *) 0 ; + PLI_INT32 (*arg2)(struct t_cb_data *) = (PLI_INT32 (*)(struct t_cb_data *)) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_cb_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cb_rtn" "', argument " "1"" of type '" "s_cb_data *""'"); + } + arg1 = (s_cb_data *)(argp1); + { + int res = SWIG_ConvertFunctionPtr(argv[0], (void**)(&arg2), SWIGTYPE_p_f_p_struct_t_cb_data__int); + if (!SWIG_IsOK(res)) { + SWIG_exception_fail(SWIG_ArgError(res), "in method '" "cb_rtn" "', argument " "2"" of type '" "PLI_INT32 (*)(struct t_cb_data *)""'"); + } + } + if (arg1) (arg1)->cb_rtn = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_cb_data_cb_rtn_get(int argc, VALUE *argv, VALUE self) { - s_cb_data *arg1 = (s_cb_data *) 0 ; - PLI_INT32 (*result)(struct t_cb_data *); - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_cb_data, 0); - result = (PLI_INT32 (*)(struct t_cb_data *)) ((arg1)->cb_rtn); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_f_p_struct_t_cb_data__int,0); - return vresult; + s_cb_data *arg1 = (s_cb_data *) 0 ; + PLI_INT32 (*result)(struct t_cb_data *) = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_cb_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "cb_rtn" "', argument " "1"" of type '" "s_cb_data *""'"); + } + arg1 = (s_cb_data *)(argp1); + result = (PLI_INT32 (*)(struct t_cb_data *)) ((arg1)->cb_rtn); + + vresult = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_p_struct_t_cb_data__int); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_cb_data_obj_set(int argc, VALUE *argv, VALUE self) { - s_cb_data *arg1 = (s_cb_data *) 0 ; - vpiHandle arg2 = (vpiHandle) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_cb_data, 0); - SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_unsigned_int, SWIG_POINTER_DISOWN); - if (arg1) (arg1)->obj = arg2; - - return Qnil; + s_cb_data *arg1 = (s_cb_data *) 0 ; + vpiHandle arg2 = (vpiHandle) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_cb_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obj" "', argument " "1"" of type '" "s_cb_data *""'"); + } + arg1 = (s_cb_data *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_unsigned_int, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "obj" "', argument " "2"" of type '" "vpiHandle""'"); + } + arg2 = (vpiHandle)(argp2); + if (arg1) (arg1)->obj = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_cb_data_obj_get(int argc, VALUE *argv, VALUE self) { - s_cb_data *arg1 = (s_cb_data *) 0 ; - vpiHandle result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_cb_data, 0); - result = (vpiHandle) ((arg1)->obj); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0); - return vresult; + s_cb_data *arg1 = (s_cb_data *) 0 ; + vpiHandle result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_cb_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "obj" "', argument " "1"" of type '" "s_cb_data *""'"); + } + arg1 = (s_cb_data *)(argp1); + result = (vpiHandle) ((arg1)->obj); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_cb_data_time_set(int argc, VALUE *argv, VALUE self) { - s_cb_data *arg1 = (s_cb_data *) 0 ; - p_vpi_time arg2 = (p_vpi_time) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_cb_data, 0); - SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_t_vpi_time, SWIG_POINTER_DISOWN); - if (arg1) (arg1)->time = arg2; - - return Qnil; + s_cb_data *arg1 = (s_cb_data *) 0 ; + p_vpi_time arg2 = (p_vpi_time) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_cb_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "time" "', argument " "1"" of type '" "s_cb_data *""'"); + } + arg1 = (s_cb_data *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_t_vpi_time, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "time" "', argument " "2"" of type '" "p_vpi_time""'"); + } + arg2 = (p_vpi_time)(argp2); + if (arg1) (arg1)->time = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_cb_data_time_get(int argc, VALUE *argv, VALUE self) { - s_cb_data *arg1 = (s_cb_data *) 0 ; - p_vpi_time result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_cb_data, 0); - result = (p_vpi_time) ((arg1)->time); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_t_vpi_time,0); - return vresult; + s_cb_data *arg1 = (s_cb_data *) 0 ; + p_vpi_time result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_cb_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "time" "', argument " "1"" of type '" "s_cb_data *""'"); + } + arg1 = (s_cb_data *)(argp1); + result = (p_vpi_time) ((arg1)->time); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_t_vpi_time, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_cb_data_value_set(int argc, VALUE *argv, VALUE self) { - s_cb_data *arg1 = (s_cb_data *) 0 ; - p_vpi_value arg2 = (p_vpi_value) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_cb_data, 0); - SWIG_ConvertPtr(argv[0], (void **) &arg2, SWIGTYPE_p_t_vpi_value, SWIG_POINTER_DISOWN); - if (arg1) (arg1)->value = arg2; - - return Qnil; + s_cb_data *arg1 = (s_cb_data *) 0 ; + p_vpi_value arg2 = (p_vpi_value) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_cb_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "value" "', argument " "1"" of type '" "s_cb_data *""'"); + } + arg1 = (s_cb_data *)(argp1); + res2 = SWIG_ConvertPtr(argv[0], &argp2,SWIGTYPE_p_t_vpi_value, SWIG_POINTER_DISOWN | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "value" "', argument " "2"" of type '" "p_vpi_value""'"); + } + arg2 = (p_vpi_value)(argp2); + if (arg1) (arg1)->value = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_cb_data_value_get(int argc, VALUE *argv, VALUE self) { - s_cb_data *arg1 = (s_cb_data *) 0 ; - p_vpi_value result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_cb_data, 0); - result = (p_vpi_value) ((arg1)->value); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_t_vpi_value,0); - return vresult; + s_cb_data *arg1 = (s_cb_data *) 0 ; + p_vpi_value result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_cb_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "value" "', argument " "1"" of type '" "s_cb_data *""'"); + } + arg1 = (s_cb_data *)(argp1); + result = (p_vpi_value) ((arg1)->value); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_t_vpi_value, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_cb_data_index_set(int argc, VALUE *argv, VALUE self) { - s_cb_data *arg1 = (s_cb_data *) 0 ; - PLI_INT32 arg2 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_cb_data, 0); - arg2 = NUM2INT(argv[0]); - if (arg1) (arg1)->index = arg2; - - return Qnil; + s_cb_data *arg1 = (s_cb_data *) 0 ; + PLI_INT32 arg2 ; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_cb_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index" "', argument " "1"" of type '" "s_cb_data *""'"); + } + arg1 = (s_cb_data *)(argp1); + ecode2 = SWIG_AsVal_int(argv[0], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + if (arg1) (arg1)->index = arg2; + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_cb_data_index_get(int argc, VALUE *argv, VALUE self) { - s_cb_data *arg1 = (s_cb_data *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_cb_data, 0); - result = (PLI_INT32) ((arg1)->index); - - vresult = INT2NUM(result); - return vresult; + s_cb_data *arg1 = (s_cb_data *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_cb_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index" "', argument " "1"" of type '" "s_cb_data *""'"); + } + arg1 = (s_cb_data *)(argp1); + result = (PLI_INT32) ((arg1)->index); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_cb_data_user_data_set(int argc, VALUE *argv, VALUE self) { - s_cb_data *arg1 = (s_cb_data *) 0 ; - PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_cb_data, 0); - arg2 = StringValuePtr(argv[0]); - { - if (arg1->user_data) free((char*)arg1->user_data); - if (arg2) { - arg1->user_data = (PLI_BYTE8 *) malloc(strlen(arg2)+1); - strcpy((char*)arg1->user_data,arg2); - } else { - arg1->user_data = 0; - } - } - return Qnil; + s_cb_data *arg1 = (s_cb_data *) 0 ; + PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_cb_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "user_data" "', argument " "1"" of type '" "s_cb_data *""'"); + } + arg1 = (s_cb_data *)(argp1); + res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "user_data" "', argument " "2"" of type '" "PLI_BYTE8 *""'"); + } + arg2 = buf2; + if (arg1->user_data) free((char*)arg1->user_data); + if (arg2) { + size_t size = strlen(arg2) + 1; + arg1->user_data = (char *)memcpy((char *)malloc((size)*sizeof(char)), arg2, sizeof(char)*(size)); + } else { + arg1->user_data = 0; + } + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_s_cb_data_user_data_get(int argc, VALUE *argv, VALUE self) { - s_cb_data *arg1 = (s_cb_data *) 0 ; - PLI_BYTE8 *result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - SWIG_ConvertPtr(self, (void **) &arg1, SWIGTYPE_p_t_cb_data, 0); - result = (PLI_BYTE8 *) ((arg1)->user_data); - - vresult = rb_str_new2(result); - return vresult; + s_cb_data *arg1 = (s_cb_data *) 0 ; + PLI_BYTE8 *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_t_cb_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "user_data" "', argument " "1"" of type '" "s_cb_data *""'"); + } + arg1 = (s_cb_data *)(argp1); + result = (PLI_BYTE8 *) ((arg1)->user_data); + + vresult = SWIG_FromCharPtr(result); + return vresult; +fail: + return Qnil; } #ifdef HAVE_RB_DEFINE_ALLOC_FUNC -static VALUE +SWIGINTERN VALUE _wrap_s_cb_data_allocate(VALUE self) { #else - static VALUE - _wrap_s_cb_data_allocate(int argc, VALUE *argv, VALUE self) { + SWIGINTERN VALUE + _wrap_s_cb_data_allocate(int argc, VALUE *argv, VALUE self) { #endif - - - VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_cb_data); + + + VALUE vresult = SWIG_NewClassInstance(self, SWIGTYPE_p_t_cb_data); #ifndef HAVE_RB_DEFINE_ALLOC_FUNC - rb_obj_call_init(vresult, argc, argv); + rb_obj_call_init(vresult, argc, argv); #endif - return vresult; - } - + return vresult; + } + -static VALUE +SWIGINTERN VALUE _wrap_new_s_cb_data(int argc, VALUE *argv, VALUE self) { - s_cb_data *result; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - result = (s_cb_data *)(s_cb_data *) calloc(1, sizeof(s_cb_data)); - DATA_PTR(self) = result; - - return self; + s_cb_data *result = 0 ; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (s_cb_data *)(s_cb_data *) calloc(1, sizeof(s_cb_data)); + DATA_PTR(self) = result; + + return self; +fail: + return Qnil; } -static void +SWIGINTERN void free_s_cb_data(s_cb_data *arg1) { free((char *) arg1); } -static VALUE +SWIGINTERN VALUE _wrap_vpi_register_cb(int argc, VALUE *argv, VALUE self) { - p_cb_data arg1 = (p_cb_data) 0 ; - vpiHandle result; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_t_cb_data, 0); - result = (vpiHandle)vpi_register_cb(arg1); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0); - return vresult; + p_cb_data arg1 = (p_cb_data) 0 ; + vpiHandle result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_t_cb_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_register_cb" "', argument " "1"" of type '" "p_cb_data""'"); + } + arg1 = (p_cb_data)(argp1); + result = (vpiHandle)vpi_register_cb(arg1); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_remove_cb(int argc, VALUE *argv, VALUE self) { - vpiHandle arg1 = (vpiHandle) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_unsigned_int, 0); - result = (PLI_INT32)vpi_remove_cb(arg1); - - vresult = INT2NUM(result); - return vresult; + vpiHandle arg1 = (vpiHandle) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_remove_cb" "', argument " "1"" of type '" "vpiHandle""'"); + } + arg1 = (vpiHandle)(argp1); + result = (PLI_INT32)vpi_remove_cb(arg1); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_get_cb_info(int argc, VALUE *argv, VALUE self) { - vpiHandle arg1 = (vpiHandle) 0 ; - p_cb_data arg2 = (p_cb_data) 0 ; - - if ((argc < 2) || (argc > 2)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_unsigned_int, 0); - SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_t_cb_data, 0); - vpi_get_cb_info(arg1,arg2); - - return Qnil; + vpiHandle arg1 = (vpiHandle) 0 ; + p_cb_data arg2 = (p_cb_data) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_get_cb_info" "', argument " "1"" of type '" "vpiHandle""'"); + } + arg1 = (vpiHandle)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_t_cb_data, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_get_cb_info" "', argument " "2"" of type '" "p_cb_data""'"); + } + arg2 = (p_cb_data)(argp2); + vpi_get_cb_info(arg1,arg2); + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_register_systf(int argc, VALUE *argv, VALUE self) { - p_vpi_systf_data arg1 = (p_vpi_systf_data) 0 ; - vpiHandle result; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_t_vpi_systf_data, 0); - result = (vpiHandle)vpi_register_systf(arg1); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0); - return vresult; + p_vpi_systf_data arg1 = (p_vpi_systf_data) 0 ; + vpiHandle result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_t_vpi_systf_data, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_register_systf" "', argument " "1"" of type '" "p_vpi_systf_data""'"); + } + arg1 = (p_vpi_systf_data)(argp1); + result = (vpiHandle)vpi_register_systf(arg1); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_get_systf_info(int argc, VALUE *argv, VALUE self) { - vpiHandle arg1 = (vpiHandle) 0 ; - p_vpi_systf_data arg2 = (p_vpi_systf_data) 0 ; - - if ((argc < 2) || (argc > 2)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_unsigned_int, 0); - SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_t_vpi_systf_data, 0); - vpi_get_systf_info(arg1,arg2); - - return Qnil; + vpiHandle arg1 = (vpiHandle) 0 ; + p_vpi_systf_data arg2 = (p_vpi_systf_data) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_get_systf_info" "', argument " "1"" of type '" "vpiHandle""'"); + } + arg1 = (vpiHandle)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_t_vpi_systf_data, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_get_systf_info" "', argument " "2"" of type '" "p_vpi_systf_data""'"); + } + arg2 = (p_vpi_systf_data)(argp2); + vpi_get_systf_info(arg1,arg2); + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_handle_by_name(int argc, VALUE *argv, VALUE self) { - PLI_BYTE8 *arg1 = (PLI_BYTE8 *) 0 ; - vpiHandle arg2 = (vpiHandle) 0 ; - vpiHandle result; - VALUE vresult = Qnil; - - if ((argc < 2) || (argc > 2)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); - arg1 = StringValuePtr(argv[0]); - SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_unsigned_int, 0); - result = (vpiHandle)vpi_handle_by_name(arg1,arg2); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0); - return vresult; + PLI_BYTE8 *arg1 = (PLI_BYTE8 *) 0 ; + vpiHandle arg2 = (vpiHandle) 0 ; + vpiHandle result; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_handle_by_name" "', argument " "1"" of type '" "PLI_BYTE8 *""'"); + } + arg1 = buf1; + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_handle_by_name" "', argument " "2"" of type '" "vpiHandle""'"); + } + arg2 = (vpiHandle)(argp2); + result = (vpiHandle)vpi_handle_by_name(arg1,arg2); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return vresult; +fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_handle_by_index(int argc, VALUE *argv, VALUE self) { - vpiHandle arg1 = (vpiHandle) 0 ; - PLI_INT32 arg2 ; - vpiHandle result; - VALUE vresult = Qnil; - - if ((argc < 2) || (argc > 2)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_unsigned_int, 0); - arg2 = NUM2INT(argv[1]); - result = (vpiHandle)vpi_handle_by_index(arg1,arg2); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0); - return vresult; + vpiHandle arg1 = (vpiHandle) 0 ; + PLI_INT32 arg2 ; + vpiHandle result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_handle_by_index" "', argument " "1"" of type '" "vpiHandle""'"); + } + arg1 = (vpiHandle)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vpi_handle_by_index" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + result = (vpiHandle)vpi_handle_by_index(arg1,arg2); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_handle(int argc, VALUE *argv, VALUE self) { - PLI_INT32 arg1 ; - vpiHandle arg2 = (vpiHandle) 0 ; - vpiHandle result; - VALUE vresult = Qnil; - - if ((argc < 2) || (argc > 2)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); - arg1 = NUM2INT(argv[0]); - SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_unsigned_int, 0); - result = (vpiHandle)vpi_handle(arg1,arg2); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0); - return vresult; + PLI_INT32 arg1 ; + vpiHandle arg2 = (vpiHandle) 0 ; + vpiHandle result; + int val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vpi_handle" "', argument " "1"" of type '" "PLI_INT32""'"); + } + arg1 = (PLI_INT32)(val1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_handle" "', argument " "2"" of type '" "vpiHandle""'"); + } + arg2 = (vpiHandle)(argp2); + result = (vpiHandle)vpi_handle(arg1,arg2); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_handle_multi(int argc, VALUE *argv, VALUE self) { - PLI_INT32 arg1 ; - vpiHandle arg2 = (vpiHandle) 0 ; - vpiHandle arg3 = (vpiHandle) 0 ; - void *arg4 = 0 ; - vpiHandle result; - VALUE vresult = Qnil; - - if (argc < 3) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); - arg1 = NUM2INT(argv[0]); - SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_unsigned_int, 0); - SWIG_ConvertPtr(argv[2], (void **) &arg3, SWIGTYPE_p_unsigned_int, 0); - result = (vpiHandle)vpi_handle_multi(arg1,arg2,arg3,arg4); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0); - return vresult; + PLI_INT32 arg1 ; + vpiHandle arg2 = (vpiHandle) 0 ; + vpiHandle arg3 = (vpiHandle) 0 ; + void *arg4 = 0 ; + vpiHandle result; + int val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + VALUE vresult = Qnil; + + if (argc < 3) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vpi_handle_multi" "', argument " "1"" of type '" "PLI_INT32""'"); + } + arg1 = (PLI_INT32)(val1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_handle_multi" "', argument " "2"" of type '" "vpiHandle""'"); + } + arg2 = (vpiHandle)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vpi_handle_multi" "', argument " "3"" of type '" "vpiHandle""'"); + } + arg3 = (vpiHandle)(argp3); + result = (vpiHandle)vpi_handle_multi(arg1,arg2,arg3,arg4); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_iterate(int argc, VALUE *argv, VALUE self) { - PLI_INT32 arg1 ; - vpiHandle arg2 = (vpiHandle) 0 ; - vpiHandle result; - VALUE vresult = Qnil; - - if ((argc < 2) || (argc > 2)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); - arg1 = NUM2INT(argv[0]); - SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_unsigned_int, 0); - result = (vpiHandle)vpi_iterate(arg1,arg2); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0); - return vresult; + PLI_INT32 arg1 ; + vpiHandle arg2 = (vpiHandle) 0 ; + vpiHandle result; + int val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vpi_iterate" "', argument " "1"" of type '" "PLI_INT32""'"); + } + arg1 = (PLI_INT32)(val1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_iterate" "', argument " "2"" of type '" "vpiHandle""'"); + } + arg2 = (vpiHandle)(argp2); + result = (vpiHandle)vpi_iterate(arg1,arg2); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_scan(int argc, VALUE *argv, VALUE self) { - vpiHandle arg1 = (vpiHandle) 0 ; - vpiHandle result; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_unsigned_int, 0); - result = (vpiHandle)vpi_scan(arg1); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0); - return vresult; + vpiHandle arg1 = (vpiHandle) 0 ; + vpiHandle result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_scan" "', argument " "1"" of type '" "vpiHandle""'"); + } + arg1 = (vpiHandle)(argp1); + result = (vpiHandle)vpi_scan(arg1); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_get(int argc, VALUE *argv, VALUE self) { - PLI_INT32 arg1 ; - vpiHandle arg2 = (vpiHandle) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 2) || (argc > 2)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); - arg1 = NUM2INT(argv[0]); - SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_unsigned_int, 0); - result = (PLI_INT32)vpi_get(arg1,arg2); - - vresult = INT2NUM(result); - return vresult; + PLI_INT32 arg1 ; + vpiHandle arg2 = (vpiHandle) 0 ; + PLI_INT32 result; + int val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vpi_get" "', argument " "1"" of type '" "PLI_INT32""'"); + } + arg1 = (PLI_INT32)(val1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_get" "', argument " "2"" of type '" "vpiHandle""'"); + } + arg2 = (vpiHandle)(argp2); + result = (PLI_INT32)vpi_get(arg1,arg2); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_get_str(int argc, VALUE *argv, VALUE self) { - PLI_INT32 arg1 ; - vpiHandle arg2 = (vpiHandle) 0 ; - PLI_BYTE8 *result; - VALUE vresult = Qnil; - - if ((argc < 2) || (argc > 2)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); - arg1 = NUM2INT(argv[0]); - SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_unsigned_int, 0); - result = (PLI_BYTE8 *)vpi_get_str(arg1,arg2); - - vresult = rb_str_new2(result); - return vresult; + PLI_INT32 arg1 ; + vpiHandle arg2 = (vpiHandle) 0 ; + PLI_BYTE8 *result = 0 ; + int val1 ; + int ecode1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vpi_get_str" "', argument " "1"" of type '" "PLI_INT32""'"); + } + arg1 = (PLI_INT32)(val1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_get_str" "', argument " "2"" of type '" "vpiHandle""'"); + } + arg2 = (vpiHandle)(argp2); + result = (PLI_BYTE8 *)vpi_get_str(arg1,arg2); + + vresult = SWIG_FromCharPtr(result); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_get_delays(int argc, VALUE *argv, VALUE self) { - vpiHandle arg1 = (vpiHandle) 0 ; - p_vpi_delay arg2 = (p_vpi_delay) 0 ; - - if ((argc < 2) || (argc > 2)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_unsigned_int, 0); - SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_t_vpi_delay, 0); - vpi_get_delays(arg1,arg2); - - return Qnil; + vpiHandle arg1 = (vpiHandle) 0 ; + p_vpi_delay arg2 = (p_vpi_delay) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_get_delays" "', argument " "1"" of type '" "vpiHandle""'"); + } + arg1 = (vpiHandle)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_t_vpi_delay, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_get_delays" "', argument " "2"" of type '" "p_vpi_delay""'"); + } + arg2 = (p_vpi_delay)(argp2); + vpi_get_delays(arg1,arg2); + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_put_delays(int argc, VALUE *argv, VALUE self) { - vpiHandle arg1 = (vpiHandle) 0 ; - p_vpi_delay arg2 = (p_vpi_delay) 0 ; - - if ((argc < 2) || (argc > 2)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_unsigned_int, 0); - SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_t_vpi_delay, 0); - vpi_put_delays(arg1,arg2); - - return Qnil; + vpiHandle arg1 = (vpiHandle) 0 ; + p_vpi_delay arg2 = (p_vpi_delay) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_put_delays" "', argument " "1"" of type '" "vpiHandle""'"); + } + arg1 = (vpiHandle)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_t_vpi_delay, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_put_delays" "', argument " "2"" of type '" "p_vpi_delay""'"); + } + arg2 = (p_vpi_delay)(argp2); + vpi_put_delays(arg1,arg2); + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_get_value(int argc, VALUE *argv, VALUE self) { - vpiHandle arg1 = (vpiHandle) 0 ; - p_vpi_value arg2 = (p_vpi_value) 0 ; - - if ((argc < 2) || (argc > 2)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_unsigned_int, 0); - SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_t_vpi_value, 0); - vpi_get_value(arg1,arg2); - - return Qnil; + vpiHandle arg1 = (vpiHandle) 0 ; + p_vpi_value arg2 = (p_vpi_value) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_get_value" "', argument " "1"" of type '" "vpiHandle""'"); + } + arg1 = (vpiHandle)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_t_vpi_value, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_get_value" "', argument " "2"" of type '" "p_vpi_value""'"); + } + arg2 = (p_vpi_value)(argp2); + vpi_get_value(arg1,arg2); + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_put_value(int argc, VALUE *argv, VALUE self) { - vpiHandle arg1 = (vpiHandle) 0 ; - p_vpi_value arg2 = (p_vpi_value) 0 ; - p_vpi_time arg3 = (p_vpi_time) 0 ; - PLI_INT32 arg4 ; - vpiHandle result; - VALUE vresult = Qnil; - - if ((argc < 4) || (argc > 4)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_unsigned_int, 0); - SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_t_vpi_value, 0); - SWIG_ConvertPtr(argv[2], (void **) &arg3, SWIGTYPE_p_t_vpi_time, 0); - arg4 = NUM2INT(argv[3]); - result = (vpiHandle)vpi_put_value(arg1,arg2,arg3,arg4); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0); - return vresult; + vpiHandle arg1 = (vpiHandle) 0 ; + p_vpi_value arg2 = (p_vpi_value) 0 ; + p_vpi_time arg3 = (p_vpi_time) 0 ; + PLI_INT32 arg4 ; + vpiHandle result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + int val4 ; + int ecode4 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 4) || (argc > 4)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 4)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_put_value" "', argument " "1"" of type '" "vpiHandle""'"); + } + arg1 = (vpiHandle)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_t_vpi_value, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_put_value" "', argument " "2"" of type '" "p_vpi_value""'"); + } + arg2 = (p_vpi_value)(argp2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_t_vpi_time, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vpi_put_value" "', argument " "3"" of type '" "p_vpi_time""'"); + } + arg3 = (p_vpi_time)(argp3); + ecode4 = SWIG_AsVal_int(argv[3], &val4); + if (!SWIG_IsOK(ecode4)) { + SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "vpi_put_value" "', argument " "4"" of type '" "PLI_INT32""'"); + } + arg4 = (PLI_INT32)(val4); + result = (vpiHandle)vpi_put_value(arg1,arg2,arg3,arg4); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_get_time(int argc, VALUE *argv, VALUE self) { - vpiHandle arg1 = (vpiHandle) 0 ; - p_vpi_time arg2 = (p_vpi_time) 0 ; - - if ((argc < 2) || (argc > 2)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_unsigned_int, 0); - SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_t_vpi_time, 0); - vpi_get_time(arg1,arg2); - - return Qnil; + vpiHandle arg1 = (vpiHandle) 0 ; + p_vpi_time arg2 = (p_vpi_time) 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_get_time" "', argument " "1"" of type '" "vpiHandle""'"); + } + arg1 = (vpiHandle)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_t_vpi_time, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_get_time" "', argument " "2"" of type '" "p_vpi_time""'"); + } + arg2 = (p_vpi_time)(argp2); + vpi_get_time(arg1,arg2); + + return Qnil; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_mcd_open(int argc, VALUE *argv, VALUE self) { - PLI_BYTE8 *arg1 = (PLI_BYTE8 *) 0 ; - PLI_UINT32 result; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - arg1 = StringValuePtr(argv[0]); - result = (PLI_UINT32)vpi_mcd_open(arg1); - - vresult = UINT2NUM(result); - return vresult; + PLI_BYTE8 *arg1 = (PLI_BYTE8 *) 0 ; + PLI_UINT32 result; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_mcd_open" "', argument " "1"" of type '" "PLI_BYTE8 *""'"); + } + arg1 = buf1; + result = (PLI_UINT32)vpi_mcd_open(arg1); + + vresult = SWIG_From_unsigned_SS_int((unsigned int)(result)); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return vresult; +fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_mcd_close(int argc, VALUE *argv, VALUE self) { - PLI_UINT32 arg1 ; - PLI_UINT32 result; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - arg1 = NUM2UINT(argv[0]); - result = (PLI_UINT32)vpi_mcd_close(arg1); - - vresult = UINT2NUM(result); - return vresult; + PLI_UINT32 arg1 ; + PLI_UINT32 result; + unsigned int val1 ; + int ecode1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vpi_mcd_close" "', argument " "1"" of type '" "PLI_UINT32""'"); + } + arg1 = (PLI_UINT32)(val1); + result = (PLI_UINT32)vpi_mcd_close(arg1); + + vresult = SWIG_From_unsigned_SS_int((unsigned int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_mcd_name(int argc, VALUE *argv, VALUE self) { - PLI_UINT32 arg1 ; - PLI_BYTE8 *result; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - arg1 = NUM2UINT(argv[0]); - result = (PLI_BYTE8 *)vpi_mcd_name(arg1); - - vresult = rb_str_new2(result); - return vresult; + PLI_UINT32 arg1 ; + PLI_BYTE8 *result = 0 ; + unsigned int val1 ; + int ecode1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vpi_mcd_name" "', argument " "1"" of type '" "PLI_UINT32""'"); + } + arg1 = (PLI_UINT32)(val1); + result = (PLI_BYTE8 *)vpi_mcd_name(arg1); + + vresult = SWIG_FromCharPtr(result); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_mcd_printf(int argc, VALUE *argv, VALUE self) { - PLI_UINT32 arg1 ; - PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; - void *arg3 = 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if (argc < 2) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); - arg1 = NUM2UINT(argv[0]); - arg2 = StringValuePtr(argv[1]); - result = (PLI_INT32)vpi_mcd_printf(arg1,arg2,arg3); - - vresult = INT2NUM(result); - return vresult; + PLI_UINT32 arg1 ; + PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; + void *arg3 = 0 ; + PLI_INT32 result; + unsigned int val1 ; + int ecode1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + VALUE vresult = Qnil; + + if (argc < 2) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vpi_mcd_printf" "', argument " "1"" of type '" "PLI_UINT32""'"); + } + arg1 = (PLI_UINT32)(val1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_mcd_printf" "', argument " "2"" of type '" "PLI_BYTE8 *""'"); + } + arg2 = buf2; + result = (PLI_INT32)vpi_mcd_printf(arg1,arg2,arg3); + + vresult = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_printf(int argc, VALUE *argv, VALUE self) { - PLI_BYTE8 *arg1 = (PLI_BYTE8 *) 0 ; - void *arg2 = 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if (argc < 1) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - arg1 = StringValuePtr(argv[0]); - result = (PLI_INT32)vpi_printf(arg1,arg2); - - vresult = INT2NUM(result); - return vresult; + PLI_BYTE8 *arg1 = (PLI_BYTE8 *) 0 ; + void *arg2 = 0 ; + PLI_INT32 result; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + VALUE vresult = Qnil; + + if (argc < 1) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_printf" "', argument " "1"" of type '" "PLI_BYTE8 *""'"); + } + arg1 = buf1; + result = (PLI_INT32)vpi_printf(arg1,arg2); + + vresult = SWIG_From_int((int)(result)); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return vresult; +fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_compare_objects(int argc, VALUE *argv, VALUE self) { - vpiHandle arg1 = (vpiHandle) 0 ; - vpiHandle arg2 = (vpiHandle) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 2) || (argc > 2)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_unsigned_int, 0); - SWIG_ConvertPtr(argv[1], (void **) &arg2, SWIGTYPE_p_unsigned_int, 0); - result = (PLI_INT32)vpi_compare_objects(arg1,arg2); - - vresult = INT2NUM(result); - return vresult; + vpiHandle arg1 = (vpiHandle) 0 ; + vpiHandle arg2 = (vpiHandle) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + void *argp2 = 0 ; + int res2 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_compare_objects" "', argument " "1"" of type '" "vpiHandle""'"); + } + arg1 = (vpiHandle)(argp1); + res2 = SWIG_ConvertPtr(argv[1], &argp2,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_compare_objects" "', argument " "2"" of type '" "vpiHandle""'"); + } + arg2 = (vpiHandle)(argp2); + result = (PLI_INT32)vpi_compare_objects(arg1,arg2); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_chk_error(int argc, VALUE *argv, VALUE self) { - p_vpi_error_info arg1 = (p_vpi_error_info) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_t_vpi_error_info, 0); - result = (PLI_INT32)vpi_chk_error(arg1); - - vresult = INT2NUM(result); - return vresult; + p_vpi_error_info arg1 = (p_vpi_error_info) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_t_vpi_error_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_chk_error" "', argument " "1"" of type '" "p_vpi_error_info""'"); + } + arg1 = (p_vpi_error_info)(argp1); + result = (PLI_INT32)vpi_chk_error(arg1); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_free_object(int argc, VALUE *argv, VALUE self) { - vpiHandle arg1 = (vpiHandle) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_unsigned_int, 0); - result = (PLI_INT32)vpi_free_object(arg1); - - vresult = INT2NUM(result); - return vresult; + vpiHandle arg1 = (vpiHandle) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_free_object" "', argument " "1"" of type '" "vpiHandle""'"); + } + arg1 = (vpiHandle)(argp1); + result = (PLI_INT32)vpi_free_object(arg1); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_get_vlog_info(int argc, VALUE *argv, VALUE self) { - p_vpi_vlog_info arg1 = (p_vpi_vlog_info) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_t_vpi_vlog_info, 0); - result = (PLI_INT32)vpi_get_vlog_info(arg1); - - vresult = INT2NUM(result); - return vresult; + p_vpi_vlog_info arg1 = (p_vpi_vlog_info) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_t_vpi_vlog_info, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_get_vlog_info" "', argument " "1"" of type '" "p_vpi_vlog_info""'"); + } + arg1 = (p_vpi_vlog_info)(argp1); + result = (PLI_INT32)vpi_get_vlog_info(arg1); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_get_data(int argc, VALUE *argv, VALUE self) { - PLI_INT32 arg1 ; - PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; - PLI_INT32 arg3 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 3) || (argc > 3)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); - arg1 = NUM2INT(argv[0]); - arg2 = StringValuePtr(argv[1]); - arg3 = NUM2INT(argv[2]); - result = (PLI_INT32)vpi_get_data(arg1,arg2,arg3); - - vresult = INT2NUM(result); - return vresult; + PLI_INT32 arg1 ; + PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; + PLI_INT32 arg3 ; + PLI_INT32 result; + int val1 ; + int ecode1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vpi_get_data" "', argument " "1"" of type '" "PLI_INT32""'"); + } + arg1 = (PLI_INT32)(val1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_get_data" "', argument " "2"" of type '" "PLI_BYTE8 *""'"); + } + arg2 = buf2; + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vpi_get_data" "', argument " "3"" of type '" "PLI_INT32""'"); + } + arg3 = (PLI_INT32)(val3); + result = (PLI_INT32)vpi_get_data(arg1,arg2,arg3); + + vresult = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_put_data(int argc, VALUE *argv, VALUE self) { - PLI_INT32 arg1 ; - PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; - PLI_INT32 arg3 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 3) || (argc > 3)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); - arg1 = NUM2INT(argv[0]); - arg2 = StringValuePtr(argv[1]); - arg3 = NUM2INT(argv[2]); - result = (PLI_INT32)vpi_put_data(arg1,arg2,arg3); - - vresult = INT2NUM(result); - return vresult; + PLI_INT32 arg1 ; + PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; + PLI_INT32 arg3 ; + PLI_INT32 result; + int val1 ; + int ecode1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vpi_put_data" "', argument " "1"" of type '" "PLI_INT32""'"); + } + arg1 = (PLI_INT32)(val1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_put_data" "', argument " "2"" of type '" "PLI_BYTE8 *""'"); + } + arg2 = buf2; + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vpi_put_data" "', argument " "3"" of type '" "PLI_INT32""'"); + } + arg3 = (PLI_INT32)(val3); + result = (PLI_INT32)vpi_put_data(arg1,arg2,arg3); + + vresult = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_get_userdata(int argc, VALUE *argv, VALUE self) { - vpiHandle arg1 = (vpiHandle) 0 ; - void *result; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_unsigned_int, 0); - result = (void *)vpi_get_userdata(arg1); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_void,0); - return vresult; + vpiHandle arg1 = (vpiHandle) 0 ; + void *result = 0 ; + void *argp1 = 0 ; + int res1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_get_userdata" "', argument " "1"" of type '" "vpiHandle""'"); + } + arg1 = (vpiHandle)(argp1); + result = (void *)vpi_get_userdata(arg1); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_put_userdata(int argc, VALUE *argv, VALUE self) { - vpiHandle arg1 = (vpiHandle) 0 ; - void *arg2 = (void *) 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 2) || (argc > 2)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_unsigned_int, 0); - SWIG_ConvertPtr(argv[1], (void **) &arg2, 0, SWIG_POINTER_EXCEPTION|0); - result = (PLI_INT32)vpi_put_userdata(arg1,arg2); - - vresult = INT2NUM(result); - return vresult; + vpiHandle arg1 = (vpiHandle) 0 ; + void *arg2 = (void *) 0 ; + PLI_INT32 result; + void *argp1 = 0 ; + int res1 = 0 ; + int res2 ; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_put_userdata" "', argument " "1"" of type '" "vpiHandle""'"); + } + arg1 = (vpiHandle)(argp1); + res2 = SWIG_ConvertPtr(argv[1],SWIG_as_voidptrptr(&arg2), 0, 0); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_put_userdata" "', argument " "2"" of type '" "void *""'"); + } + result = (PLI_INT32)vpi_put_userdata(arg1,arg2); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_vprintf(int argc, VALUE *argv, VALUE self) { - PLI_BYTE8 *arg1 = (PLI_BYTE8 *) 0 ; - int arg2 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 2) || (argc > 2)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); - arg1 = StringValuePtr(argv[0]); - arg2 = NUM2INT(argv[1]); - result = (PLI_INT32)vpi_vprintf(arg1,arg2); - - vresult = INT2NUM(result); - return vresult; + PLI_BYTE8 *arg1 = (PLI_BYTE8 *) 0 ; + int arg2 ; + PLI_INT32 result; + int res1 ; + char *buf1 = 0 ; + int alloc1 = 0 ; + int val2 ; + int ecode2 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 2) || (argc > 2)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail; + } + res1 = SWIG_AsCharPtrAndSize(argv[0], &buf1, NULL, &alloc1); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_vprintf" "', argument " "1"" of type '" "PLI_BYTE8 *""'"); + } + arg1 = buf1; + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vpi_vprintf" "', argument " "2"" of type '" "int""'"); + } + arg2 = (int)(val2); + result = (PLI_INT32)vpi_vprintf(arg1,arg2); + + vresult = SWIG_From_int((int)(result)); + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return vresult; +fail: + if (alloc1 == SWIG_NEWOBJ) free((char*)buf1); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_mcd_vprintf(int argc, VALUE *argv, VALUE self) { - PLI_UINT32 arg1 ; - PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; - int arg3 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 3) || (argc > 3)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); - arg1 = NUM2UINT(argv[0]); - arg2 = StringValuePtr(argv[1]); - arg3 = NUM2INT(argv[2]); - result = (PLI_INT32)vpi_mcd_vprintf(arg1,arg2,arg3); - - vresult = INT2NUM(result); - return vresult; + PLI_UINT32 arg1 ; + PLI_BYTE8 *arg2 = (PLI_BYTE8 *) 0 ; + int arg3 ; + PLI_INT32 result; + unsigned int val1 ; + int ecode1 = 0 ; + int res2 ; + char *buf2 = 0 ; + int alloc2 = 0 ; + int val3 ; + int ecode3 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vpi_mcd_vprintf" "', argument " "1"" of type '" "PLI_UINT32""'"); + } + arg1 = (PLI_UINT32)(val1); + res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2); + if (!SWIG_IsOK(res2)) { + SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "vpi_mcd_vprintf" "', argument " "2"" of type '" "PLI_BYTE8 *""'"); + } + arg2 = buf2; + ecode3 = SWIG_AsVal_int(argv[2], &val3); + if (!SWIG_IsOK(ecode3)) { + SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "vpi_mcd_vprintf" "', argument " "3"" of type '" "int""'"); + } + arg3 = (int)(val3); + result = (PLI_INT32)vpi_mcd_vprintf(arg1,arg2,arg3); + + vresult = SWIG_From_int((int)(result)); + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return vresult; +fail: + if (alloc2 == SWIG_NEWOBJ) free((char*)buf2); + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_flush(int argc, VALUE *argv, VALUE self) { - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 0) || (argc > 0)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); - result = (PLI_INT32)vpi_flush(); - - vresult = INT2NUM(result); - return vresult; + PLI_INT32 result; + VALUE vresult = Qnil; + + if ((argc < 0) || (argc > 0)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 0)",argc); SWIG_fail; + } + result = (PLI_INT32)vpi_flush(); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_mcd_flush(int argc, VALUE *argv, VALUE self) { - PLI_UINT32 arg1 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if ((argc < 1) || (argc > 1)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - arg1 = NUM2UINT(argv[0]); - result = (PLI_INT32)vpi_mcd_flush(arg1); - - vresult = INT2NUM(result); - return vresult; + PLI_UINT32 arg1 ; + PLI_INT32 result; + unsigned int val1 ; + int ecode1 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 1) || (argc > 1)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_unsigned_SS_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vpi_mcd_flush" "', argument " "1"" of type '" "PLI_UINT32""'"); + } + arg1 = (PLI_UINT32)(val1); + result = (PLI_INT32)vpi_mcd_flush(arg1); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_control(int argc, VALUE *argv, VALUE self) { - PLI_INT32 arg1 ; - void *arg2 = 0 ; - PLI_INT32 result; - VALUE vresult = Qnil; - - if (argc < 1) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); - arg1 = NUM2INT(argv[0]); - result = (PLI_INT32)vpi_control(arg1,arg2); - - vresult = INT2NUM(result); - return vresult; + PLI_INT32 arg1 ; + void *arg2 = 0 ; + PLI_INT32 result; + int val1 ; + int ecode1 = 0 ; + VALUE vresult = Qnil; + + if (argc < 1) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 1)",argc); SWIG_fail; + } + ecode1 = SWIG_AsVal_int(argv[0], &val1); + if (!SWIG_IsOK(ecode1)) { + SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "vpi_control" "', argument " "1"" of type '" "PLI_INT32""'"); + } + arg1 = (PLI_INT32)(val1); + result = (PLI_INT32)vpi_control(arg1,arg2); + + vresult = SWIG_From_int((int)(result)); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE _wrap_vpi_handle_by_multi_index(int argc, VALUE *argv, VALUE self) { - vpiHandle arg1 = (vpiHandle) 0 ; - PLI_INT32 arg2 ; - PLI_INT32 *arg3 = (PLI_INT32 *) 0 ; - vpiHandle result; - VALUE vresult = Qnil; - - if ((argc < 3) || (argc > 3)) - rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); - SWIG_ConvertPtr(argv[0], (void **) &arg1, SWIGTYPE_p_unsigned_int, 0); - arg2 = NUM2INT(argv[1]); - SWIG_ConvertPtr(argv[2], (void **) &arg3, SWIGTYPE_p_int, 0); - result = (vpiHandle)vpi_handle_by_multi_index(arg1,arg2,arg3); - - vresult = SWIG_NewPointerObj((void *) result, SWIGTYPE_p_unsigned_int,0); - return vresult; + vpiHandle arg1 = (vpiHandle) 0 ; + PLI_INT32 arg2 ; + PLI_INT32 *arg3 = (PLI_INT32 *) 0 ; + vpiHandle result; + void *argp1 = 0 ; + int res1 = 0 ; + int val2 ; + int ecode2 = 0 ; + void *argp3 = 0 ; + int res3 = 0 ; + VALUE vresult = Qnil; + + if ((argc < 3) || (argc > 3)) { + rb_raise(rb_eArgError, "wrong # of arguments(%d for 3)",argc); SWIG_fail; + } + res1 = SWIG_ConvertPtr(argv[0], &argp1,SWIGTYPE_p_unsigned_int, 0 | 0 ); + if (!SWIG_IsOK(res1)) { + SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "vpi_handle_by_multi_index" "', argument " "1"" of type '" "vpiHandle""'"); + } + arg1 = (vpiHandle)(argp1); + ecode2 = SWIG_AsVal_int(argv[1], &val2); + if (!SWIG_IsOK(ecode2)) { + SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "vpi_handle_by_multi_index" "', argument " "2"" of type '" "PLI_INT32""'"); + } + arg2 = (PLI_INT32)(val2); + res3 = SWIG_ConvertPtr(argv[2], &argp3,SWIGTYPE_p_int, 0 | 0 ); + if (!SWIG_IsOK(res3)) { + SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "vpi_handle_by_multi_index" "', argument " "3"" of type '" "PLI_INT32 *""'"); + } + arg3 = (PLI_INT32 *)(argp3); + result = (vpiHandle)vpi_handle_by_multi_index(arg1,arg2,arg3); + + vresult = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_int, 0 | 0 ); + return vresult; +fail: + return Qnil; } -static VALUE +SWIGINTERN VALUE vlog_startup_routines_get(VALUE self) { - VALUE _val; - - _val = SWIG_NewPointerObj((void *) vlog_startup_routines, SWIGTYPE_p_p_f___void,0); return _val; + VALUE _val; + + _val = SWIG_NewPointerObj(SWIG_as_voidptr(vlog_startup_routines), SWIGTYPE_p_p_f___void, 0 ); + return _val; } -static VALUE +SWIGINTERN VALUE vlog_startup_routines_set(VALUE self, VALUE _val) { - { - rb_raise(rb_eTypeError, "C/C++ variable 'vlog_startup_routines' is readonly"); - } - return _val; + SWIG_exception_fail(SWIG_ArgError(SWIG_AttributeError), "in variable '""read-only vlog_startup_routines""' of type '""void (*[])()""'"); + return _val; +fail: + return Qnil; } /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */ -static swig_type_info _swigt__p_char = {"_p_char", "char *|PLI_BYTE8 *", 0, 0, 0}; -static swig_type_info _swigt__p_f_p_char__int = {"_p_f_p_char__int", "int (*)(char *)|PLI_INT32 (*)(PLI_BYTE8 *)", 0, 0, 0}; -static swig_type_info _swigt__p_f_p_struct_t_cb_data__int = {"_p_f_p_struct_t_cb_data__int", "int (*)(struct t_cb_data *)|PLI_INT32 (*)(struct t_cb_data *)", 0, 0, 0}; -static swig_type_info _swigt__p_int = {"_p_int", "int *|PLI_INT32 *", 0, 0, 0}; -static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **|PLI_BYTE8 **", 0, 0, 0}; -static swig_type_info _swigt__p_p_f___void = {"_p_p_f___void", "void (**)()", 0, 0, 0}; -static swig_type_info _swigt__p_s_vpi_value_value = {"_p_s_vpi_value_value", "s_vpi_value_value *", 0, 0, 0}; -static swig_type_info _swigt__p_short = {"_p_short", "short *|PLI_INT16 *", 0, 0, 0}; -static swig_type_info _swigt__p_t_cb_data = {"_p_t_cb_data", "struct t_cb_data *|p_cb_data", 0, 0, 0}; -static swig_type_info _swigt__p_t_vpi_delay = {"_p_t_vpi_delay", "struct t_vpi_delay *|p_vpi_delay", 0, 0, 0}; -static swig_type_info _swigt__p_t_vpi_error_info = {"_p_t_vpi_error_info", "struct t_vpi_error_info *|p_vpi_error_info", 0, 0, 0}; -static swig_type_info _swigt__p_t_vpi_strengthval = {"_p_t_vpi_strengthval", "struct t_vpi_strengthval *", 0, 0, 0}; -static swig_type_info _swigt__p_t_vpi_systf_data = {"_p_t_vpi_systf_data", "struct t_vpi_systf_data *|p_vpi_systf_data", 0, 0, 0}; -static swig_type_info _swigt__p_t_vpi_time = {"_p_t_vpi_time", "struct t_vpi_time *|p_vpi_time", 0, 0, 0}; -static swig_type_info _swigt__p_t_vpi_value = {"_p_t_vpi_value", "struct t_vpi_value *|p_vpi_value", 0, 0, 0}; -static swig_type_info _swigt__p_t_vpi_vecval = {"_p_t_vpi_vecval", "struct t_vpi_vecval *", 0, 0, 0}; -static swig_type_info _swigt__p_t_vpi_vlog_info = {"_p_t_vpi_vlog_info", "struct t_vpi_vlog_info *|p_vpi_vlog_info", 0, 0, 0}; -static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|PLI_UBYTE8 *", 0, 0, 0}; -static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|vpiHandle", 0, 0, 0}; -static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "unsigned long *|VALUE *", 0, 0, 0}; -static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|PLI_UINT16 *", 0, 0, 0}; -static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, 0}; +static swig_type_info _swigt__p_char = {"_p_char", "char *|PLI_BYTE8 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_p_char__int = {"_p_f_p_char__int", "int (*)(char *)|PLI_INT32 (*)(PLI_BYTE8 *)", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_f_p_struct_t_cb_data__int = {"_p_f_p_struct_t_cb_data__int", "int (*)(struct t_cb_data *)|PLI_INT32 (*)(struct t_cb_data *)", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_int = {"_p_int", "int *|PLI_INT32 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **|PLI_BYTE8 **", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_p_f___void = {"_p_p_f___void", "void (**)()", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_s_vpi_value_value = {"_p_s_vpi_value_value", "s_vpi_value_value *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_short = {"_p_short", "short *|PLI_INT16 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_t_cb_data = {"_p_t_cb_data", "struct t_cb_data *|p_cb_data", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_t_vpi_delay = {"_p_t_vpi_delay", "struct t_vpi_delay *|p_vpi_delay", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_t_vpi_error_info = {"_p_t_vpi_error_info", "struct t_vpi_error_info *|p_vpi_error_info", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_t_vpi_strengthval = {"_p_t_vpi_strengthval", "struct t_vpi_strengthval *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_t_vpi_systf_data = {"_p_t_vpi_systf_data", "struct t_vpi_systf_data *|p_vpi_systf_data", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_t_vpi_time = {"_p_t_vpi_time", "struct t_vpi_time *|p_vpi_time", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_t_vpi_value = {"_p_t_vpi_value", "struct t_vpi_value *|p_vpi_value", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_t_vpi_vecval = {"_p_t_vpi_vecval", "struct t_vpi_vecval *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_t_vpi_vlog_info = {"_p_t_vpi_vlog_info", "struct t_vpi_vlog_info *|p_vpi_vlog_info", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|PLI_UBYTE8 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *|vpiHandle", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_unsigned_short = {"_p_unsigned_short", "unsigned short *|PLI_UINT16 *", 0, 0, (void*)0, 0}; +static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0}; static swig_type_info *swig_type_initial[] = { &_swigt__p_char, &_swigt__p_f_p_char__int, &_swigt__p_f_p_struct_t_cb_data__int, @@ -3737,11 +6188,10 @@ &_swigt__p_t_vpi_value, &_swigt__p_t_vpi_vecval, &_swigt__p_t_vpi_vlog_info, &_swigt__p_unsigned_char, &_swigt__p_unsigned_int, - &_swigt__p_unsigned_long, &_swigt__p_unsigned_short, &_swigt__p_void, }; static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}}; @@ -3761,11 +6211,10 @@ static swig_cast_info _swigc__p_t_vpi_value[] = { {&_swigt__p_t_vpi_value, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_t_vpi_vecval[] = { {&_swigt__p_t_vpi_vecval, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_t_vpi_vlog_info[] = { {&_swigt__p_t_vpi_vlog_info, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_int[] = { {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}}; -static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_unsigned_short[] = { {&_swigt__p_unsigned_short, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}}; static swig_cast_info *swig_cast_initial[] = { _swigc__p_char, @@ -3785,11 +6234,10 @@ _swigc__p_t_vpi_value, _swigc__p_t_vpi_vecval, _swigc__p_t_vpi_vlog_info, _swigc__p_unsigned_char, _swigc__p_unsigned_int, - _swigc__p_unsigned_long, _swigc__p_unsigned_short, _swigc__p_void, }; @@ -3836,16 +6284,21 @@ * be correct. **/ #ifdef __cplusplus extern "C" { +#if 0 +} /* c-mode */ #endif +#endif +#if 0 +#define SWIGRUNTIME_DEBUG +#endif + SWIGRUNTIME void SWIG_InitializeModule(void *clientdata) { - swig_type_info *type, *ret; - swig_cast_info *cast; size_t i; swig_module_info *module_head; static int init_run = 0; clientdata = clientdata; @@ -3867,53 +6320,105 @@ swig_module.next = &swig_module; SWIG_SetModule(clientdata, &swig_module); } /* Now work on filling in swig_module.types */ +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: size %d\n", swig_module.size); +#endif for (i = 0; i < swig_module.size; ++i) { - type = 0; + swig_type_info *type = 0; + swig_type_info *ret; + swig_cast_info *cast; + +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); +#endif /* if there is another module already loaded */ if (swig_module.next != &swig_module) { type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name); } if (type) { /* Overwrite clientdata field */ - if (swig_module.type_initial[i]->clientdata) type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found type %s\n", type->name); +#endif + if (swig_module.type_initial[i]->clientdata) { + type->clientdata = swig_module.type_initial[i]->clientdata; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name); +#endif + } } else { type = swig_module.type_initial[i]; } /* Insert casting types */ cast = swig_module.cast_initial[i]; while (cast->type) { /* Don't need to add information already in the list */ ret = 0; +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: look cast %s\n", cast->type->name); +#endif if (swig_module.next != &swig_module) { ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name); +#ifdef SWIGRUNTIME_DEBUG + if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name); +#endif } - if (ret && type == swig_module.type_initial[i]) { - cast->type = ret; - ret = 0; + if (ret) { + if (type == swig_module.type_initial[i]) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: skip old type %s\n", ret->name); +#endif + cast->type = ret; + ret = 0; + } else { + /* Check for casting already in the list */ + swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type); +#ifdef SWIGRUNTIME_DEBUG + if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name); +#endif + if (!ocast) ret = 0; + } } - + if (!ret) { +#ifdef SWIGRUNTIME_DEBUG + printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name); +#endif if (type->cast) { type->cast->prev = cast; cast->next = type->cast; } type->cast = cast; } - cast++; } - /* Set entry in modules->types array equal to the type */ swig_module.types[i] = type; } swig_module.types[i] = 0; + +#ifdef SWIGRUNTIME_DEBUG + printf("**** SWIG_InitializeModule: Cast List ******\n"); + for (i = 0; i < swig_module.size; ++i) { + int j = 0; + swig_cast_info *cast = swig_module.cast_initial[i]; + printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name); + while (cast->type) { + printf("SWIG_InitializeModule: cast type %s\n", cast->type->name); + cast++; + ++j; + } + printf("---- Total casts: %d\n",j); + } + printf("**** SWIG_InitializeModule: Cast List ******\n"); +#endif } /* This function will propagate the clientdata field of type to * any new swig_type_info structures that have been added into the list * of equivalent types. It is like calling @@ -3941,673 +6446,686 @@ } } } #ifdef __cplusplus +#if 0 +{ /* c-mode */ +#endif } #endif #ifdef __cplusplus extern "C" #endif SWIGEXPORT void Init_vpi(void) { - size_t i; - - SWIG_InitRuntime(); - mVpi = rb_define_module("Vpi"); - - SWIG_InitializeModule(0); - for (i = 0; i < swig_module.size; i++) { - SWIG_define_class(swig_module.types[i]); - } - - SWIG_RubyInitializeTrackings(); - rb_define_const(mVpi,"VpiAlways", INT2NUM(1)); - rb_define_const(mVpi,"VpiAssignStmt", INT2NUM(2)); - rb_define_const(mVpi,"VpiAssignment", INT2NUM(3)); - rb_define_const(mVpi,"VpiBegin", INT2NUM(4)); - rb_define_const(mVpi,"VpiCase", INT2NUM(5)); - rb_define_const(mVpi,"VpiCaseItem", INT2NUM(6)); - rb_define_const(mVpi,"VpiConstant", INT2NUM(7)); - rb_define_const(mVpi,"VpiContAssign", INT2NUM(8)); - rb_define_const(mVpi,"VpiDeassign", INT2NUM(9)); - rb_define_const(mVpi,"VpiDefParam", INT2NUM(10)); - rb_define_const(mVpi,"VpiDelayControl", INT2NUM(11)); - rb_define_const(mVpi,"VpiDisable", INT2NUM(12)); - rb_define_const(mVpi,"VpiEventControl", INT2NUM(13)); - rb_define_const(mVpi,"VpiEventStmt", INT2NUM(14)); - rb_define_const(mVpi,"VpiFor", INT2NUM(15)); - rb_define_const(mVpi,"VpiForce", INT2NUM(16)); - rb_define_const(mVpi,"VpiForever", INT2NUM(17)); - rb_define_const(mVpi,"VpiFork", INT2NUM(18)); - rb_define_const(mVpi,"VpiFuncCall", INT2NUM(19)); - rb_define_const(mVpi,"VpiFunction", INT2NUM(20)); - rb_define_const(mVpi,"VpiGate", INT2NUM(21)); - rb_define_const(mVpi,"VpiIf", INT2NUM(22)); - rb_define_const(mVpi,"VpiIfElse", INT2NUM(23)); - rb_define_const(mVpi,"VpiInitial", INT2NUM(24)); - rb_define_const(mVpi,"VpiIntegerVar", INT2NUM(25)); - rb_define_const(mVpi,"VpiInterModPath", INT2NUM(26)); - rb_define_const(mVpi,"VpiIterator", INT2NUM(27)); - rb_define_const(mVpi,"VpiIODecl", INT2NUM(28)); - rb_define_const(mVpi,"VpiMemory", INT2NUM(29)); - rb_define_const(mVpi,"VpiMemoryWord", INT2NUM(30)); - rb_define_const(mVpi,"VpiModPath", INT2NUM(31)); - rb_define_const(mVpi,"VpiModule", INT2NUM(32)); - rb_define_const(mVpi,"VpiNamedBegin", INT2NUM(33)); - rb_define_const(mVpi,"VpiNamedEvent", INT2NUM(34)); - rb_define_const(mVpi,"VpiNamedFork", INT2NUM(35)); - rb_define_const(mVpi,"VpiNet", INT2NUM(36)); - rb_define_const(mVpi,"VpiNetBit", INT2NUM(37)); - rb_define_const(mVpi,"VpiNullStmt", INT2NUM(38)); - rb_define_const(mVpi,"VpiOperation", INT2NUM(39)); - rb_define_const(mVpi,"VpiParamAssign", INT2NUM(40)); - rb_define_const(mVpi,"VpiParameter", INT2NUM(41)); - rb_define_const(mVpi,"VpiPartSelect", INT2NUM(42)); - rb_define_const(mVpi,"VpiPathTerm", INT2NUM(43)); - rb_define_const(mVpi,"VpiPort", INT2NUM(44)); - rb_define_const(mVpi,"VpiPortBit", INT2NUM(45)); - rb_define_const(mVpi,"VpiPrimTerm", INT2NUM(46)); - rb_define_const(mVpi,"VpiRealVar", INT2NUM(47)); - rb_define_const(mVpi,"VpiReg", INT2NUM(48)); - rb_define_const(mVpi,"VpiRegBit", INT2NUM(49)); - rb_define_const(mVpi,"VpiRelease", INT2NUM(50)); - rb_define_const(mVpi,"VpiRepeat", INT2NUM(51)); - rb_define_const(mVpi,"VpiRepeatControl", INT2NUM(52)); - rb_define_const(mVpi,"VpiSchedEvent", INT2NUM(53)); - rb_define_const(mVpi,"VpiSpecParam", INT2NUM(54)); - rb_define_const(mVpi,"VpiSwitch", INT2NUM(55)); - rb_define_const(mVpi,"VpiSysFuncCall", INT2NUM(56)); - rb_define_const(mVpi,"VpiSysTaskCall", INT2NUM(57)); - rb_define_const(mVpi,"VpiTableEntry", INT2NUM(58)); - rb_define_const(mVpi,"VpiTask", INT2NUM(59)); - rb_define_const(mVpi,"VpiTaskCall", INT2NUM(60)); - rb_define_const(mVpi,"VpiTchk", INT2NUM(61)); - rb_define_const(mVpi,"VpiTchkTerm", INT2NUM(62)); - rb_define_const(mVpi,"VpiTimeVar", INT2NUM(63)); - rb_define_const(mVpi,"VpiTimeQueue", INT2NUM(64)); - rb_define_const(mVpi,"VpiUdp", INT2NUM(65)); - rb_define_const(mVpi,"VpiUdpDefn", INT2NUM(66)); - rb_define_const(mVpi,"VpiUserSystf", INT2NUM(67)); - rb_define_const(mVpi,"VpiVarSelect", INT2NUM(68)); - rb_define_const(mVpi,"VpiWait", INT2NUM(69)); - rb_define_const(mVpi,"VpiWhile", INT2NUM(70)); - rb_define_const(mVpi,"VpiAttribute", INT2NUM(105)); - rb_define_const(mVpi,"VpiBitSelect", INT2NUM(106)); - rb_define_const(mVpi,"VpiCallback", INT2NUM(107)); - rb_define_const(mVpi,"VpiDelayTerm", INT2NUM(108)); - rb_define_const(mVpi,"VpiDelayDevice", INT2NUM(109)); - rb_define_const(mVpi,"VpiFrame", INT2NUM(110)); - rb_define_const(mVpi,"VpiGateArray", INT2NUM(111)); - rb_define_const(mVpi,"VpiModuleArray", INT2NUM(112)); - rb_define_const(mVpi,"VpiPrimitiveArray", INT2NUM(113)); - rb_define_const(mVpi,"VpiNetArray", INT2NUM(114)); - rb_define_const(mVpi,"VpiRange", INT2NUM(115)); - rb_define_const(mVpi,"VpiRegArray", INT2NUM(116)); - rb_define_const(mVpi,"VpiSwitchArray", INT2NUM(117)); - rb_define_const(mVpi,"VpiUdpArray", INT2NUM(118)); - rb_define_const(mVpi,"VpiContAssignBit", INT2NUM(128)); - rb_define_const(mVpi,"VpiNamedEventArray", INT2NUM(129)); - rb_define_const(mVpi,"VpiIndexedPartSelect", INT2NUM(130)); - rb_define_const(mVpi,"VpiGenScopeArray", INT2NUM(133)); - rb_define_const(mVpi,"VpiGenScope", INT2NUM(134)); - rb_define_const(mVpi,"VpiGenVar", INT2NUM(135)); - rb_define_const(mVpi,"VpiCondition", INT2NUM(71)); - rb_define_const(mVpi,"VpiDelay", INT2NUM(72)); - rb_define_const(mVpi,"VpiElseStmt", INT2NUM(73)); - rb_define_const(mVpi,"VpiForIncStmt", INT2NUM(74)); - rb_define_const(mVpi,"VpiForInitStmt", INT2NUM(75)); - rb_define_const(mVpi,"VpiHighConn", INT2NUM(76)); - rb_define_const(mVpi,"VpiLhs", INT2NUM(77)); - rb_define_const(mVpi,"VpiIndex", INT2NUM(78)); - rb_define_const(mVpi,"VpiLeftRange", INT2NUM(79)); - rb_define_const(mVpi,"VpiLowConn", INT2NUM(80)); - rb_define_const(mVpi,"VpiParent", INT2NUM(81)); - rb_define_const(mVpi,"VpiRhs", INT2NUM(82)); - rb_define_const(mVpi,"VpiRightRange", INT2NUM(83)); - rb_define_const(mVpi,"VpiScope", INT2NUM(84)); - rb_define_const(mVpi,"VpiSysTfCall", INT2NUM(85)); - rb_define_const(mVpi,"VpiTchkDataTerm", INT2NUM(86)); - rb_define_const(mVpi,"VpiTchkNotifier", INT2NUM(87)); - rb_define_const(mVpi,"VpiTchkRefTerm", INT2NUM(88)); - rb_define_const(mVpi,"VpiArgument", INT2NUM(89)); - rb_define_const(mVpi,"VpiBit", INT2NUM(90)); - rb_define_const(mVpi,"VpiDriver", INT2NUM(91)); - rb_define_const(mVpi,"VpiInternalScope", INT2NUM(92)); - rb_define_const(mVpi,"VpiLoad", INT2NUM(93)); - rb_define_const(mVpi,"VpiModDataPathIn", INT2NUM(94)); - rb_define_const(mVpi,"VpiModPathIn", INT2NUM(95)); - rb_define_const(mVpi,"VpiModPathOut", INT2NUM(96)); - rb_define_const(mVpi,"VpiOperand", INT2NUM(97)); - rb_define_const(mVpi,"VpiPortInst", INT2NUM(98)); - rb_define_const(mVpi,"VpiProcess", INT2NUM(99)); - rb_define_const(mVpi,"VpiVariables", INT2NUM(100)); - rb_define_const(mVpi,"VpiUse", INT2NUM(101)); - rb_define_const(mVpi,"VpiExpr", INT2NUM(102)); - rb_define_const(mVpi,"VpiPrimitive", INT2NUM(103)); - rb_define_const(mVpi,"VpiStmt", INT2NUM(104)); - rb_define_const(mVpi,"VpiActiveTimeFormat", INT2NUM(119)); - rb_define_const(mVpi,"VpiInTerm", INT2NUM(120)); - rb_define_const(mVpi,"VpiInstanceArray", INT2NUM(121)); - rb_define_const(mVpi,"VpiLocalDriver", INT2NUM(122)); - rb_define_const(mVpi,"VpiLocalLoad", INT2NUM(123)); - rb_define_const(mVpi,"VpiOutTerm", INT2NUM(124)); - rb_define_const(mVpi,"VpiPorts", INT2NUM(125)); - rb_define_const(mVpi,"VpiSimNet", INT2NUM(126)); - rb_define_const(mVpi,"VpiTaskFunc", INT2NUM(127)); - rb_define_const(mVpi,"VpiBaseExpr", INT2NUM(131)); - rb_define_const(mVpi,"VpiWidthExpr", INT2NUM(132)); - rb_define_const(mVpi,"VpiUndefined", INT2NUM(-1)); - rb_define_const(mVpi,"VpiType", INT2NUM(1)); - rb_define_const(mVpi,"VpiName", INT2NUM(2)); - rb_define_const(mVpi,"VpiFullName", INT2NUM(3)); - rb_define_const(mVpi,"VpiSize", INT2NUM(4)); - rb_define_const(mVpi,"VpiFile", INT2NUM(5)); - rb_define_const(mVpi,"VpiLineNo", INT2NUM(6)); - rb_define_const(mVpi,"VpiTopModule", INT2NUM(7)); - rb_define_const(mVpi,"VpiCellInstance", INT2NUM(8)); - rb_define_const(mVpi,"VpiDefName", INT2NUM(9)); - rb_define_const(mVpi,"VpiProtected", INT2NUM(10)); - rb_define_const(mVpi,"VpiTimeUnit", INT2NUM(11)); - rb_define_const(mVpi,"VpiTimePrecision", INT2NUM(12)); - rb_define_const(mVpi,"VpiDefNetType", INT2NUM(13)); - rb_define_const(mVpi,"VpiUnconnDrive", INT2NUM(14)); - rb_define_const(mVpi,"VpiHighZ", INT2NUM(1)); - rb_define_const(mVpi,"VpiPull1", INT2NUM(2)); - rb_define_const(mVpi,"VpiPull0", INT2NUM(3)); - rb_define_const(mVpi,"VpiDefFile", INT2NUM(15)); - rb_define_const(mVpi,"VpiDefLineNo", INT2NUM(16)); - rb_define_const(mVpi,"VpiDefDelayMode", INT2NUM(47)); - rb_define_const(mVpi,"VpiDelayModeNone", INT2NUM(1)); - rb_define_const(mVpi,"VpiDelayModePath", INT2NUM(2)); - rb_define_const(mVpi,"VpiDelayModeDistrib", INT2NUM(3)); - rb_define_const(mVpi,"VpiDelayModeUnit", INT2NUM(4)); - rb_define_const(mVpi,"VpiDelayModeZero", INT2NUM(5)); - rb_define_const(mVpi,"VpiDelayModeMTM", INT2NUM(6)); - rb_define_const(mVpi,"VpiDefDecayTime", INT2NUM(48)); - rb_define_const(mVpi,"VpiScalar", INT2NUM(17)); - rb_define_const(mVpi,"VpiVector", INT2NUM(18)); - rb_define_const(mVpi,"VpiExplicitName", INT2NUM(19)); - rb_define_const(mVpi,"VpiDirection", INT2NUM(20)); - rb_define_const(mVpi,"VpiInput", INT2NUM(1)); - rb_define_const(mVpi,"VpiOutput", INT2NUM(2)); - rb_define_const(mVpi,"VpiInout", INT2NUM(3)); - rb_define_const(mVpi,"VpiMixedIO", INT2NUM(4)); - rb_define_const(mVpi,"VpiNoDirection", INT2NUM(5)); - rb_define_const(mVpi,"VpiConnByName", INT2NUM(21)); - rb_define_const(mVpi,"VpiNetType", INT2NUM(22)); - rb_define_const(mVpi,"VpiWire", INT2NUM(1)); - rb_define_const(mVpi,"VpiWand", INT2NUM(2)); - rb_define_const(mVpi,"VpiWor", INT2NUM(3)); - rb_define_const(mVpi,"VpiTri", INT2NUM(4)); - rb_define_const(mVpi,"VpiTri0", INT2NUM(5)); - rb_define_const(mVpi,"VpiTri1", INT2NUM(6)); - rb_define_const(mVpi,"VpiTriReg", INT2NUM(7)); - rb_define_const(mVpi,"VpiTriAnd", INT2NUM(8)); - rb_define_const(mVpi,"VpiTriOr", INT2NUM(9)); - rb_define_const(mVpi,"VpiSupply1", INT2NUM(10)); - rb_define_const(mVpi,"VpiSupply0", INT2NUM(11)); - rb_define_const(mVpi,"VpiNone", INT2NUM(12)); - rb_define_const(mVpi,"VpiUwire", INT2NUM(13)); - rb_define_const(mVpi,"VpiExplicitScalared", INT2NUM(23)); - rb_define_const(mVpi,"VpiExplicitVectored", INT2NUM(24)); - rb_define_const(mVpi,"VpiExpanded", INT2NUM(25)); - rb_define_const(mVpi,"VpiImplicitDecl", INT2NUM(26)); - rb_define_const(mVpi,"VpiChargeStrength", INT2NUM(27)); - rb_define_const(mVpi,"VpiArray", INT2NUM(28)); - rb_define_const(mVpi,"VpiPortIndex", INT2NUM(29)); - rb_define_const(mVpi,"VpiTermIndex", INT2NUM(30)); - rb_define_const(mVpi,"VpiStrength0", INT2NUM(31)); - rb_define_const(mVpi,"VpiStrength1", INT2NUM(32)); - rb_define_const(mVpi,"VpiPrimType", INT2NUM(33)); - rb_define_const(mVpi,"VpiAndPrim", INT2NUM(1)); - rb_define_const(mVpi,"VpiNandPrim", INT2NUM(2)); - rb_define_const(mVpi,"VpiNorPrim", INT2NUM(3)); - rb_define_const(mVpi,"VpiOrPrim", INT2NUM(4)); - rb_define_const(mVpi,"VpiXorPrim", INT2NUM(5)); - rb_define_const(mVpi,"VpiXnorPrim", INT2NUM(6)); - rb_define_const(mVpi,"VpiBufPrim", INT2NUM(7)); - rb_define_const(mVpi,"VpiNotPrim", INT2NUM(8)); - rb_define_const(mVpi,"VpiBufif0Prim", INT2NUM(9)); - rb_define_const(mVpi,"VpiBufif1Prim", INT2NUM(10)); - rb_define_const(mVpi,"VpiNotif0Prim", INT2NUM(11)); - rb_define_const(mVpi,"VpiNotif1Prim", INT2NUM(12)); - rb_define_const(mVpi,"VpiNmosPrim", INT2NUM(13)); - rb_define_const(mVpi,"VpiPmosPrim", INT2NUM(14)); - rb_define_const(mVpi,"VpiCmosPrim", INT2NUM(15)); - rb_define_const(mVpi,"VpiRnmosPrim", INT2NUM(16)); - rb_define_const(mVpi,"VpiRpmosPrim", INT2NUM(17)); - rb_define_const(mVpi,"VpiRcmosPrim", INT2NUM(18)); - rb_define_const(mVpi,"VpiRtranPrim", INT2NUM(19)); - rb_define_const(mVpi,"VpiRtranif0Prim", INT2NUM(20)); - rb_define_const(mVpi,"VpiRtranif1Prim", INT2NUM(21)); - rb_define_const(mVpi,"VpiTranPrim", INT2NUM(22)); - rb_define_const(mVpi,"VpiTranif0Prim", INT2NUM(23)); - rb_define_const(mVpi,"VpiTranif1Prim", INT2NUM(24)); - rb_define_const(mVpi,"VpiPullupPrim", INT2NUM(25)); - rb_define_const(mVpi,"VpiPulldownPrim", INT2NUM(26)); - rb_define_const(mVpi,"VpiSeqPrim", INT2NUM(27)); - rb_define_const(mVpi,"VpiCombPrim", INT2NUM(28)); - rb_define_const(mVpi,"VpiPolarity", INT2NUM(34)); - rb_define_const(mVpi,"VpiDataPolarity", INT2NUM(35)); - rb_define_const(mVpi,"VpiPositive", INT2NUM(1)); - rb_define_const(mVpi,"VpiNegative", INT2NUM(2)); - rb_define_const(mVpi,"VpiUnknown", INT2NUM(3)); - rb_define_const(mVpi,"VpiEdge", INT2NUM(36)); - rb_define_const(mVpi,"VpiNoEdge", INT2NUM(0x00)); - rb_define_const(mVpi,"VpiEdge01", INT2NUM(0x01)); - rb_define_const(mVpi,"VpiEdge10", INT2NUM(0x02)); - rb_define_const(mVpi,"VpiEdge0x", INT2NUM(0x04)); - rb_define_const(mVpi,"VpiEdgex1", INT2NUM(0x08)); - rb_define_const(mVpi,"VpiEdge1x", INT2NUM(0x10)); - rb_define_const(mVpi,"VpiEdgex0", INT2NUM(0x20)); - rb_define_const(mVpi,"VpiPosedge", INT2NUM((0x08|0x01|0x04))); - rb_define_const(mVpi,"VpiNegedge", INT2NUM((0x20|0x02|0x10))); - rb_define_const(mVpi,"VpiAnyEdge", INT2NUM(((0x08|0x01|0x04)|(0x20|0x02|0x10)))); - rb_define_const(mVpi,"VpiPathType", INT2NUM(37)); - rb_define_const(mVpi,"VpiPathFull", INT2NUM(1)); - rb_define_const(mVpi,"VpiPathParallel", INT2NUM(2)); - rb_define_const(mVpi,"VpiTchkType", INT2NUM(38)); - rb_define_const(mVpi,"VpiSetup", INT2NUM(1)); - rb_define_const(mVpi,"VpiHold", INT2NUM(2)); - rb_define_const(mVpi,"VpiPeriod", INT2NUM(3)); - rb_define_const(mVpi,"VpiWidth", INT2NUM(4)); - rb_define_const(mVpi,"VpiSkew", INT2NUM(5)); - rb_define_const(mVpi,"VpiRecovery", INT2NUM(6)); - rb_define_const(mVpi,"VpiNoChange", INT2NUM(7)); - rb_define_const(mVpi,"VpiSetupHold", INT2NUM(8)); - rb_define_const(mVpi,"VpiFullskew", INT2NUM(9)); - rb_define_const(mVpi,"VpiRecrem", INT2NUM(10)); - rb_define_const(mVpi,"VpiRemoval", INT2NUM(11)); - rb_define_const(mVpi,"VpiTimeskew", INT2NUM(12)); - rb_define_const(mVpi,"VpiOpType", INT2NUM(39)); - rb_define_const(mVpi,"VpiMinusOp", INT2NUM(1)); - rb_define_const(mVpi,"VpiPlusOp", INT2NUM(2)); - rb_define_const(mVpi,"VpiNotOp", INT2NUM(3)); - rb_define_const(mVpi,"VpiBitNegOp", INT2NUM(4)); - rb_define_const(mVpi,"VpiUnaryAndOp", INT2NUM(5)); - rb_define_const(mVpi,"VpiUnaryNandOp", INT2NUM(6)); - rb_define_const(mVpi,"VpiUnaryOrOp", INT2NUM(7)); - rb_define_const(mVpi,"VpiUnaryNorOp", INT2NUM(8)); - rb_define_const(mVpi,"VpiUnaryXorOp", INT2NUM(9)); - rb_define_const(mVpi,"VpiUnaryXNorOp", INT2NUM(10)); - rb_define_const(mVpi,"VpiSubOp", INT2NUM(11)); - rb_define_const(mVpi,"VpiDivOp", INT2NUM(12)); - rb_define_const(mVpi,"VpiModOp", INT2NUM(13)); - rb_define_const(mVpi,"VpiEqOp", INT2NUM(14)); - rb_define_const(mVpi,"VpiNeqOp", INT2NUM(15)); - rb_define_const(mVpi,"VpiCaseEqOp", INT2NUM(16)); - rb_define_const(mVpi,"VpiCaseNeqOp", INT2NUM(17)); - rb_define_const(mVpi,"VpiGtOp", INT2NUM(18)); - rb_define_const(mVpi,"VpiGeOp", INT2NUM(19)); - rb_define_const(mVpi,"VpiLtOp", INT2NUM(20)); - rb_define_const(mVpi,"VpiLeOp", INT2NUM(21)); - rb_define_const(mVpi,"VpiLShiftOp", INT2NUM(22)); - rb_define_const(mVpi,"VpiRShiftOp", INT2NUM(23)); - rb_define_const(mVpi,"VpiAddOp", INT2NUM(24)); - rb_define_const(mVpi,"VpiMultOp", INT2NUM(25)); - rb_define_const(mVpi,"VpiLogAndOp", INT2NUM(26)); - rb_define_const(mVpi,"VpiLogOrOp", INT2NUM(27)); - rb_define_const(mVpi,"VpiBitAndOp", INT2NUM(28)); - rb_define_const(mVpi,"VpiBitOrOp", INT2NUM(29)); - rb_define_const(mVpi,"VpiBitXorOp", INT2NUM(30)); - rb_define_const(mVpi,"VpiBitXNorOp", INT2NUM(31)); - rb_define_const(mVpi,"VpiBitXnorOp", INT2NUM(31)); - rb_define_const(mVpi,"VpiConditionOp", INT2NUM(32)); - rb_define_const(mVpi,"VpiConcatOp", INT2NUM(33)); - rb_define_const(mVpi,"VpiMultiConcatOp", INT2NUM(34)); - rb_define_const(mVpi,"VpiEventOrOp", INT2NUM(35)); - rb_define_const(mVpi,"VpiNullOp", INT2NUM(36)); - rb_define_const(mVpi,"VpiListOp", INT2NUM(37)); - rb_define_const(mVpi,"VpiMinTypMaxOp", INT2NUM(38)); - rb_define_const(mVpi,"VpiPosedgeOp", INT2NUM(39)); - rb_define_const(mVpi,"VpiNegedgeOp", INT2NUM(40)); - rb_define_const(mVpi,"VpiArithLShiftOp", INT2NUM(41)); - rb_define_const(mVpi,"VpiArithRShiftOp", INT2NUM(42)); - rb_define_const(mVpi,"VpiPowerOp", INT2NUM(43)); - rb_define_const(mVpi,"VpiConstType", INT2NUM(40)); - rb_define_const(mVpi,"VpiDecConst", INT2NUM(1)); - rb_define_const(mVpi,"VpiRealConst", INT2NUM(2)); - rb_define_const(mVpi,"VpiBinaryConst", INT2NUM(3)); - rb_define_const(mVpi,"VpiOctConst", INT2NUM(4)); - rb_define_const(mVpi,"VpiHexConst", INT2NUM(5)); - rb_define_const(mVpi,"VpiStringConst", INT2NUM(6)); - rb_define_const(mVpi,"VpiIntConst", INT2NUM(7)); - rb_define_const(mVpi,"VpiBlocking", INT2NUM(41)); - rb_define_const(mVpi,"VpiCaseType", INT2NUM(42)); - rb_define_const(mVpi,"VpiCaseExact", INT2NUM(1)); - rb_define_const(mVpi,"VpiCaseX", INT2NUM(2)); - rb_define_const(mVpi,"VpiCaseZ", INT2NUM(3)); - rb_define_const(mVpi,"VpiNetDeclAssign", INT2NUM(43)); - rb_define_const(mVpi,"VpiFuncType", INT2NUM(44)); - rb_define_const(mVpi,"VpiIntFunc", INT2NUM(1)); - rb_define_const(mVpi,"VpiRealFunc", INT2NUM(2)); - rb_define_const(mVpi,"VpiTimeFunc", INT2NUM(3)); - rb_define_const(mVpi,"VpiSizedFunc", INT2NUM(4)); - rb_define_const(mVpi,"VpiSizedSignedFunc", INT2NUM(5)); - rb_define_const(mVpi,"VpiSysFuncType", INT2NUM(44)); - rb_define_const(mVpi,"VpiSysFuncInt", INT2NUM(1)); - rb_define_const(mVpi,"VpiSysFuncReal", INT2NUM(2)); - rb_define_const(mVpi,"VpiSysFuncTime", INT2NUM(3)); - rb_define_const(mVpi,"VpiSysFuncSized", INT2NUM(4)); - rb_define_const(mVpi,"VpiUserDefn", INT2NUM(45)); - rb_define_const(mVpi,"VpiScheduled", INT2NUM(46)); - rb_define_const(mVpi,"VpiActive", INT2NUM(49)); - rb_define_const(mVpi,"VpiAutomatic", INT2NUM(50)); - rb_define_const(mVpi,"VpiCell", INT2NUM(51)); - rb_define_const(mVpi,"VpiConfig", INT2NUM(52)); - rb_define_const(mVpi,"VpiConstantSelect", INT2NUM(53)); - rb_define_const(mVpi,"VpiDecompile", INT2NUM(54)); - rb_define_const(mVpi,"VpiDefAttribute", INT2NUM(55)); - rb_define_const(mVpi,"VpiDelayType", INT2NUM(56)); - rb_define_const(mVpi,"VpiModPathDelay", INT2NUM(1)); - rb_define_const(mVpi,"VpiInterModPathDelay", INT2NUM(2)); - rb_define_const(mVpi,"VpiMIPDelay", INT2NUM(3)); - rb_define_const(mVpi,"VpiIteratorType", INT2NUM(57)); - rb_define_const(mVpi,"VpiLibrary", INT2NUM(58)); - rb_define_const(mVpi,"VpiMultiArray", INT2NUM(59)); - rb_define_const(mVpi,"VpiOffset", INT2NUM(60)); - rb_define_const(mVpi,"VpiResolvedNetType", INT2NUM(61)); - rb_define_const(mVpi,"VpiSaveRestartID", INT2NUM(62)); - rb_define_const(mVpi,"VpiSaveRestartLocation", INT2NUM(63)); - rb_define_const(mVpi,"VpiValid", INT2NUM(64)); - rb_define_const(mVpi,"VpiSigned", INT2NUM(65)); - rb_define_const(mVpi,"VpiLocalParam", INT2NUM(70)); - rb_define_const(mVpi,"VpiModPathHasIfNone", INT2NUM(71)); - rb_define_const(mVpi,"VpiIndexedPartSelectType", INT2NUM(72)); - rb_define_const(mVpi,"VpiPosIndexed", INT2NUM(1)); - rb_define_const(mVpi,"VpiNegIndexed", INT2NUM(2)); - rb_define_const(mVpi,"VpiIsMemory", INT2NUM(73)); - rb_define_const(mVpi,"VpiStop", INT2NUM(66)); - rb_define_const(mVpi,"VpiFinish", INT2NUM(67)); - rb_define_const(mVpi,"VpiReset", INT2NUM(68)); - rb_define_const(mVpi,"VpiSetInteractiveScope", INT2NUM(69)); - rb_define_const(mVpi,"VPI_MCD_STDOUT", INT2NUM(0x00000001)); - - cS_vpi_time.klass = rb_define_class_under(mVpi, "S_vpi_time", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_t_vpi_time, (void *) &cS_vpi_time); - rb_define_alloc_func(cS_vpi_time.klass, _wrap_s_vpi_time_allocate); - rb_define_method(cS_vpi_time.klass, "initialize", _wrap_new_s_vpi_time, -1); - rb_define_method(cS_vpi_time.klass, "type=", _wrap_s_vpi_time_type_set, -1); - rb_define_method(cS_vpi_time.klass, "type", _wrap_s_vpi_time_type_get, -1); - rb_define_method(cS_vpi_time.klass, "high=", _wrap_s_vpi_time_high_set, -1); - rb_define_method(cS_vpi_time.klass, "high", _wrap_s_vpi_time_high_get, -1); - rb_define_method(cS_vpi_time.klass, "low=", _wrap_s_vpi_time_low_set, -1); - rb_define_method(cS_vpi_time.klass, "low", _wrap_s_vpi_time_low_get, -1); - rb_define_method(cS_vpi_time.klass, "real=", _wrap_s_vpi_time_real_set, -1); - rb_define_method(cS_vpi_time.klass, "real", _wrap_s_vpi_time_real_get, -1); - cS_vpi_time.mark = 0; - cS_vpi_time.destroy = (void (*)(void *)) free_s_vpi_time; - rb_define_const(mVpi,"VpiScaledRealTime", INT2NUM(1)); - rb_define_const(mVpi,"VpiSimTime", INT2NUM(2)); - rb_define_const(mVpi,"VpiSuppressTime", INT2NUM(3)); - - cS_vpi_delay.klass = rb_define_class_under(mVpi, "S_vpi_delay", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_t_vpi_delay, (void *) &cS_vpi_delay); - rb_define_alloc_func(cS_vpi_delay.klass, _wrap_s_vpi_delay_allocate); - rb_define_method(cS_vpi_delay.klass, "initialize", _wrap_new_s_vpi_delay, -1); - rb_define_method(cS_vpi_delay.klass, "da=", _wrap_s_vpi_delay_da_set, -1); - rb_define_method(cS_vpi_delay.klass, "da", _wrap_s_vpi_delay_da_get, -1); - rb_define_method(cS_vpi_delay.klass, "no_of_delays=", _wrap_s_vpi_delay_no_of_delays_set, -1); - rb_define_method(cS_vpi_delay.klass, "no_of_delays", _wrap_s_vpi_delay_no_of_delays_get, -1); - rb_define_method(cS_vpi_delay.klass, "time_type=", _wrap_s_vpi_delay_time_type_set, -1); - rb_define_method(cS_vpi_delay.klass, "time_type", _wrap_s_vpi_delay_time_type_get, -1); - rb_define_method(cS_vpi_delay.klass, "mtm_flag=", _wrap_s_vpi_delay_mtm_flag_set, -1); - rb_define_method(cS_vpi_delay.klass, "mtm_flag", _wrap_s_vpi_delay_mtm_flag_get, -1); - rb_define_method(cS_vpi_delay.klass, "append_flag=", _wrap_s_vpi_delay_append_flag_set, -1); - rb_define_method(cS_vpi_delay.klass, "append_flag", _wrap_s_vpi_delay_append_flag_get, -1); - rb_define_method(cS_vpi_delay.klass, "pulsere_flag=", _wrap_s_vpi_delay_pulsere_flag_set, -1); - rb_define_method(cS_vpi_delay.klass, "pulsere_flag", _wrap_s_vpi_delay_pulsere_flag_get, -1); - cS_vpi_delay.mark = 0; - cS_vpi_delay.destroy = (void (*)(void *)) free_s_vpi_delay; - - cS_vpi_vecval.klass = rb_define_class_under(mVpi, "S_vpi_vecval", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_t_vpi_vecval, (void *) &cS_vpi_vecval); - rb_define_alloc_func(cS_vpi_vecval.klass, _wrap_s_vpi_vecval_allocate); - rb_define_method(cS_vpi_vecval.klass, "initialize", _wrap_new_s_vpi_vecval, -1); - rb_define_method(cS_vpi_vecval.klass, "aval=", _wrap_s_vpi_vecval_aval_set, -1); - rb_define_method(cS_vpi_vecval.klass, "aval", _wrap_s_vpi_vecval_aval_get, -1); - rb_define_method(cS_vpi_vecval.klass, "bval=", _wrap_s_vpi_vecval_bval_set, -1); - rb_define_method(cS_vpi_vecval.klass, "bval", _wrap_s_vpi_vecval_bval_get, -1); - cS_vpi_vecval.mark = 0; - cS_vpi_vecval.destroy = (void (*)(void *)) free_s_vpi_vecval; - - cS_vpi_strengthval.klass = rb_define_class_under(mVpi, "S_vpi_strengthval", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_t_vpi_strengthval, (void *) &cS_vpi_strengthval); - rb_define_alloc_func(cS_vpi_strengthval.klass, _wrap_s_vpi_strengthval_allocate); - rb_define_method(cS_vpi_strengthval.klass, "initialize", _wrap_new_s_vpi_strengthval, -1); - rb_define_method(cS_vpi_strengthval.klass, "logic=", _wrap_s_vpi_strengthval_logic_set, -1); - rb_define_method(cS_vpi_strengthval.klass, "logic", _wrap_s_vpi_strengthval_logic_get, -1); - rb_define_method(cS_vpi_strengthval.klass, "s0=", _wrap_s_vpi_strengthval_s0_set, -1); - rb_define_method(cS_vpi_strengthval.klass, "s0", _wrap_s_vpi_strengthval_s0_get, -1); - rb_define_method(cS_vpi_strengthval.klass, "s1=", _wrap_s_vpi_strengthval_s1_set, -1); - rb_define_method(cS_vpi_strengthval.klass, "s1", _wrap_s_vpi_strengthval_s1_get, -1); - cS_vpi_strengthval.mark = 0; - cS_vpi_strengthval.destroy = (void (*)(void *)) free_s_vpi_strengthval; - rb_define_const(mVpi,"VpiSupplyDrive", INT2NUM(0x80)); - rb_define_const(mVpi,"VpiStrongDrive", INT2NUM(0x40)); - rb_define_const(mVpi,"VpiPullDrive", INT2NUM(0x20)); - rb_define_const(mVpi,"VpiWeakDrive", INT2NUM(0x08)); - rb_define_const(mVpi,"VpiLargeCharge", INT2NUM(0x10)); - rb_define_const(mVpi,"VpiMediumCharge", INT2NUM(0x04)); - rb_define_const(mVpi,"VpiSmallCharge", INT2NUM(0x02)); - rb_define_const(mVpi,"VpiHiZ", INT2NUM(0x01)); - - cS_vpi_value.klass = rb_define_class_under(mVpi, "S_vpi_value", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_t_vpi_value, (void *) &cS_vpi_value); - rb_define_alloc_func(cS_vpi_value.klass, _wrap_s_vpi_value_allocate); - rb_define_method(cS_vpi_value.klass, "initialize", _wrap_new_s_vpi_value, -1); - rb_define_method(cS_vpi_value.klass, "format=", _wrap_s_vpi_value_format_set, -1); - rb_define_method(cS_vpi_value.klass, "format", _wrap_s_vpi_value_format_get, -1); - rb_define_method(cS_vpi_value.klass, "value", _wrap_s_vpi_value_value_get, -1); - cS_vpi_value.mark = 0; - cS_vpi_value.destroy = (void (*)(void *)) free_s_vpi_value; - - cS_vpi_value_value.klass = rb_define_class_under(mVpi, "S_vpi_value_value", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_s_vpi_value_value, (void *) &cS_vpi_value_value); - rb_define_alloc_func(cS_vpi_value_value.klass, _wrap_s_vpi_value_value_allocate); - rb_define_method(cS_vpi_value_value.klass, "initialize", _wrap_new_s_vpi_value_value, -1); - rb_define_method(cS_vpi_value_value.klass, "str=", _wrap_s_vpi_value_value_str_set, -1); - rb_define_method(cS_vpi_value_value.klass, "str", _wrap_s_vpi_value_value_str_get, -1); - rb_define_method(cS_vpi_value_value.klass, "scalar=", _wrap_s_vpi_value_value_scalar_set, -1); - rb_define_method(cS_vpi_value_value.klass, "scalar", _wrap_s_vpi_value_value_scalar_get, -1); - rb_define_method(cS_vpi_value_value.klass, "integer=", _wrap_s_vpi_value_value_integer_set, -1); - rb_define_method(cS_vpi_value_value.klass, "integer", _wrap_s_vpi_value_value_integer_get, -1); - rb_define_method(cS_vpi_value_value.klass, "real=", _wrap_s_vpi_value_value_real_set, -1); - rb_define_method(cS_vpi_value_value.klass, "real", _wrap_s_vpi_value_value_real_get, -1); - rb_define_method(cS_vpi_value_value.klass, "time=", _wrap_s_vpi_value_value_time_set, -1); - rb_define_method(cS_vpi_value_value.klass, "time", _wrap_s_vpi_value_value_time_get, -1); - rb_define_method(cS_vpi_value_value.klass, "vector=", _wrap_s_vpi_value_value_vector_set, -1); - rb_define_method(cS_vpi_value_value.klass, "vector", _wrap_s_vpi_value_value_vector_get, -1); - rb_define_method(cS_vpi_value_value.klass, "strength=", _wrap_s_vpi_value_value_strength_set, -1); - rb_define_method(cS_vpi_value_value.klass, "strength", _wrap_s_vpi_value_value_strength_get, -1); - rb_define_method(cS_vpi_value_value.klass, "misc=", _wrap_s_vpi_value_value_misc_set, -1); - rb_define_method(cS_vpi_value_value.klass, "misc", _wrap_s_vpi_value_value_misc_get, -1); - cS_vpi_value_value.mark = 0; - cS_vpi_value_value.destroy = (void (*)(void *)) free_s_vpi_value_value; - rb_define_const(mVpi,"VpiBinStrVal", INT2NUM(1)); - rb_define_const(mVpi,"VpiOctStrVal", INT2NUM(2)); - rb_define_const(mVpi,"VpiDecStrVal", INT2NUM(3)); - rb_define_const(mVpi,"VpiHexStrVal", INT2NUM(4)); - rb_define_const(mVpi,"VpiScalarVal", INT2NUM(5)); - rb_define_const(mVpi,"VpiIntVal", INT2NUM(6)); - rb_define_const(mVpi,"VpiRealVal", INT2NUM(7)); - rb_define_const(mVpi,"VpiStringVal", INT2NUM(8)); - rb_define_const(mVpi,"VpiVectorVal", INT2NUM(9)); - rb_define_const(mVpi,"VpiStrengthVal", INT2NUM(10)); - rb_define_const(mVpi,"VpiTimeVal", INT2NUM(11)); - rb_define_const(mVpi,"VpiObjTypeVal", INT2NUM(12)); - rb_define_const(mVpi,"VpiSuppressVal", INT2NUM(13)); - rb_define_const(mVpi,"VpiNoDelay", INT2NUM(1)); - rb_define_const(mVpi,"VpiInertialDelay", INT2NUM(2)); - rb_define_const(mVpi,"VpiTransportDelay", INT2NUM(3)); - rb_define_const(mVpi,"VpiPureTransportDelay", INT2NUM(4)); - rb_define_const(mVpi,"VpiForceFlag", INT2NUM(5)); - rb_define_const(mVpi,"VpiReleaseFlag", INT2NUM(6)); - rb_define_const(mVpi,"VpiCancelEvent", INT2NUM(7)); - rb_define_const(mVpi,"VpiReturnEvent", INT2NUM(0x1000)); - rb_define_const(mVpi,"Vpi0", INT2NUM(0)); - rb_define_const(mVpi,"Vpi1", INT2NUM(1)); - rb_define_const(mVpi,"VpiZ", INT2NUM(2)); - rb_define_const(mVpi,"VpiX", INT2NUM(3)); - rb_define_const(mVpi,"VpiH", INT2NUM(4)); - rb_define_const(mVpi,"VpiL", INT2NUM(5)); - rb_define_const(mVpi,"VpiDontCare", INT2NUM(6)); - - cS_vpi_systf_data.klass = rb_define_class_under(mVpi, "S_vpi_systf_data", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_t_vpi_systf_data, (void *) &cS_vpi_systf_data); - rb_define_alloc_func(cS_vpi_systf_data.klass, _wrap_s_vpi_systf_data_allocate); - rb_define_method(cS_vpi_systf_data.klass, "initialize", _wrap_new_s_vpi_systf_data, -1); - rb_define_method(cS_vpi_systf_data.klass, "type=", _wrap_s_vpi_systf_data_type_set, -1); - rb_define_method(cS_vpi_systf_data.klass, "type", _wrap_s_vpi_systf_data_type_get, -1); - rb_define_method(cS_vpi_systf_data.klass, "sysfunctype=", _wrap_s_vpi_systf_data_sysfunctype_set, -1); - rb_define_method(cS_vpi_systf_data.klass, "sysfunctype", _wrap_s_vpi_systf_data_sysfunctype_get, -1); - rb_define_method(cS_vpi_systf_data.klass, "tfname=", _wrap_s_vpi_systf_data_tfname_set, -1); - rb_define_method(cS_vpi_systf_data.klass, "tfname", _wrap_s_vpi_systf_data_tfname_get, -1); - rb_define_method(cS_vpi_systf_data.klass, "calltf=", _wrap_s_vpi_systf_data_calltf_set, -1); - rb_define_method(cS_vpi_systf_data.klass, "calltf", _wrap_s_vpi_systf_data_calltf_get, -1); - rb_define_method(cS_vpi_systf_data.klass, "compiletf=", _wrap_s_vpi_systf_data_compiletf_set, -1); - rb_define_method(cS_vpi_systf_data.klass, "compiletf", _wrap_s_vpi_systf_data_compiletf_get, -1); - rb_define_method(cS_vpi_systf_data.klass, "sizetf=", _wrap_s_vpi_systf_data_sizetf_set, -1); - rb_define_method(cS_vpi_systf_data.klass, "sizetf", _wrap_s_vpi_systf_data_sizetf_get, -1); - rb_define_method(cS_vpi_systf_data.klass, "user_data=", _wrap_s_vpi_systf_data_user_data_set, -1); - rb_define_method(cS_vpi_systf_data.klass, "user_data", _wrap_s_vpi_systf_data_user_data_get, -1); - cS_vpi_systf_data.mark = 0; - cS_vpi_systf_data.destroy = (void (*)(void *)) free_s_vpi_systf_data; - rb_define_const(mVpi,"VpiSysTask", INT2NUM(1)); - rb_define_const(mVpi,"VpiSysFunc", INT2NUM(2)); - - cS_vpi_vlog_info.klass = rb_define_class_under(mVpi, "S_vpi_vlog_info", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_t_vpi_vlog_info, (void *) &cS_vpi_vlog_info); - rb_define_alloc_func(cS_vpi_vlog_info.klass, _wrap_s_vpi_vlog_info_allocate); - rb_define_method(cS_vpi_vlog_info.klass, "initialize", _wrap_new_s_vpi_vlog_info, -1); - rb_define_method(cS_vpi_vlog_info.klass, "argc=", _wrap_s_vpi_vlog_info_argc_set, -1); - rb_define_method(cS_vpi_vlog_info.klass, "argc", _wrap_s_vpi_vlog_info_argc_get, -1); - rb_define_method(cS_vpi_vlog_info.klass, "argv=", _wrap_s_vpi_vlog_info_argv_set, -1); - rb_define_method(cS_vpi_vlog_info.klass, "argv", _wrap_s_vpi_vlog_info_argv_get, -1); - rb_define_method(cS_vpi_vlog_info.klass, "product=", _wrap_s_vpi_vlog_info_product_set, -1); - rb_define_method(cS_vpi_vlog_info.klass, "product", _wrap_s_vpi_vlog_info_product_get, -1); - rb_define_method(cS_vpi_vlog_info.klass, "version=", _wrap_s_vpi_vlog_info_version_set, -1); - rb_define_method(cS_vpi_vlog_info.klass, "version", _wrap_s_vpi_vlog_info_version_get, -1); - cS_vpi_vlog_info.mark = 0; - cS_vpi_vlog_info.destroy = (void (*)(void *)) free_s_vpi_vlog_info; - - cS_vpi_error_info.klass = rb_define_class_under(mVpi, "S_vpi_error_info", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_t_vpi_error_info, (void *) &cS_vpi_error_info); - rb_define_alloc_func(cS_vpi_error_info.klass, _wrap_s_vpi_error_info_allocate); - rb_define_method(cS_vpi_error_info.klass, "initialize", _wrap_new_s_vpi_error_info, -1); - rb_define_method(cS_vpi_error_info.klass, "state=", _wrap_s_vpi_error_info_state_set, -1); - rb_define_method(cS_vpi_error_info.klass, "state", _wrap_s_vpi_error_info_state_get, -1); - rb_define_method(cS_vpi_error_info.klass, "level=", _wrap_s_vpi_error_info_level_set, -1); - rb_define_method(cS_vpi_error_info.klass, "level", _wrap_s_vpi_error_info_level_get, -1); - rb_define_method(cS_vpi_error_info.klass, "message=", _wrap_s_vpi_error_info_message_set, -1); - rb_define_method(cS_vpi_error_info.klass, "message", _wrap_s_vpi_error_info_message_get, -1); - rb_define_method(cS_vpi_error_info.klass, "product=", _wrap_s_vpi_error_info_product_set, -1); - rb_define_method(cS_vpi_error_info.klass, "product", _wrap_s_vpi_error_info_product_get, -1); - rb_define_method(cS_vpi_error_info.klass, "code=", _wrap_s_vpi_error_info_code_set, -1); - rb_define_method(cS_vpi_error_info.klass, "code", _wrap_s_vpi_error_info_code_get, -1); - rb_define_method(cS_vpi_error_info.klass, "file=", _wrap_s_vpi_error_info_file_set, -1); - rb_define_method(cS_vpi_error_info.klass, "file", _wrap_s_vpi_error_info_file_get, -1); - rb_define_method(cS_vpi_error_info.klass, "line=", _wrap_s_vpi_error_info_line_set, -1); - rb_define_method(cS_vpi_error_info.klass, "line", _wrap_s_vpi_error_info_line_get, -1); - cS_vpi_error_info.mark = 0; - cS_vpi_error_info.destroy = (void (*)(void *)) free_s_vpi_error_info; - rb_define_const(mVpi,"VpiCompile", INT2NUM(1)); - rb_define_const(mVpi,"VpiPLI", INT2NUM(2)); - rb_define_const(mVpi,"VpiRun", INT2NUM(3)); - rb_define_const(mVpi,"VpiNotice", INT2NUM(1)); - rb_define_const(mVpi,"VpiWarning", INT2NUM(2)); - rb_define_const(mVpi,"VpiError", INT2NUM(3)); - rb_define_const(mVpi,"VpiSystem", INT2NUM(4)); - rb_define_const(mVpi,"VpiInternal", INT2NUM(5)); - - cS_cb_data.klass = rb_define_class_under(mVpi, "S_cb_data", rb_cObject); - SWIG_TypeClientData(SWIGTYPE_p_t_cb_data, (void *) &cS_cb_data); - rb_define_alloc_func(cS_cb_data.klass, _wrap_s_cb_data_allocate); - rb_define_method(cS_cb_data.klass, "initialize", _wrap_new_s_cb_data, -1); - rb_define_method(cS_cb_data.klass, "reason=", _wrap_s_cb_data_reason_set, -1); - rb_define_method(cS_cb_data.klass, "reason", _wrap_s_cb_data_reason_get, -1); - rb_define_method(cS_cb_data.klass, "cb_rtn=", _wrap_s_cb_data_cb_rtn_set, -1); - rb_define_method(cS_cb_data.klass, "cb_rtn", _wrap_s_cb_data_cb_rtn_get, -1); - rb_define_method(cS_cb_data.klass, "obj=", _wrap_s_cb_data_obj_set, -1); - rb_define_method(cS_cb_data.klass, "obj", _wrap_s_cb_data_obj_get, -1); - rb_define_method(cS_cb_data.klass, "time=", _wrap_s_cb_data_time_set, -1); - rb_define_method(cS_cb_data.klass, "time", _wrap_s_cb_data_time_get, -1); - rb_define_method(cS_cb_data.klass, "value=", _wrap_s_cb_data_value_set, -1); - rb_define_method(cS_cb_data.klass, "value", _wrap_s_cb_data_value_get, -1); - rb_define_method(cS_cb_data.klass, "index=", _wrap_s_cb_data_index_set, -1); - rb_define_method(cS_cb_data.klass, "index", _wrap_s_cb_data_index_get, -1); - rb_define_method(cS_cb_data.klass, "user_data=", _wrap_s_cb_data_user_data_set, -1); - rb_define_method(cS_cb_data.klass, "user_data", _wrap_s_cb_data_user_data_get, -1); - cS_cb_data.mark = 0; - cS_cb_data.destroy = (void (*)(void *)) free_s_cb_data; - rb_define_const(mVpi,"CbValueChange", INT2NUM(1)); - rb_define_const(mVpi,"CbStmt", INT2NUM(2)); - rb_define_const(mVpi,"CbForce", INT2NUM(3)); - rb_define_const(mVpi,"CbRelease", INT2NUM(4)); - rb_define_const(mVpi,"CbAtStartOfSimTime", INT2NUM(5)); - rb_define_const(mVpi,"CbReadWriteSynch", INT2NUM(6)); - rb_define_const(mVpi,"CbReadOnlySynch", INT2NUM(7)); - rb_define_const(mVpi,"CbNextSimTime", INT2NUM(8)); - rb_define_const(mVpi,"CbAfterDelay", INT2NUM(9)); - rb_define_const(mVpi,"CbEndOfCompile", INT2NUM(10)); - rb_define_const(mVpi,"CbStartOfSimulation", INT2NUM(11)); - rb_define_const(mVpi,"CbEndOfSimulation", INT2NUM(12)); - rb_define_const(mVpi,"CbError", INT2NUM(13)); - rb_define_const(mVpi,"CbTchkViolation", INT2NUM(14)); - rb_define_const(mVpi,"CbStartOfSave", INT2NUM(15)); - rb_define_const(mVpi,"CbEndOfSave", INT2NUM(16)); - rb_define_const(mVpi,"CbStartOfRestart", INT2NUM(17)); - rb_define_const(mVpi,"CbEndOfRestart", INT2NUM(18)); - rb_define_const(mVpi,"CbStartOfReset", INT2NUM(19)); - rb_define_const(mVpi,"CbEndOfReset", INT2NUM(20)); - rb_define_const(mVpi,"CbEnterInteractive", INT2NUM(21)); - rb_define_const(mVpi,"CbExitInteractive", INT2NUM(22)); - rb_define_const(mVpi,"CbInteractiveScopeChange", INT2NUM(23)); - rb_define_const(mVpi,"CbUnresolvedSystf", INT2NUM(24)); - rb_define_const(mVpi,"CbAssign", INT2NUM(25)); - rb_define_const(mVpi,"CbDeassign", INT2NUM(26)); - rb_define_const(mVpi,"CbDisable", INT2NUM(27)); - rb_define_const(mVpi,"CbPLIError", INT2NUM(28)); - rb_define_const(mVpi,"CbSignal", INT2NUM(29)); - rb_define_module_function(mVpi, "vpi_register_cb", _wrap_vpi_register_cb, -1); - rb_define_module_function(mVpi, "vpi_remove_cb", _wrap_vpi_remove_cb, -1); - rb_define_module_function(mVpi, "vpi_get_cb_info", _wrap_vpi_get_cb_info, -1); - rb_define_module_function(mVpi, "vpi_register_systf", _wrap_vpi_register_systf, -1); - rb_define_module_function(mVpi, "vpi_get_systf_info", _wrap_vpi_get_systf_info, -1); - rb_define_module_function(mVpi, "vpi_handle_by_name", _wrap_vpi_handle_by_name, -1); - rb_define_module_function(mVpi, "vpi_handle_by_index", _wrap_vpi_handle_by_index, -1); - rb_define_module_function(mVpi, "vpi_handle", _wrap_vpi_handle, -1); - rb_define_module_function(mVpi, "vpi_handle_multi", _wrap_vpi_handle_multi, -1); - rb_define_module_function(mVpi, "vpi_iterate", _wrap_vpi_iterate, -1); - rb_define_module_function(mVpi, "vpi_scan", _wrap_vpi_scan, -1); - rb_define_module_function(mVpi, "vpi_get", _wrap_vpi_get, -1); - rb_define_module_function(mVpi, "vpi_get_str", _wrap_vpi_get_str, -1); - rb_define_module_function(mVpi, "vpi_get_delays", _wrap_vpi_get_delays, -1); - rb_define_module_function(mVpi, "vpi_put_delays", _wrap_vpi_put_delays, -1); - rb_define_module_function(mVpi, "vpi_get_value", _wrap_vpi_get_value, -1); - rb_define_module_function(mVpi, "vpi_put_value", _wrap_vpi_put_value, -1); - rb_define_module_function(mVpi, "vpi_get_time", _wrap_vpi_get_time, -1); - rb_define_module_function(mVpi, "vpi_mcd_open", _wrap_vpi_mcd_open, -1); - rb_define_module_function(mVpi, "vpi_mcd_close", _wrap_vpi_mcd_close, -1); - rb_define_module_function(mVpi, "vpi_mcd_name", _wrap_vpi_mcd_name, -1); - rb_define_module_function(mVpi, "vpi_mcd_printf", _wrap_vpi_mcd_printf, -1); - rb_define_module_function(mVpi, "vpi_printf", _wrap_vpi_printf, -1); - rb_define_module_function(mVpi, "vpi_compare_objects", _wrap_vpi_compare_objects, -1); - rb_define_module_function(mVpi, "vpi_chk_error", _wrap_vpi_chk_error, -1); - rb_define_module_function(mVpi, "vpi_free_object", _wrap_vpi_free_object, -1); - rb_define_module_function(mVpi, "vpi_get_vlog_info", _wrap_vpi_get_vlog_info, -1); - rb_define_module_function(mVpi, "vpi_get_data", _wrap_vpi_get_data, -1); - rb_define_module_function(mVpi, "vpi_put_data", _wrap_vpi_put_data, -1); - rb_define_module_function(mVpi, "vpi_get_userdata", _wrap_vpi_get_userdata, -1); - rb_define_module_function(mVpi, "vpi_put_userdata", _wrap_vpi_put_userdata, -1); - rb_define_module_function(mVpi, "vpi_vprintf", _wrap_vpi_vprintf, -1); - rb_define_module_function(mVpi, "vpi_mcd_vprintf", _wrap_vpi_mcd_vprintf, -1); - rb_define_module_function(mVpi, "vpi_flush", _wrap_vpi_flush, -1); - rb_define_module_function(mVpi, "vpi_mcd_flush", _wrap_vpi_mcd_flush, -1); - rb_define_module_function(mVpi, "vpi_control", _wrap_vpi_control, -1); - rb_define_module_function(mVpi, "vpi_handle_by_multi_index", _wrap_vpi_handle_by_multi_index, -1); - rb_define_singleton_method(mVpi, "vlog_startup_routines", vlog_startup_routines_get, 0); - rb_define_singleton_method(mVpi, "vlog_startup_routines=", vlog_startup_routines_set, 1); + size_t i; + + SWIG_InitRuntime(); + mVpi = rb_define_module("Vpi"); + + SWIG_InitializeModule(0); + for (i = 0; i < swig_module.size; i++) { + SWIG_define_class(swig_module.types[i]); + } + + SWIG_RubyInitializeTrackings(); + rb_define_const(mVpi, "VpiAlways", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiAssignStmt", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiAssignment", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiBegin", SWIG_From_int((int)(4))); + rb_define_const(mVpi, "VpiCase", SWIG_From_int((int)(5))); + rb_define_const(mVpi, "VpiCaseItem", SWIG_From_int((int)(6))); + rb_define_const(mVpi, "VpiConstant", SWIG_From_int((int)(7))); + rb_define_const(mVpi, "VpiContAssign", SWIG_From_int((int)(8))); + rb_define_const(mVpi, "VpiDeassign", SWIG_From_int((int)(9))); + rb_define_const(mVpi, "VpiDefParam", SWIG_From_int((int)(10))); + rb_define_const(mVpi, "VpiDelayControl", SWIG_From_int((int)(11))); + rb_define_const(mVpi, "VpiDisable", SWIG_From_int((int)(12))); + rb_define_const(mVpi, "VpiEventControl", SWIG_From_int((int)(13))); + rb_define_const(mVpi, "VpiEventStmt", SWIG_From_int((int)(14))); + rb_define_const(mVpi, "VpiFor", SWIG_From_int((int)(15))); + rb_define_const(mVpi, "VpiForce", SWIG_From_int((int)(16))); + rb_define_const(mVpi, "VpiForever", SWIG_From_int((int)(17))); + rb_define_const(mVpi, "VpiFork", SWIG_From_int((int)(18))); + rb_define_const(mVpi, "VpiFuncCall", SWIG_From_int((int)(19))); + rb_define_const(mVpi, "VpiFunction", SWIG_From_int((int)(20))); + rb_define_const(mVpi, "VpiGate", SWIG_From_int((int)(21))); + rb_define_const(mVpi, "VpiIf", SWIG_From_int((int)(22))); + rb_define_const(mVpi, "VpiIfElse", SWIG_From_int((int)(23))); + rb_define_const(mVpi, "VpiInitial", SWIG_From_int((int)(24))); + rb_define_const(mVpi, "VpiIntegerVar", SWIG_From_int((int)(25))); + rb_define_const(mVpi, "VpiInterModPath", SWIG_From_int((int)(26))); + rb_define_const(mVpi, "VpiIterator", SWIG_From_int((int)(27))); + rb_define_const(mVpi, "VpiIODecl", SWIG_From_int((int)(28))); + rb_define_const(mVpi, "VpiMemory", SWIG_From_int((int)(29))); + rb_define_const(mVpi, "VpiMemoryWord", SWIG_From_int((int)(30))); + rb_define_const(mVpi, "VpiModPath", SWIG_From_int((int)(31))); + rb_define_const(mVpi, "VpiModule", SWIG_From_int((int)(32))); + rb_define_const(mVpi, "VpiNamedBegin", SWIG_From_int((int)(33))); + rb_define_const(mVpi, "VpiNamedEvent", SWIG_From_int((int)(34))); + rb_define_const(mVpi, "VpiNamedFork", SWIG_From_int((int)(35))); + rb_define_const(mVpi, "VpiNet", SWIG_From_int((int)(36))); + rb_define_const(mVpi, "VpiNetBit", SWIG_From_int((int)(37))); + rb_define_const(mVpi, "VpiNullStmt", SWIG_From_int((int)(38))); + rb_define_const(mVpi, "VpiOperation", SWIG_From_int((int)(39))); + rb_define_const(mVpi, "VpiParamAssign", SWIG_From_int((int)(40))); + rb_define_const(mVpi, "VpiParameter", SWIG_From_int((int)(41))); + rb_define_const(mVpi, "VpiPartSelect", SWIG_From_int((int)(42))); + rb_define_const(mVpi, "VpiPathTerm", SWIG_From_int((int)(43))); + rb_define_const(mVpi, "VpiPort", SWIG_From_int((int)(44))); + rb_define_const(mVpi, "VpiPortBit", SWIG_From_int((int)(45))); + rb_define_const(mVpi, "VpiPrimTerm", SWIG_From_int((int)(46))); + rb_define_const(mVpi, "VpiRealVar", SWIG_From_int((int)(47))); + rb_define_const(mVpi, "VpiReg", SWIG_From_int((int)(48))); + rb_define_const(mVpi, "VpiRegBit", SWIG_From_int((int)(49))); + rb_define_const(mVpi, "VpiRelease", SWIG_From_int((int)(50))); + rb_define_const(mVpi, "VpiRepeat", SWIG_From_int((int)(51))); + rb_define_const(mVpi, "VpiRepeatControl", SWIG_From_int((int)(52))); + rb_define_const(mVpi, "VpiSchedEvent", SWIG_From_int((int)(53))); + rb_define_const(mVpi, "VpiSpecParam", SWIG_From_int((int)(54))); + rb_define_const(mVpi, "VpiSwitch", SWIG_From_int((int)(55))); + rb_define_const(mVpi, "VpiSysFuncCall", SWIG_From_int((int)(56))); + rb_define_const(mVpi, "VpiSysTaskCall", SWIG_From_int((int)(57))); + rb_define_const(mVpi, "VpiTableEntry", SWIG_From_int((int)(58))); + rb_define_const(mVpi, "VpiTask", SWIG_From_int((int)(59))); + rb_define_const(mVpi, "VpiTaskCall", SWIG_From_int((int)(60))); + rb_define_const(mVpi, "VpiTchk", SWIG_From_int((int)(61))); + rb_define_const(mVpi, "VpiTchkTerm", SWIG_From_int((int)(62))); + rb_define_const(mVpi, "VpiTimeVar", SWIG_From_int((int)(63))); + rb_define_const(mVpi, "VpiTimeQueue", SWIG_From_int((int)(64))); + rb_define_const(mVpi, "VpiUdp", SWIG_From_int((int)(65))); + rb_define_const(mVpi, "VpiUdpDefn", SWIG_From_int((int)(66))); + rb_define_const(mVpi, "VpiUserSystf", SWIG_From_int((int)(67))); + rb_define_const(mVpi, "VpiVarSelect", SWIG_From_int((int)(68))); + rb_define_const(mVpi, "VpiWait", SWIG_From_int((int)(69))); + rb_define_const(mVpi, "VpiWhile", SWIG_From_int((int)(70))); + rb_define_const(mVpi, "VpiAttribute", SWIG_From_int((int)(105))); + rb_define_const(mVpi, "VpiBitSelect", SWIG_From_int((int)(106))); + rb_define_const(mVpi, "VpiCallback", SWIG_From_int((int)(107))); + rb_define_const(mVpi, "VpiDelayTerm", SWIG_From_int((int)(108))); + rb_define_const(mVpi, "VpiDelayDevice", SWIG_From_int((int)(109))); + rb_define_const(mVpi, "VpiFrame", SWIG_From_int((int)(110))); + rb_define_const(mVpi, "VpiGateArray", SWIG_From_int((int)(111))); + rb_define_const(mVpi, "VpiModuleArray", SWIG_From_int((int)(112))); + rb_define_const(mVpi, "VpiPrimitiveArray", SWIG_From_int((int)(113))); + rb_define_const(mVpi, "VpiNetArray", SWIG_From_int((int)(114))); + rb_define_const(mVpi, "VpiRange", SWIG_From_int((int)(115))); + rb_define_const(mVpi, "VpiRegArray", SWIG_From_int((int)(116))); + rb_define_const(mVpi, "VpiSwitchArray", SWIG_From_int((int)(117))); + rb_define_const(mVpi, "VpiUdpArray", SWIG_From_int((int)(118))); + rb_define_const(mVpi, "VpiContAssignBit", SWIG_From_int((int)(128))); + rb_define_const(mVpi, "VpiNamedEventArray", SWIG_From_int((int)(129))); + rb_define_const(mVpi, "VpiIndexedPartSelect", SWIG_From_int((int)(130))); + rb_define_const(mVpi, "VpiGenScopeArray", SWIG_From_int((int)(133))); + rb_define_const(mVpi, "VpiGenScope", SWIG_From_int((int)(134))); + rb_define_const(mVpi, "VpiGenVar", SWIG_From_int((int)(135))); + rb_define_const(mVpi, "VpiCondition", SWIG_From_int((int)(71))); + rb_define_const(mVpi, "VpiDelay", SWIG_From_int((int)(72))); + rb_define_const(mVpi, "VpiElseStmt", SWIG_From_int((int)(73))); + rb_define_const(mVpi, "VpiForIncStmt", SWIG_From_int((int)(74))); + rb_define_const(mVpi, "VpiForInitStmt", SWIG_From_int((int)(75))); + rb_define_const(mVpi, "VpiHighConn", SWIG_From_int((int)(76))); + rb_define_const(mVpi, "VpiLhs", SWIG_From_int((int)(77))); + rb_define_const(mVpi, "VpiIndex", SWIG_From_int((int)(78))); + rb_define_const(mVpi, "VpiLeftRange", SWIG_From_int((int)(79))); + rb_define_const(mVpi, "VpiLowConn", SWIG_From_int((int)(80))); + rb_define_const(mVpi, "VpiParent", SWIG_From_int((int)(81))); + rb_define_const(mVpi, "VpiRhs", SWIG_From_int((int)(82))); + rb_define_const(mVpi, "VpiRightRange", SWIG_From_int((int)(83))); + rb_define_const(mVpi, "VpiScope", SWIG_From_int((int)(84))); + rb_define_const(mVpi, "VpiSysTfCall", SWIG_From_int((int)(85))); + rb_define_const(mVpi, "VpiTchkDataTerm", SWIG_From_int((int)(86))); + rb_define_const(mVpi, "VpiTchkNotifier", SWIG_From_int((int)(87))); + rb_define_const(mVpi, "VpiTchkRefTerm", SWIG_From_int((int)(88))); + rb_define_const(mVpi, "VpiArgument", SWIG_From_int((int)(89))); + rb_define_const(mVpi, "VpiBit", SWIG_From_int((int)(90))); + rb_define_const(mVpi, "VpiDriver", SWIG_From_int((int)(91))); + rb_define_const(mVpi, "VpiInternalScope", SWIG_From_int((int)(92))); + rb_define_const(mVpi, "VpiLoad", SWIG_From_int((int)(93))); + rb_define_const(mVpi, "VpiModDataPathIn", SWIG_From_int((int)(94))); + rb_define_const(mVpi, "VpiModPathIn", SWIG_From_int((int)(95))); + rb_define_const(mVpi, "VpiModPathOut", SWIG_From_int((int)(96))); + rb_define_const(mVpi, "VpiOperand", SWIG_From_int((int)(97))); + rb_define_const(mVpi, "VpiPortInst", SWIG_From_int((int)(98))); + rb_define_const(mVpi, "VpiProcess", SWIG_From_int((int)(99))); + rb_define_const(mVpi, "VpiVariables", SWIG_From_int((int)(100))); + rb_define_const(mVpi, "VpiUse", SWIG_From_int((int)(101))); + rb_define_const(mVpi, "VpiExpr", SWIG_From_int((int)(102))); + rb_define_const(mVpi, "VpiPrimitive", SWIG_From_int((int)(103))); + rb_define_const(mVpi, "VpiStmt", SWIG_From_int((int)(104))); + rb_define_const(mVpi, "VpiActiveTimeFormat", SWIG_From_int((int)(119))); + rb_define_const(mVpi, "VpiInTerm", SWIG_From_int((int)(120))); + rb_define_const(mVpi, "VpiInstanceArray", SWIG_From_int((int)(121))); + rb_define_const(mVpi, "VpiLocalDriver", SWIG_From_int((int)(122))); + rb_define_const(mVpi, "VpiLocalLoad", SWIG_From_int((int)(123))); + rb_define_const(mVpi, "VpiOutTerm", SWIG_From_int((int)(124))); + rb_define_const(mVpi, "VpiPorts", SWIG_From_int((int)(125))); + rb_define_const(mVpi, "VpiSimNet", SWIG_From_int((int)(126))); + rb_define_const(mVpi, "VpiTaskFunc", SWIG_From_int((int)(127))); + rb_define_const(mVpi, "VpiBaseExpr", SWIG_From_int((int)(131))); + rb_define_const(mVpi, "VpiWidthExpr", SWIG_From_int((int)(132))); + rb_define_const(mVpi, "VpiUndefined", SWIG_From_int((int)(-1))); + rb_define_const(mVpi, "VpiType", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiName", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiFullName", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiSize", SWIG_From_int((int)(4))); + rb_define_const(mVpi, "VpiFile", SWIG_From_int((int)(5))); + rb_define_const(mVpi, "VpiLineNo", SWIG_From_int((int)(6))); + rb_define_const(mVpi, "VpiTopModule", SWIG_From_int((int)(7))); + rb_define_const(mVpi, "VpiCellInstance", SWIG_From_int((int)(8))); + rb_define_const(mVpi, "VpiDefName", SWIG_From_int((int)(9))); + rb_define_const(mVpi, "VpiProtected", SWIG_From_int((int)(10))); + rb_define_const(mVpi, "VpiTimeUnit", SWIG_From_int((int)(11))); + rb_define_const(mVpi, "VpiTimePrecision", SWIG_From_int((int)(12))); + rb_define_const(mVpi, "VpiDefNetType", SWIG_From_int((int)(13))); + rb_define_const(mVpi, "VpiUnconnDrive", SWIG_From_int((int)(14))); + rb_define_const(mVpi, "VpiHighZ", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiPull1", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiPull0", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiDefFile", SWIG_From_int((int)(15))); + rb_define_const(mVpi, "VpiDefLineNo", SWIG_From_int((int)(16))); + rb_define_const(mVpi, "VpiDefDelayMode", SWIG_From_int((int)(47))); + rb_define_const(mVpi, "VpiDelayModeNone", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiDelayModePath", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiDelayModeDistrib", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiDelayModeUnit", SWIG_From_int((int)(4))); + rb_define_const(mVpi, "VpiDelayModeZero", SWIG_From_int((int)(5))); + rb_define_const(mVpi, "VpiDelayModeMTM", SWIG_From_int((int)(6))); + rb_define_const(mVpi, "VpiDefDecayTime", SWIG_From_int((int)(48))); + rb_define_const(mVpi, "VpiScalar", SWIG_From_int((int)(17))); + rb_define_const(mVpi, "VpiVector", SWIG_From_int((int)(18))); + rb_define_const(mVpi, "VpiExplicitName", SWIG_From_int((int)(19))); + rb_define_const(mVpi, "VpiDirection", SWIG_From_int((int)(20))); + rb_define_const(mVpi, "VpiInput", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiOutput", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiInout", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiMixedIO", SWIG_From_int((int)(4))); + rb_define_const(mVpi, "VpiNoDirection", SWIG_From_int((int)(5))); + rb_define_const(mVpi, "VpiConnByName", SWIG_From_int((int)(21))); + rb_define_const(mVpi, "VpiNetType", SWIG_From_int((int)(22))); + rb_define_const(mVpi, "VpiWire", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiWand", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiWor", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiTri", SWIG_From_int((int)(4))); + rb_define_const(mVpi, "VpiTri0", SWIG_From_int((int)(5))); + rb_define_const(mVpi, "VpiTri1", SWIG_From_int((int)(6))); + rb_define_const(mVpi, "VpiTriReg", SWIG_From_int((int)(7))); + rb_define_const(mVpi, "VpiTriAnd", SWIG_From_int((int)(8))); + rb_define_const(mVpi, "VpiTriOr", SWIG_From_int((int)(9))); + rb_define_const(mVpi, "VpiSupply1", SWIG_From_int((int)(10))); + rb_define_const(mVpi, "VpiSupply0", SWIG_From_int((int)(11))); + rb_define_const(mVpi, "VpiNone", SWIG_From_int((int)(12))); + rb_define_const(mVpi, "VpiUwire", SWIG_From_int((int)(13))); + rb_define_const(mVpi, "VpiExplicitScalared", SWIG_From_int((int)(23))); + rb_define_const(mVpi, "VpiExplicitVectored", SWIG_From_int((int)(24))); + rb_define_const(mVpi, "VpiExpanded", SWIG_From_int((int)(25))); + rb_define_const(mVpi, "VpiImplicitDecl", SWIG_From_int((int)(26))); + rb_define_const(mVpi, "VpiChargeStrength", SWIG_From_int((int)(27))); + rb_define_const(mVpi, "VpiArray", SWIG_From_int((int)(28))); + rb_define_const(mVpi, "VpiPortIndex", SWIG_From_int((int)(29))); + rb_define_const(mVpi, "VpiTermIndex", SWIG_From_int((int)(30))); + rb_define_const(mVpi, "VpiStrength0", SWIG_From_int((int)(31))); + rb_define_const(mVpi, "VpiStrength1", SWIG_From_int((int)(32))); + rb_define_const(mVpi, "VpiPrimType", SWIG_From_int((int)(33))); + rb_define_const(mVpi, "VpiAndPrim", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiNandPrim", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiNorPrim", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiOrPrim", SWIG_From_int((int)(4))); + rb_define_const(mVpi, "VpiXorPrim", SWIG_From_int((int)(5))); + rb_define_const(mVpi, "VpiXnorPrim", SWIG_From_int((int)(6))); + rb_define_const(mVpi, "VpiBufPrim", SWIG_From_int((int)(7))); + rb_define_const(mVpi, "VpiNotPrim", SWIG_From_int((int)(8))); + rb_define_const(mVpi, "VpiBufif0Prim", SWIG_From_int((int)(9))); + rb_define_const(mVpi, "VpiBufif1Prim", SWIG_From_int((int)(10))); + rb_define_const(mVpi, "VpiNotif0Prim", SWIG_From_int((int)(11))); + rb_define_const(mVpi, "VpiNotif1Prim", SWIG_From_int((int)(12))); + rb_define_const(mVpi, "VpiNmosPrim", SWIG_From_int((int)(13))); + rb_define_const(mVpi, "VpiPmosPrim", SWIG_From_int((int)(14))); + rb_define_const(mVpi, "VpiCmosPrim", SWIG_From_int((int)(15))); + rb_define_const(mVpi, "VpiRnmosPrim", SWIG_From_int((int)(16))); + rb_define_const(mVpi, "VpiRpmosPrim", SWIG_From_int((int)(17))); + rb_define_const(mVpi, "VpiRcmosPrim", SWIG_From_int((int)(18))); + rb_define_const(mVpi, "VpiRtranPrim", SWIG_From_int((int)(19))); + rb_define_const(mVpi, "VpiRtranif0Prim", SWIG_From_int((int)(20))); + rb_define_const(mVpi, "VpiRtranif1Prim", SWIG_From_int((int)(21))); + rb_define_const(mVpi, "VpiTranPrim", SWIG_From_int((int)(22))); + rb_define_const(mVpi, "VpiTranif0Prim", SWIG_From_int((int)(23))); + rb_define_const(mVpi, "VpiTranif1Prim", SWIG_From_int((int)(24))); + rb_define_const(mVpi, "VpiPullupPrim", SWIG_From_int((int)(25))); + rb_define_const(mVpi, "VpiPulldownPrim", SWIG_From_int((int)(26))); + rb_define_const(mVpi, "VpiSeqPrim", SWIG_From_int((int)(27))); + rb_define_const(mVpi, "VpiCombPrim", SWIG_From_int((int)(28))); + rb_define_const(mVpi, "VpiPolarity", SWIG_From_int((int)(34))); + rb_define_const(mVpi, "VpiDataPolarity", SWIG_From_int((int)(35))); + rb_define_const(mVpi, "VpiPositive", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiNegative", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiUnknown", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiEdge", SWIG_From_int((int)(36))); + rb_define_const(mVpi, "VpiNoEdge", SWIG_From_int((int)(0x00))); + rb_define_const(mVpi, "VpiEdge01", SWIG_From_int((int)(0x01))); + rb_define_const(mVpi, "VpiEdge10", SWIG_From_int((int)(0x02))); + rb_define_const(mVpi, "VpiEdge0x", SWIG_From_int((int)(0x04))); + rb_define_const(mVpi, "VpiEdgex1", SWIG_From_int((int)(0x08))); + rb_define_const(mVpi, "VpiEdge1x", SWIG_From_int((int)(0x10))); + rb_define_const(mVpi, "VpiEdgex0", SWIG_From_int((int)(0x20))); + rb_define_const(mVpi, "VpiPosedge", SWIG_From_int((int)((0x08|0x01|0x04)))); + rb_define_const(mVpi, "VpiNegedge", SWIG_From_int((int)((0x20|0x02|0x10)))); + rb_define_const(mVpi, "VpiAnyEdge", SWIG_From_int((int)(((0x08|0x01|0x04)|(0x20|0x02|0x10))))); + rb_define_const(mVpi, "VpiPathType", SWIG_From_int((int)(37))); + rb_define_const(mVpi, "VpiPathFull", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiPathParallel", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiTchkType", SWIG_From_int((int)(38))); + rb_define_const(mVpi, "VpiSetup", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiHold", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiPeriod", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiWidth", SWIG_From_int((int)(4))); + rb_define_const(mVpi, "VpiSkew", SWIG_From_int((int)(5))); + rb_define_const(mVpi, "VpiRecovery", SWIG_From_int((int)(6))); + rb_define_const(mVpi, "VpiNoChange", SWIG_From_int((int)(7))); + rb_define_const(mVpi, "VpiSetupHold", SWIG_From_int((int)(8))); + rb_define_const(mVpi, "VpiFullskew", SWIG_From_int((int)(9))); + rb_define_const(mVpi, "VpiRecrem", SWIG_From_int((int)(10))); + rb_define_const(mVpi, "VpiRemoval", SWIG_From_int((int)(11))); + rb_define_const(mVpi, "VpiTimeskew", SWIG_From_int((int)(12))); + rb_define_const(mVpi, "VpiOpType", SWIG_From_int((int)(39))); + rb_define_const(mVpi, "VpiMinusOp", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiPlusOp", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiNotOp", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiBitNegOp", SWIG_From_int((int)(4))); + rb_define_const(mVpi, "VpiUnaryAndOp", SWIG_From_int((int)(5))); + rb_define_const(mVpi, "VpiUnaryNandOp", SWIG_From_int((int)(6))); + rb_define_const(mVpi, "VpiUnaryOrOp", SWIG_From_int((int)(7))); + rb_define_const(mVpi, "VpiUnaryNorOp", SWIG_From_int((int)(8))); + rb_define_const(mVpi, "VpiUnaryXorOp", SWIG_From_int((int)(9))); + rb_define_const(mVpi, "VpiUnaryXNorOp", SWIG_From_int((int)(10))); + rb_define_const(mVpi, "VpiSubOp", SWIG_From_int((int)(11))); + rb_define_const(mVpi, "VpiDivOp", SWIG_From_int((int)(12))); + rb_define_const(mVpi, "VpiModOp", SWIG_From_int((int)(13))); + rb_define_const(mVpi, "VpiEqOp", SWIG_From_int((int)(14))); + rb_define_const(mVpi, "VpiNeqOp", SWIG_From_int((int)(15))); + rb_define_const(mVpi, "VpiCaseEqOp", SWIG_From_int((int)(16))); + rb_define_const(mVpi, "VpiCaseNeqOp", SWIG_From_int((int)(17))); + rb_define_const(mVpi, "VpiGtOp", SWIG_From_int((int)(18))); + rb_define_const(mVpi, "VpiGeOp", SWIG_From_int((int)(19))); + rb_define_const(mVpi, "VpiLtOp", SWIG_From_int((int)(20))); + rb_define_const(mVpi, "VpiLeOp", SWIG_From_int((int)(21))); + rb_define_const(mVpi, "VpiLShiftOp", SWIG_From_int((int)(22))); + rb_define_const(mVpi, "VpiRShiftOp", SWIG_From_int((int)(23))); + rb_define_const(mVpi, "VpiAddOp", SWIG_From_int((int)(24))); + rb_define_const(mVpi, "VpiMultOp", SWIG_From_int((int)(25))); + rb_define_const(mVpi, "VpiLogAndOp", SWIG_From_int((int)(26))); + rb_define_const(mVpi, "VpiLogOrOp", SWIG_From_int((int)(27))); + rb_define_const(mVpi, "VpiBitAndOp", SWIG_From_int((int)(28))); + rb_define_const(mVpi, "VpiBitOrOp", SWIG_From_int((int)(29))); + rb_define_const(mVpi, "VpiBitXorOp", SWIG_From_int((int)(30))); + rb_define_const(mVpi, "VpiBitXNorOp", SWIG_From_int((int)(31))); + rb_define_const(mVpi, "VpiBitXnorOp", SWIG_From_int((int)(31))); + rb_define_const(mVpi, "VpiConditionOp", SWIG_From_int((int)(32))); + rb_define_const(mVpi, "VpiConcatOp", SWIG_From_int((int)(33))); + rb_define_const(mVpi, "VpiMultiConcatOp", SWIG_From_int((int)(34))); + rb_define_const(mVpi, "VpiEventOrOp", SWIG_From_int((int)(35))); + rb_define_const(mVpi, "VpiNullOp", SWIG_From_int((int)(36))); + rb_define_const(mVpi, "VpiListOp", SWIG_From_int((int)(37))); + rb_define_const(mVpi, "VpiMinTypMaxOp", SWIG_From_int((int)(38))); + rb_define_const(mVpi, "VpiPosedgeOp", SWIG_From_int((int)(39))); + rb_define_const(mVpi, "VpiNegedgeOp", SWIG_From_int((int)(40))); + rb_define_const(mVpi, "VpiArithLShiftOp", SWIG_From_int((int)(41))); + rb_define_const(mVpi, "VpiArithRShiftOp", SWIG_From_int((int)(42))); + rb_define_const(mVpi, "VpiPowerOp", SWIG_From_int((int)(43))); + rb_define_const(mVpi, "VpiConstType", SWIG_From_int((int)(40))); + rb_define_const(mVpi, "VpiDecConst", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiRealConst", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiBinaryConst", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiOctConst", SWIG_From_int((int)(4))); + rb_define_const(mVpi, "VpiHexConst", SWIG_From_int((int)(5))); + rb_define_const(mVpi, "VpiStringConst", SWIG_From_int((int)(6))); + rb_define_const(mVpi, "VpiIntConst", SWIG_From_int((int)(7))); + rb_define_const(mVpi, "VpiBlocking", SWIG_From_int((int)(41))); + rb_define_const(mVpi, "VpiCaseType", SWIG_From_int((int)(42))); + rb_define_const(mVpi, "VpiCaseExact", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiCaseX", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiCaseZ", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiNetDeclAssign", SWIG_From_int((int)(43))); + rb_define_const(mVpi, "VpiFuncType", SWIG_From_int((int)(44))); + rb_define_const(mVpi, "VpiIntFunc", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiRealFunc", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiTimeFunc", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiSizedFunc", SWIG_From_int((int)(4))); + rb_define_const(mVpi, "VpiSizedSignedFunc", SWIG_From_int((int)(5))); + rb_define_const(mVpi, "VpiSysFuncType", SWIG_From_int((int)(44))); + rb_define_const(mVpi, "VpiSysFuncInt", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiSysFuncReal", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiSysFuncTime", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiSysFuncSized", SWIG_From_int((int)(4))); + rb_define_const(mVpi, "VpiUserDefn", SWIG_From_int((int)(45))); + rb_define_const(mVpi, "VpiScheduled", SWIG_From_int((int)(46))); + rb_define_const(mVpi, "VpiActive", SWIG_From_int((int)(49))); + rb_define_const(mVpi, "VpiAutomatic", SWIG_From_int((int)(50))); + rb_define_const(mVpi, "VpiCell", SWIG_From_int((int)(51))); + rb_define_const(mVpi, "VpiConfig", SWIG_From_int((int)(52))); + rb_define_const(mVpi, "VpiConstantSelect", SWIG_From_int((int)(53))); + rb_define_const(mVpi, "VpiDecompile", SWIG_From_int((int)(54))); + rb_define_const(mVpi, "VpiDefAttribute", SWIG_From_int((int)(55))); + rb_define_const(mVpi, "VpiDelayType", SWIG_From_int((int)(56))); + rb_define_const(mVpi, "VpiModPathDelay", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiInterModPathDelay", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiMIPDelay", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiIteratorType", SWIG_From_int((int)(57))); + rb_define_const(mVpi, "VpiLibrary", SWIG_From_int((int)(58))); + rb_define_const(mVpi, "VpiMultiArray", SWIG_From_int((int)(59))); + rb_define_const(mVpi, "VpiOffset", SWIG_From_int((int)(60))); + rb_define_const(mVpi, "VpiResolvedNetType", SWIG_From_int((int)(61))); + rb_define_const(mVpi, "VpiSaveRestartID", SWIG_From_int((int)(62))); + rb_define_const(mVpi, "VpiSaveRestartLocation", SWIG_From_int((int)(63))); + rb_define_const(mVpi, "VpiValid", SWIG_From_int((int)(64))); + rb_define_const(mVpi, "VpiSigned", SWIG_From_int((int)(65))); + rb_define_const(mVpi, "VpiLocalParam", SWIG_From_int((int)(70))); + rb_define_const(mVpi, "VpiModPathHasIfNone", SWIG_From_int((int)(71))); + rb_define_const(mVpi, "VpiIndexedPartSelectType", SWIG_From_int((int)(72))); + rb_define_const(mVpi, "VpiPosIndexed", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiNegIndexed", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiIsMemory", SWIG_From_int((int)(73))); + rb_define_const(mVpi, "VpiStop", SWIG_From_int((int)(66))); + rb_define_const(mVpi, "VpiFinish", SWIG_From_int((int)(67))); + rb_define_const(mVpi, "VpiReset", SWIG_From_int((int)(68))); + rb_define_const(mVpi, "VpiSetInteractiveScope", SWIG_From_int((int)(69))); + rb_define_const(mVpi, "VPI_MCD_STDOUT", SWIG_From_int((int)(0x00000001))); + + cS_vpi_time.klass = rb_define_class_under(mVpi, "S_vpi_time", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_t_vpi_time, (void *) &cS_vpi_time); + rb_define_alloc_func(cS_vpi_time.klass, _wrap_s_vpi_time_allocate); + rb_define_method(cS_vpi_time.klass, "initialize", _wrap_new_s_vpi_time, -1); + rb_define_method(cS_vpi_time.klass, "type=", _wrap_s_vpi_time_type_set, -1); + rb_define_method(cS_vpi_time.klass, "type", _wrap_s_vpi_time_type_get, -1); + rb_define_method(cS_vpi_time.klass, "high=", _wrap_s_vpi_time_high_set, -1); + rb_define_method(cS_vpi_time.klass, "high", _wrap_s_vpi_time_high_get, -1); + rb_define_method(cS_vpi_time.klass, "low=", _wrap_s_vpi_time_low_set, -1); + rb_define_method(cS_vpi_time.klass, "low", _wrap_s_vpi_time_low_get, -1); + rb_define_method(cS_vpi_time.klass, "real=", _wrap_s_vpi_time_real_set, -1); + rb_define_method(cS_vpi_time.klass, "real", _wrap_s_vpi_time_real_get, -1); + cS_vpi_time.mark = 0; + cS_vpi_time.destroy = (void (*)(void *)) free_s_vpi_time; + cS_vpi_time.trackObjects = 0; + rb_define_const(mVpi, "VpiScaledRealTime", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiSimTime", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiSuppressTime", SWIG_From_int((int)(3))); + + cS_vpi_delay.klass = rb_define_class_under(mVpi, "S_vpi_delay", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_t_vpi_delay, (void *) &cS_vpi_delay); + rb_define_alloc_func(cS_vpi_delay.klass, _wrap_s_vpi_delay_allocate); + rb_define_method(cS_vpi_delay.klass, "initialize", _wrap_new_s_vpi_delay, -1); + rb_define_method(cS_vpi_delay.klass, "da=", _wrap_s_vpi_delay_da_set, -1); + rb_define_method(cS_vpi_delay.klass, "da", _wrap_s_vpi_delay_da_get, -1); + rb_define_method(cS_vpi_delay.klass, "no_of_delays=", _wrap_s_vpi_delay_no_of_delays_set, -1); + rb_define_method(cS_vpi_delay.klass, "no_of_delays", _wrap_s_vpi_delay_no_of_delays_get, -1); + rb_define_method(cS_vpi_delay.klass, "time_type=", _wrap_s_vpi_delay_time_type_set, -1); + rb_define_method(cS_vpi_delay.klass, "time_type", _wrap_s_vpi_delay_time_type_get, -1); + rb_define_method(cS_vpi_delay.klass, "mtm_flag=", _wrap_s_vpi_delay_mtm_flag_set, -1); + rb_define_method(cS_vpi_delay.klass, "mtm_flag", _wrap_s_vpi_delay_mtm_flag_get, -1); + rb_define_method(cS_vpi_delay.klass, "append_flag=", _wrap_s_vpi_delay_append_flag_set, -1); + rb_define_method(cS_vpi_delay.klass, "append_flag", _wrap_s_vpi_delay_append_flag_get, -1); + rb_define_method(cS_vpi_delay.klass, "pulsere_flag=", _wrap_s_vpi_delay_pulsere_flag_set, -1); + rb_define_method(cS_vpi_delay.klass, "pulsere_flag", _wrap_s_vpi_delay_pulsere_flag_get, -1); + cS_vpi_delay.mark = 0; + cS_vpi_delay.destroy = (void (*)(void *)) free_s_vpi_delay; + cS_vpi_delay.trackObjects = 0; + + cS_vpi_vecval.klass = rb_define_class_under(mVpi, "S_vpi_vecval", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_t_vpi_vecval, (void *) &cS_vpi_vecval); + rb_define_alloc_func(cS_vpi_vecval.klass, _wrap_s_vpi_vecval_allocate); + rb_define_method(cS_vpi_vecval.klass, "initialize", _wrap_new_s_vpi_vecval, -1); + rb_define_method(cS_vpi_vecval.klass, "aval=", _wrap_s_vpi_vecval_aval_set, -1); + rb_define_method(cS_vpi_vecval.klass, "aval", _wrap_s_vpi_vecval_aval_get, -1); + rb_define_method(cS_vpi_vecval.klass, "bval=", _wrap_s_vpi_vecval_bval_set, -1); + rb_define_method(cS_vpi_vecval.klass, "bval", _wrap_s_vpi_vecval_bval_get, -1); + cS_vpi_vecval.mark = 0; + cS_vpi_vecval.destroy = (void (*)(void *)) free_s_vpi_vecval; + cS_vpi_vecval.trackObjects = 0; + + cS_vpi_strengthval.klass = rb_define_class_under(mVpi, "S_vpi_strengthval", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_t_vpi_strengthval, (void *) &cS_vpi_strengthval); + rb_define_alloc_func(cS_vpi_strengthval.klass, _wrap_s_vpi_strengthval_allocate); + rb_define_method(cS_vpi_strengthval.klass, "initialize", _wrap_new_s_vpi_strengthval, -1); + rb_define_method(cS_vpi_strengthval.klass, "logic=", _wrap_s_vpi_strengthval_logic_set, -1); + rb_define_method(cS_vpi_strengthval.klass, "logic", _wrap_s_vpi_strengthval_logic_get, -1); + rb_define_method(cS_vpi_strengthval.klass, "s0=", _wrap_s_vpi_strengthval_s0_set, -1); + rb_define_method(cS_vpi_strengthval.klass, "s0", _wrap_s_vpi_strengthval_s0_get, -1); + rb_define_method(cS_vpi_strengthval.klass, "s1=", _wrap_s_vpi_strengthval_s1_set, -1); + rb_define_method(cS_vpi_strengthval.klass, "s1", _wrap_s_vpi_strengthval_s1_get, -1); + cS_vpi_strengthval.mark = 0; + cS_vpi_strengthval.destroy = (void (*)(void *)) free_s_vpi_strengthval; + cS_vpi_strengthval.trackObjects = 0; + rb_define_const(mVpi, "VpiSupplyDrive", SWIG_From_int((int)(0x80))); + rb_define_const(mVpi, "VpiStrongDrive", SWIG_From_int((int)(0x40))); + rb_define_const(mVpi, "VpiPullDrive", SWIG_From_int((int)(0x20))); + rb_define_const(mVpi, "VpiWeakDrive", SWIG_From_int((int)(0x08))); + rb_define_const(mVpi, "VpiLargeCharge", SWIG_From_int((int)(0x10))); + rb_define_const(mVpi, "VpiMediumCharge", SWIG_From_int((int)(0x04))); + rb_define_const(mVpi, "VpiSmallCharge", SWIG_From_int((int)(0x02))); + rb_define_const(mVpi, "VpiHiZ", SWIG_From_int((int)(0x01))); + + cS_vpi_value.klass = rb_define_class_under(mVpi, "S_vpi_value", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_t_vpi_value, (void *) &cS_vpi_value); + rb_define_alloc_func(cS_vpi_value.klass, _wrap_s_vpi_value_allocate); + rb_define_method(cS_vpi_value.klass, "initialize", _wrap_new_s_vpi_value, -1); + rb_define_method(cS_vpi_value.klass, "format=", _wrap_s_vpi_value_format_set, -1); + rb_define_method(cS_vpi_value.klass, "format", _wrap_s_vpi_value_format_get, -1); + rb_define_method(cS_vpi_value.klass, "value", _wrap_s_vpi_value_value_get, -1); + cS_vpi_value.mark = 0; + cS_vpi_value.destroy = (void (*)(void *)) free_s_vpi_value; + cS_vpi_value.trackObjects = 0; + + cS_vpi_value_value.klass = rb_define_class_under(mVpi, "S_vpi_value_value", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_s_vpi_value_value, (void *) &cS_vpi_value_value); + rb_define_alloc_func(cS_vpi_value_value.klass, _wrap_s_vpi_value_value_allocate); + rb_define_method(cS_vpi_value_value.klass, "initialize", _wrap_new_s_vpi_value_value, -1); + rb_define_method(cS_vpi_value_value.klass, "str=", _wrap_s_vpi_value_value_str_set, -1); + rb_define_method(cS_vpi_value_value.klass, "str", _wrap_s_vpi_value_value_str_get, -1); + rb_define_method(cS_vpi_value_value.klass, "scalar=", _wrap_s_vpi_value_value_scalar_set, -1); + rb_define_method(cS_vpi_value_value.klass, "scalar", _wrap_s_vpi_value_value_scalar_get, -1); + rb_define_method(cS_vpi_value_value.klass, "integer=", _wrap_s_vpi_value_value_integer_set, -1); + rb_define_method(cS_vpi_value_value.klass, "integer", _wrap_s_vpi_value_value_integer_get, -1); + rb_define_method(cS_vpi_value_value.klass, "real=", _wrap_s_vpi_value_value_real_set, -1); + rb_define_method(cS_vpi_value_value.klass, "real", _wrap_s_vpi_value_value_real_get, -1); + rb_define_method(cS_vpi_value_value.klass, "time=", _wrap_s_vpi_value_value_time_set, -1); + rb_define_method(cS_vpi_value_value.klass, "time", _wrap_s_vpi_value_value_time_get, -1); + rb_define_method(cS_vpi_value_value.klass, "vector=", _wrap_s_vpi_value_value_vector_set, -1); + rb_define_method(cS_vpi_value_value.klass, "vector", _wrap_s_vpi_value_value_vector_get, -1); + rb_define_method(cS_vpi_value_value.klass, "strength=", _wrap_s_vpi_value_value_strength_set, -1); + rb_define_method(cS_vpi_value_value.klass, "strength", _wrap_s_vpi_value_value_strength_get, -1); + rb_define_method(cS_vpi_value_value.klass, "misc=", _wrap_s_vpi_value_value_misc_set, -1); + rb_define_method(cS_vpi_value_value.klass, "misc", _wrap_s_vpi_value_value_misc_get, -1); + cS_vpi_value_value.mark = 0; + cS_vpi_value_value.destroy = (void (*)(void *)) free_s_vpi_value_value; + cS_vpi_value_value.trackObjects = 0; + rb_define_const(mVpi, "VpiBinStrVal", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiOctStrVal", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiDecStrVal", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiHexStrVal", SWIG_From_int((int)(4))); + rb_define_const(mVpi, "VpiScalarVal", SWIG_From_int((int)(5))); + rb_define_const(mVpi, "VpiIntVal", SWIG_From_int((int)(6))); + rb_define_const(mVpi, "VpiRealVal", SWIG_From_int((int)(7))); + rb_define_const(mVpi, "VpiStringVal", SWIG_From_int((int)(8))); + rb_define_const(mVpi, "VpiVectorVal", SWIG_From_int((int)(9))); + rb_define_const(mVpi, "VpiStrengthVal", SWIG_From_int((int)(10))); + rb_define_const(mVpi, "VpiTimeVal", SWIG_From_int((int)(11))); + rb_define_const(mVpi, "VpiObjTypeVal", SWIG_From_int((int)(12))); + rb_define_const(mVpi, "VpiSuppressVal", SWIG_From_int((int)(13))); + rb_define_const(mVpi, "VpiNoDelay", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiInertialDelay", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiTransportDelay", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiPureTransportDelay", SWIG_From_int((int)(4))); + rb_define_const(mVpi, "VpiForceFlag", SWIG_From_int((int)(5))); + rb_define_const(mVpi, "VpiReleaseFlag", SWIG_From_int((int)(6))); + rb_define_const(mVpi, "VpiCancelEvent", SWIG_From_int((int)(7))); + rb_define_const(mVpi, "VpiReturnEvent", SWIG_From_int((int)(0x1000))); + rb_define_const(mVpi, "Vpi0", SWIG_From_int((int)(0))); + rb_define_const(mVpi, "Vpi1", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiZ", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiX", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiH", SWIG_From_int((int)(4))); + rb_define_const(mVpi, "VpiL", SWIG_From_int((int)(5))); + rb_define_const(mVpi, "VpiDontCare", SWIG_From_int((int)(6))); + + cS_vpi_systf_data.klass = rb_define_class_under(mVpi, "S_vpi_systf_data", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_t_vpi_systf_data, (void *) &cS_vpi_systf_data); + rb_define_alloc_func(cS_vpi_systf_data.klass, _wrap_s_vpi_systf_data_allocate); + rb_define_method(cS_vpi_systf_data.klass, "initialize", _wrap_new_s_vpi_systf_data, -1); + rb_define_method(cS_vpi_systf_data.klass, "type=", _wrap_s_vpi_systf_data_type_set, -1); + rb_define_method(cS_vpi_systf_data.klass, "type", _wrap_s_vpi_systf_data_type_get, -1); + rb_define_method(cS_vpi_systf_data.klass, "sysfunctype=", _wrap_s_vpi_systf_data_sysfunctype_set, -1); + rb_define_method(cS_vpi_systf_data.klass, "sysfunctype", _wrap_s_vpi_systf_data_sysfunctype_get, -1); + rb_define_method(cS_vpi_systf_data.klass, "tfname=", _wrap_s_vpi_systf_data_tfname_set, -1); + rb_define_method(cS_vpi_systf_data.klass, "tfname", _wrap_s_vpi_systf_data_tfname_get, -1); + rb_define_method(cS_vpi_systf_data.klass, "calltf=", _wrap_s_vpi_systf_data_calltf_set, -1); + rb_define_method(cS_vpi_systf_data.klass, "calltf", _wrap_s_vpi_systf_data_calltf_get, -1); + rb_define_method(cS_vpi_systf_data.klass, "compiletf=", _wrap_s_vpi_systf_data_compiletf_set, -1); + rb_define_method(cS_vpi_systf_data.klass, "compiletf", _wrap_s_vpi_systf_data_compiletf_get, -1); + rb_define_method(cS_vpi_systf_data.klass, "sizetf=", _wrap_s_vpi_systf_data_sizetf_set, -1); + rb_define_method(cS_vpi_systf_data.klass, "sizetf", _wrap_s_vpi_systf_data_sizetf_get, -1); + rb_define_method(cS_vpi_systf_data.klass, "user_data=", _wrap_s_vpi_systf_data_user_data_set, -1); + rb_define_method(cS_vpi_systf_data.klass, "user_data", _wrap_s_vpi_systf_data_user_data_get, -1); + cS_vpi_systf_data.mark = 0; + cS_vpi_systf_data.destroy = (void (*)(void *)) free_s_vpi_systf_data; + cS_vpi_systf_data.trackObjects = 0; + rb_define_const(mVpi, "VpiSysTask", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiSysFunc", SWIG_From_int((int)(2))); + + cS_vpi_vlog_info.klass = rb_define_class_under(mVpi, "S_vpi_vlog_info", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_t_vpi_vlog_info, (void *) &cS_vpi_vlog_info); + rb_define_alloc_func(cS_vpi_vlog_info.klass, _wrap_s_vpi_vlog_info_allocate); + rb_define_method(cS_vpi_vlog_info.klass, "initialize", _wrap_new_s_vpi_vlog_info, -1); + rb_define_method(cS_vpi_vlog_info.klass, "argc=", _wrap_s_vpi_vlog_info_argc_set, -1); + rb_define_method(cS_vpi_vlog_info.klass, "argc", _wrap_s_vpi_vlog_info_argc_get, -1); + rb_define_method(cS_vpi_vlog_info.klass, "argv=", _wrap_s_vpi_vlog_info_argv_set, -1); + rb_define_method(cS_vpi_vlog_info.klass, "argv", _wrap_s_vpi_vlog_info_argv_get, -1); + rb_define_method(cS_vpi_vlog_info.klass, "product=", _wrap_s_vpi_vlog_info_product_set, -1); + rb_define_method(cS_vpi_vlog_info.klass, "product", _wrap_s_vpi_vlog_info_product_get, -1); + rb_define_method(cS_vpi_vlog_info.klass, "version=", _wrap_s_vpi_vlog_info_version_set, -1); + rb_define_method(cS_vpi_vlog_info.klass, "version", _wrap_s_vpi_vlog_info_version_get, -1); + cS_vpi_vlog_info.mark = 0; + cS_vpi_vlog_info.destroy = (void (*)(void *)) free_s_vpi_vlog_info; + cS_vpi_vlog_info.trackObjects = 0; + + cS_vpi_error_info.klass = rb_define_class_under(mVpi, "S_vpi_error_info", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_t_vpi_error_info, (void *) &cS_vpi_error_info); + rb_define_alloc_func(cS_vpi_error_info.klass, _wrap_s_vpi_error_info_allocate); + rb_define_method(cS_vpi_error_info.klass, "initialize", _wrap_new_s_vpi_error_info, -1); + rb_define_method(cS_vpi_error_info.klass, "state=", _wrap_s_vpi_error_info_state_set, -1); + rb_define_method(cS_vpi_error_info.klass, "state", _wrap_s_vpi_error_info_state_get, -1); + rb_define_method(cS_vpi_error_info.klass, "level=", _wrap_s_vpi_error_info_level_set, -1); + rb_define_method(cS_vpi_error_info.klass, "level", _wrap_s_vpi_error_info_level_get, -1); + rb_define_method(cS_vpi_error_info.klass, "message=", _wrap_s_vpi_error_info_message_set, -1); + rb_define_method(cS_vpi_error_info.klass, "message", _wrap_s_vpi_error_info_message_get, -1); + rb_define_method(cS_vpi_error_info.klass, "product=", _wrap_s_vpi_error_info_product_set, -1); + rb_define_method(cS_vpi_error_info.klass, "product", _wrap_s_vpi_error_info_product_get, -1); + rb_define_method(cS_vpi_error_info.klass, "code=", _wrap_s_vpi_error_info_code_set, -1); + rb_define_method(cS_vpi_error_info.klass, "code", _wrap_s_vpi_error_info_code_get, -1); + rb_define_method(cS_vpi_error_info.klass, "file=", _wrap_s_vpi_error_info_file_set, -1); + rb_define_method(cS_vpi_error_info.klass, "file", _wrap_s_vpi_error_info_file_get, -1); + rb_define_method(cS_vpi_error_info.klass, "line=", _wrap_s_vpi_error_info_line_set, -1); + rb_define_method(cS_vpi_error_info.klass, "line", _wrap_s_vpi_error_info_line_get, -1); + cS_vpi_error_info.mark = 0; + cS_vpi_error_info.destroy = (void (*)(void *)) free_s_vpi_error_info; + cS_vpi_error_info.trackObjects = 0; + rb_define_const(mVpi, "VpiCompile", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiPLI", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiRun", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiNotice", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "VpiWarning", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "VpiError", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "VpiSystem", SWIG_From_int((int)(4))); + rb_define_const(mVpi, "VpiInternal", SWIG_From_int((int)(5))); + + cS_cb_data.klass = rb_define_class_under(mVpi, "S_cb_data", rb_cObject); + SWIG_TypeClientData(SWIGTYPE_p_t_cb_data, (void *) &cS_cb_data); + rb_define_alloc_func(cS_cb_data.klass, _wrap_s_cb_data_allocate); + rb_define_method(cS_cb_data.klass, "initialize", _wrap_new_s_cb_data, -1); + rb_define_method(cS_cb_data.klass, "reason=", _wrap_s_cb_data_reason_set, -1); + rb_define_method(cS_cb_data.klass, "reason", _wrap_s_cb_data_reason_get, -1); + rb_define_method(cS_cb_data.klass, "cb_rtn=", _wrap_s_cb_data_cb_rtn_set, -1); + rb_define_method(cS_cb_data.klass, "cb_rtn", _wrap_s_cb_data_cb_rtn_get, -1); + rb_define_method(cS_cb_data.klass, "obj=", _wrap_s_cb_data_obj_set, -1); + rb_define_method(cS_cb_data.klass, "obj", _wrap_s_cb_data_obj_get, -1); + rb_define_method(cS_cb_data.klass, "time=", _wrap_s_cb_data_time_set, -1); + rb_define_method(cS_cb_data.klass, "time", _wrap_s_cb_data_time_get, -1); + rb_define_method(cS_cb_data.klass, "value=", _wrap_s_cb_data_value_set, -1); + rb_define_method(cS_cb_data.klass, "value", _wrap_s_cb_data_value_get, -1); + rb_define_method(cS_cb_data.klass, "index=", _wrap_s_cb_data_index_set, -1); + rb_define_method(cS_cb_data.klass, "index", _wrap_s_cb_data_index_get, -1); + rb_define_method(cS_cb_data.klass, "user_data=", _wrap_s_cb_data_user_data_set, -1); + rb_define_method(cS_cb_data.klass, "user_data", _wrap_s_cb_data_user_data_get, -1); + cS_cb_data.mark = 0; + cS_cb_data.destroy = (void (*)(void *)) free_s_cb_data; + cS_cb_data.trackObjects = 0; + rb_define_const(mVpi, "CbValueChange", SWIG_From_int((int)(1))); + rb_define_const(mVpi, "CbStmt", SWIG_From_int((int)(2))); + rb_define_const(mVpi, "CbForce", SWIG_From_int((int)(3))); + rb_define_const(mVpi, "CbRelease", SWIG_From_int((int)(4))); + rb_define_const(mVpi, "CbAtStartOfSimTime", SWIG_From_int((int)(5))); + rb_define_const(mVpi, "CbReadWriteSynch", SWIG_From_int((int)(6))); + rb_define_const(mVpi, "CbReadOnlySynch", SWIG_From_int((int)(7))); + rb_define_const(mVpi, "CbNextSimTime", SWIG_From_int((int)(8))); + rb_define_const(mVpi, "CbAfterDelay", SWIG_From_int((int)(9))); + rb_define_const(mVpi, "CbEndOfCompile", SWIG_From_int((int)(10))); + rb_define_const(mVpi, "CbStartOfSimulation", SWIG_From_int((int)(11))); + rb_define_const(mVpi, "CbEndOfSimulation", SWIG_From_int((int)(12))); + rb_define_const(mVpi, "CbError", SWIG_From_int((int)(13))); + rb_define_const(mVpi, "CbTchkViolation", SWIG_From_int((int)(14))); + rb_define_const(mVpi, "CbStartOfSave", SWIG_From_int((int)(15))); + rb_define_const(mVpi, "CbEndOfSave", SWIG_From_int((int)(16))); + rb_define_const(mVpi, "CbStartOfRestart", SWIG_From_int((int)(17))); + rb_define_const(mVpi, "CbEndOfRestart", SWIG_From_int((int)(18))); + rb_define_const(mVpi, "CbStartOfReset", SWIG_From_int((int)(19))); + rb_define_const(mVpi, "CbEndOfReset", SWIG_From_int((int)(20))); + rb_define_const(mVpi, "CbEnterInteractive", SWIG_From_int((int)(21))); + rb_define_const(mVpi, "CbExitInteractive", SWIG_From_int((int)(22))); + rb_define_const(mVpi, "CbInteractiveScopeChange", SWIG_From_int((int)(23))); + rb_define_const(mVpi, "CbUnresolvedSystf", SWIG_From_int((int)(24))); + rb_define_const(mVpi, "CbAssign", SWIG_From_int((int)(25))); + rb_define_const(mVpi, "CbDeassign", SWIG_From_int((int)(26))); + rb_define_const(mVpi, "CbDisable", SWIG_From_int((int)(27))); + rb_define_const(mVpi, "CbPLIError", SWIG_From_int((int)(28))); + rb_define_const(mVpi, "CbSignal", SWIG_From_int((int)(29))); + rb_define_module_function(mVpi, "vpi_register_cb", _wrap_vpi_register_cb, -1); + rb_define_module_function(mVpi, "vpi_remove_cb", _wrap_vpi_remove_cb, -1); + rb_define_module_function(mVpi, "vpi_get_cb_info", _wrap_vpi_get_cb_info, -1); + rb_define_module_function(mVpi, "vpi_register_systf", _wrap_vpi_register_systf, -1); + rb_define_module_function(mVpi, "vpi_get_systf_info", _wrap_vpi_get_systf_info, -1); + rb_define_module_function(mVpi, "vpi_handle_by_name", _wrap_vpi_handle_by_name, -1); + rb_define_module_function(mVpi, "vpi_handle_by_index", _wrap_vpi_handle_by_index, -1); + rb_define_module_function(mVpi, "vpi_handle", _wrap_vpi_handle, -1); + rb_define_module_function(mVpi, "vpi_handle_multi", _wrap_vpi_handle_multi, -1); + rb_define_module_function(mVpi, "vpi_iterate", _wrap_vpi_iterate, -1); + rb_define_module_function(mVpi, "vpi_scan", _wrap_vpi_scan, -1); + rb_define_module_function(mVpi, "vpi_get", _wrap_vpi_get, -1); + rb_define_module_function(mVpi, "vpi_get_str", _wrap_vpi_get_str, -1); + rb_define_module_function(mVpi, "vpi_get_delays", _wrap_vpi_get_delays, -1); + rb_define_module_function(mVpi, "vpi_put_delays", _wrap_vpi_put_delays, -1); + rb_define_module_function(mVpi, "vpi_get_value", _wrap_vpi_get_value, -1); + rb_define_module_function(mVpi, "vpi_put_value", _wrap_vpi_put_value, -1); + rb_define_module_function(mVpi, "vpi_get_time", _wrap_vpi_get_time, -1); + rb_define_module_function(mVpi, "vpi_mcd_open", _wrap_vpi_mcd_open, -1); + rb_define_module_function(mVpi, "vpi_mcd_close", _wrap_vpi_mcd_close, -1); + rb_define_module_function(mVpi, "vpi_mcd_name", _wrap_vpi_mcd_name, -1); + rb_define_module_function(mVpi, "vpi_mcd_printf", _wrap_vpi_mcd_printf, -1); + rb_define_module_function(mVpi, "vpi_printf", _wrap_vpi_printf, -1); + rb_define_module_function(mVpi, "vpi_compare_objects", _wrap_vpi_compare_objects, -1); + rb_define_module_function(mVpi, "vpi_chk_error", _wrap_vpi_chk_error, -1); + rb_define_module_function(mVpi, "vpi_free_object", _wrap_vpi_free_object, -1); + rb_define_module_function(mVpi, "vpi_get_vlog_info", _wrap_vpi_get_vlog_info, -1); + rb_define_module_function(mVpi, "vpi_get_data", _wrap_vpi_get_data, -1); + rb_define_module_function(mVpi, "vpi_put_data", _wrap_vpi_put_data, -1); + rb_define_module_function(mVpi, "vpi_get_userdata", _wrap_vpi_get_userdata, -1); + rb_define_module_function(mVpi, "vpi_put_userdata", _wrap_vpi_put_userdata, -1); + rb_define_module_function(mVpi, "vpi_vprintf", _wrap_vpi_vprintf, -1); + rb_define_module_function(mVpi, "vpi_mcd_vprintf", _wrap_vpi_mcd_vprintf, -1); + rb_define_module_function(mVpi, "vpi_flush", _wrap_vpi_flush, -1); + rb_define_module_function(mVpi, "vpi_mcd_flush", _wrap_vpi_mcd_flush, -1); + rb_define_module_function(mVpi, "vpi_control", _wrap_vpi_control, -1); + rb_define_module_function(mVpi, "vpi_handle_by_multi_index", _wrap_vpi_handle_by_multi_index, -1); + rb_define_singleton_method(mVpi, "vlog_startup_routines", vlog_startup_routines_get, 0); + rb_define_singleton_method(mVpi, "vlog_startup_routines=", vlog_startup_routines_set, 1); }