miriad 4.1.0.14 → 4.1.0.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README CHANGED
@@ -1,6 +1,6 @@
1
1
  --
2
2
 
3
- $Id: README 7 2008-04-18 07:21:10Z davidm $
3
+ $Id$
4
4
 
5
5
  This file includes an RDoc hack so that links can be made to open up into a new
6
6
  frame rather then the current frame.
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- # $Id: Rakefile 33 2009-03-17 21:30:46Z davidm $
1
+ # $Id$
2
2
 
3
3
  require 'rubygems'
4
4
  require 'rake/gempackagetask'
@@ -14,7 +14,7 @@ run_swig unless test ?e, 'ext/miriad_wrap.c'
14
14
  spec = Gem::Specification.new do |s|
15
15
  # Basics
16
16
  s.name = 'miriad'
17
- s.version = '4.1.0.14'
17
+ s.version = '4.1.0.16'
18
18
  s.summary = 'Ruby interface to MIRIAD'
19
19
  s.description = <<-EOS
20
20
  The MIRIAD-Ruby package...
@@ -1,4 +1,4 @@
1
- # $Id: extconf.rb 7 2008-04-18 07:21:10Z davidm $
1
+ # $Id$
2
2
  #
3
3
  # Usage: ruby extconf.rb --with-narray-include=/path/to/narray.h
4
4
 
@@ -1,4 +1,4 @@
1
- /* $Id: miriad.i 11 2008-04-21 20:31:15Z davidm $ */
1
+ /* $Id$ */
2
2
 
3
3
  /* MIRIAD Swig wrapper */
4
4
 
@@ -1,5 +1,5 @@
1
1
  /*
2
- * $Id: miriad_ruby.c 23 2008-04-30 21:42:24Z davidm $
2
+ * $Id$
3
3
  *
4
4
  * This file is just to document the classes/methods from the SWIG wrappers
5
5
  * that we want to document. It is for rdoc, not gcc. At least for now.
@@ -1,5 +1,5 @@
1
1
  /*
2
- * $Id: miriad_ruby.i 33 2009-03-17 21:30:46Z davidm $
2
+ * $Id$
3
3
  *
4
4
  * Ruby specific typemaps for MIRIAD Swig wrapper
5
5
  */
@@ -45,10 +45,10 @@ VALUE mirlib_eWrappedMirlibError;
45
45
  Check_Type($input, T_ARRAY);
46
46
  // Get the length of the array
47
47
  // TODO Bounds checking somehow?
48
- int n = RARRAY($input)->len;
48
+ int n = RARRAY_LEN($input);
49
49
  $1 = ALLOCA_N(double, n);
50
50
  // Get the first element in array
51
- VALUE *ptr = RARRAY($input)->ptr;
51
+ VALUE *ptr = RARRAY_PTR($input);
52
52
  for (i=0; i < n; i++) {
53
53
  // Convert Ruby Object to double
54
54
  $1[i] = NUM2DBL(ptr[i]);
@@ -62,9 +62,9 @@ VALUE mirlib_eWrappedMirlibError;
62
62
  int i;
63
63
  // Get the length of the array
64
64
  // TODO Bounds checking somehow?
65
- int n = RARRAY($input)->len;
65
+ int n = RARRAY_LEN($input);
66
66
  // Get the first element in array
67
- VALUE *ptr = RARRAY($input)->ptr;
67
+ VALUE *ptr = RARRAY_PTR($input);
68
68
  for (i=0; i < n; i++) {
69
69
  // Store or convert doubles to Ruby Objects
70
70
  if(TYPE(ptr[i]) == T_FLOAT) {
@@ -93,9 +93,9 @@ VALUE mirlib_eWrappedMirlibError;
93
93
  } else {
94
94
  Check_Type($input, T_ARRAY);
95
95
  // Allocate C array on stack
96
- ndata = RARRAY($input)->len;
96
+ ndata = RARRAY_LEN($input);
97
97
  $1 = ALLOCA_N(float,ndata);
98
- VALUE * ptr = RARRAY($input)->ptr;
98
+ VALUE * ptr = RARRAY_PTR($input);
99
99
  // TODO Use $symname in #if to avoid copying on read?
100
100
  for(i=0; i < ndata; i++) {
101
101
  $1[i] = NUM2DBL(ptr[i]);
@@ -109,8 +109,8 @@ VALUE mirlib_eWrappedMirlibError;
109
109
  int i;
110
110
  // If NArray, data are already in place
111
111
  if(TYPE($input) == T_ARRAY) {
112
- ndata = RARRAY($input)->len;
113
- VALUE * ptr = RARRAY($input)->ptr;
112
+ ndata = RARRAY_LEN($input);
113
+ VALUE * ptr = RARRAY_PTR($input);
114
114
  for(i=0; i < ndata; i++) {
115
115
  // Store or convert doubles to Ruby Objects
116
116
  if(TYPE(ptr[i]) == T_FLOAT) {
@@ -136,9 +136,9 @@ VALUE mirlib_eWrappedMirlibError;
136
136
  nflag = NA_TOTAL($input);
137
137
  } else {
138
138
  Check_Type($input, T_ARRAY);
139
- nflag = RARRAY($input)->len;
139
+ nflag = RARRAY_LEN($input);
140
140
  $1 = ALLOCA_N(int,nflag);
141
- VALUE * ptr = RARRAY($input)->ptr;
141
+ VALUE * ptr = RARRAY_PTR($input);
142
142
  for(i=0; i < nflag; i++) {
143
143
  $1[i] = FIX2INT(ptr[i]);
144
144
  }
@@ -152,8 +152,8 @@ VALUE mirlib_eWrappedMirlibError;
152
152
  int i;
153
153
  // If NArray, data are already in place
154
154
  if(TYPE($input) == T_ARRAY) {
155
- nflag = RARRAY($input)->len;
156
- VALUE * ptr = RARRAY($input)->ptr;
155
+ nflag = RARRAY_LEN($input);
156
+ VALUE * ptr = RARRAY_PTR($input);
157
157
  for(i=0; i < nflag; i++) {
158
158
  ptr[i] = INT2FIX($1[i]);
159
159
  }
@@ -191,10 +191,10 @@ VALUE mirlib_eWrappedMirlibError;
191
191
  } else if(TYPE($input) == T_ARRAY) {
192
192
  int i;
193
193
  // Get the length of the array
194
- $2 = RARRAY($input)->len;
194
+ $2 = RARRAY_LEN($input);
195
195
  $1 = ALLOCA_N(type, $2);
196
196
  // Get the first element in array
197
- VALUE *ptr = RARRAY($input)->ptr;
197
+ VALUE *ptr = RARRAY_PTR($input);
198
198
  for (i=0; i < $2; i++) {
199
199
  // Convert Ruby Object to int
200
200
  $1[i]= (type)converter(ptr[i]);
@@ -233,7 +233,7 @@ PUTVRX_TYPEMAP(NA_DFLOAT,double,NUM2DBL);
233
233
  } else {
234
234
  VALUE elem0 = $input;
235
235
  if(TYPE($input) == T_ARRAY) {
236
- $2 = RARRAY($input)->len;
236
+ $2 = RARRAY_LEN($input);
237
237
  elem0 = rb_ary_entry($input,0);
238
238
  } else {
239
239
  // Convert into one element array
@@ -421,9 +421,9 @@ PUTVRX_TYPEMAP(NA_DFLOAT,double,NUM2DBL);
421
421
  int i;
422
422
  int nflag;
423
423
  Check_Type($input, T_ARRAY);
424
- nflag = RARRAY($input)->len;
424
+ nflag = RARRAY_LEN($input);
425
425
  $1 = ALLOCA_N(int,nflag);
426
- VALUE * ptr = RARRAY($input)->ptr;
426
+ VALUE * ptr = RARRAY_PTR($input);
427
427
  for(i=0; i < nflag; i++) {
428
428
  $1[i] = FIX2INT(ptr[i]);
429
429
  }
@@ -450,8 +450,8 @@ PUTVRX_TYPEMAP(NA_DFLOAT,double,NUM2DBL);
450
450
 
451
451
  // Typemaps for hwriteln
452
452
  %typemap(in) (char *linein, size_t length) {
453
- $1 = StringValue($input)->ptr;
454
- $2 = StringValue($input)->len;
453
+ $1 = StringValuePtr($input);
454
+ $2 = StringValueLen($input);
455
455
  }
456
456
 
457
457
  // vim: set expandtab ts=2 sw=2 smarttab syntax=c cindent:
@@ -1,6 +1,6 @@
1
1
  /* ----------------------------------------------------------------------------
2
2
  * This file was automatically generated by SWIG (http://www.swig.org).
3
- * Version 1.3.35
3
+ * Version 1.3.31
4
4
  *
5
5
  * This file is not intended to be easily readable and contains a number of
6
6
  * coding conventions designed to improve portability and efficiency. Do not make
@@ -16,14 +16,14 @@
16
16
 
17
17
  /* template workaround for compilers that cannot correctly implement the C++ standard */
18
18
  #ifndef SWIGTEMPLATEDISAMBIGUATOR
19
- # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
20
- # define SWIGTEMPLATEDISAMBIGUATOR template
21
- # elif defined(__HP_aCC)
22
- /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
23
- /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
24
- # define SWIGTEMPLATEDISAMBIGUATOR template
19
+ # if defined(__SUNPRO_CC)
20
+ # if (__SUNPRO_CC <= 0x560)
21
+ # define SWIGTEMPLATEDISAMBIGUATOR template
22
+ # else
23
+ # define SWIGTEMPLATEDISAMBIGUATOR
24
+ # endif
25
25
  # else
26
- # define SWIGTEMPLATEDISAMBIGUATOR
26
+ # define SWIGTEMPLATEDISAMBIGUATOR
27
27
  # endif
28
28
  #endif
29
29
 
@@ -106,12 +106,6 @@
106
106
  # define _CRT_SECURE_NO_DEPRECATE
107
107
  #endif
108
108
 
109
- /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
110
- #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
111
- # define _SCL_SECURE_NO_DEPRECATE
112
- #endif
113
-
114
-
115
109
  /* -----------------------------------------------------------------------------
116
110
  * This section contains generic SWIG labels for method/variable
117
111
  * declarations/attributes, and other compiler dependent labels.
@@ -119,14 +113,14 @@
119
113
 
120
114
  /* template workaround for compilers that cannot correctly implement the C++ standard */
121
115
  #ifndef SWIGTEMPLATEDISAMBIGUATOR
122
- # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
123
- # define SWIGTEMPLATEDISAMBIGUATOR template
124
- # elif defined(__HP_aCC)
125
- /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
126
- /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
127
- # define SWIGTEMPLATEDISAMBIGUATOR template
116
+ # if defined(__SUNPRO_CC)
117
+ # if (__SUNPRO_CC <= 0x560)
118
+ # define SWIGTEMPLATEDISAMBIGUATOR template
119
+ # else
120
+ # define SWIGTEMPLATEDISAMBIGUATOR
121
+ # endif
128
122
  # else
129
- # define SWIGTEMPLATEDISAMBIGUATOR
123
+ # define SWIGTEMPLATEDISAMBIGUATOR
130
124
  # endif
131
125
  #endif
132
126
 
@@ -209,12 +203,6 @@
209
203
  # define _CRT_SECURE_NO_DEPRECATE
210
204
  #endif
211
205
 
212
- /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
213
- #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
214
- # define _SCL_SECURE_NO_DEPRECATE
215
- #endif
216
-
217
-
218
206
  /* -----------------------------------------------------------------------------
219
207
  * swigrun.swg
220
208
  *
@@ -224,7 +212,7 @@
224
212
 
225
213
  /* This should only be incremented when either the layout of swig_type_info changes,
226
214
  or for whatever reason, the runtime changes incompatibly */
227
- #define SWIG_RUNTIME_VERSION "4"
215
+ #define SWIG_RUNTIME_VERSION "3"
228
216
 
229
217
  /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
230
218
  #ifdef SWIG_TYPE_TABLE
@@ -259,7 +247,6 @@
259
247
 
260
248
  /* Flags for pointer conversions */
261
249
  #define SWIG_POINTER_DISOWN 0x1
262
- #define SWIG_CAST_NEW_MEMORY 0x2
263
250
 
264
251
  /* Flags for new pointer objects */
265
252
  #define SWIG_POINTER_OWN 0x1
@@ -400,10 +387,10 @@ SWIGINTERNINLINE int SWIG_CheckState(int r) {
400
387
  extern "C" {
401
388
  #endif
402
389
 
403
- typedef void *(*swig_converter_func)(void *, int *);
390
+ typedef void *(*swig_converter_func)(void *);
404
391
  typedef struct swig_type_info *(*swig_dycast_func)(void **);
405
392
 
406
- /* Structure to store information on one type */
393
+ /* Structure to store inforomation on one type */
407
394
  typedef struct swig_type_info {
408
395
  const char *name; /* mangled name of this type */
409
396
  const char *str; /* human readable name of this type */
@@ -448,7 +435,7 @@ SWIG_TypeNameComp(const char *f1, const char *l1,
448
435
  while ((*f2 == ' ') && (f2 != l2)) ++f2;
449
436
  if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
450
437
  }
451
- return (int)((l1 - f1) - (l2 - f2));
438
+ return (l1 - f1) - (l2 - f2);
452
439
  }
453
440
 
454
441
  /*
@@ -530,8 +517,8 @@ SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *into) {
530
517
  Cast a pointer up an inheritance hierarchy
531
518
  */
532
519
  SWIGRUNTIMEINLINE void *
533
- SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
534
- return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
520
+ SWIG_TypeCast(swig_cast_info *ty, void *ptr) {
521
+ return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr);
535
522
  }
536
523
 
537
524
  /*
@@ -804,15 +791,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
804
791
 
805
792
  #include <ruby.h>
806
793
 
807
- /* Remove global macros defined in Ruby's win32.h */
808
- #ifdef write
809
- # undef write
810
- #endif
811
- #ifdef read
812
- # undef read
813
- #endif
814
-
815
-
816
794
  /* Ruby 1.7 defines NUM2LL(), LL2NUM() and ULL2NUM() macros */
817
795
  #ifndef NUM2LL
818
796
  #define NUM2LL(x) NUM2LONG((x))
@@ -841,44 +819,12 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
841
819
  #ifndef RSTRING_PTR
842
820
  # define RSTRING_PTR(x) RSTRING(x)->ptr
843
821
  #endif
844
- #ifndef RSTRING_END
845
- # define RSTRING_END(x) (RSTRING_PTR(x) + RSTRING_LEN(x))
846
- #endif
847
822
  #ifndef RARRAY_LEN
848
823
  # define RARRAY_LEN(x) RARRAY(x)->len
849
824
  #endif
850
825
  #ifndef RARRAY_PTR
851
826
  # define RARRAY_PTR(x) RARRAY(x)->ptr
852
827
  #endif
853
- #ifndef RFLOAT_VALUE
854
- # define RFLOAT_VALUE(x) RFLOAT(x)->value
855
- #endif
856
- #ifndef DOUBLE2NUM
857
- # define DOUBLE2NUM(x) rb_float_new(x)
858
- #endif
859
- #ifndef RHASH_TBL
860
- # define RHASH_TBL(x) (RHASH(x)->tbl)
861
- #endif
862
- #ifndef RHASH_ITER_LEV
863
- # define RHASH_ITER_LEV(x) (RHASH(x)->iter_lev)
864
- #endif
865
- #ifndef RHASH_IFNONE
866
- # define RHASH_IFNONE(x) (RHASH(x)->ifnone)
867
- #endif
868
- #ifndef RHASH_SIZE
869
- # define RHASH_SIZE(x) (RHASH(x)->tbl->num_entries)
870
- #endif
871
- #ifndef RHASH_EMPTY_P
872
- # define RHASH_EMPTY_P(x) (RHASH_SIZE(x) == 0)
873
- #endif
874
- #ifndef RSTRUCT_LEN
875
- # define RSTRUCT_LEN(x) RSTRUCT(x)->len
876
- #endif
877
- #ifndef RSTRUCT_PTR
878
- # define RSTRUCT_PTR(x) RSTRUCT(x)->ptr
879
- #endif
880
-
881
-
882
828
 
883
829
  /*
884
830
  * Need to be very careful about how these macros are defined, especially
@@ -940,7 +886,6 @@ SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
940
886
  #define rb_undef_alloc_func(klass) rb_undef_method(CLASS_OF((klass)), "new")
941
887
  #endif
942
888
 
943
- static VALUE _mSWIG = Qnil;
944
889
 
945
890
  /* -----------------------------------------------------------------------------
946
891
  * error manipulation
@@ -1031,71 +976,7 @@ SWIG_Ruby_ErrorType(int SWIG_code) {
1031
976
  }
1032
977
 
1033
978
 
1034
- /* This function is called when a user inputs a wrong argument to
1035
- a method.
1036
- */
1037
- SWIGINTERN
1038
- const char* Ruby_Format_TypeError( const char* msg,
1039
- const char* type,
1040
- const char* name,
1041
- const int argn,
1042
- VALUE input )
1043
- {
1044
- char buf[128];
1045
- VALUE str;
1046
- VALUE asStr;
1047
- if ( msg && *msg )
1048
- {
1049
- str = rb_str_new2(msg);
1050
- }
1051
- else
1052
- {
1053
- str = rb_str_new(NULL, 0);
1054
- }
1055
-
1056
- str = rb_str_cat2( str, "Expected argument " );
1057
- sprintf( buf, "%d of type ", argn-1 );
1058
- str = rb_str_cat2( str, buf );
1059
- str = rb_str_cat2( str, type );
1060
- str = rb_str_cat2( str, ", but got " );
1061
- str = rb_str_cat2( str, rb_obj_classname(input) );
1062
- str = rb_str_cat2( str, " " );
1063
- asStr = rb_inspect(input);
1064
- if ( RSTRING_LEN(asStr) > 30 )
1065
- {
1066
- str = rb_str_cat( str, StringValuePtr(asStr), 30 );
1067
- str = rb_str_cat2( str, "..." );
1068
- }
1069
- else
1070
- {
1071
- str = rb_str_append( str, asStr );
1072
- }
1073
-
1074
- if ( name )
1075
- {
1076
- str = rb_str_cat2( str, "\n\tin SWIG method '" );
1077
- str = rb_str_cat2( str, name );
1078
- str = rb_str_cat2( str, "'" );
1079
- }
1080
979
 
1081
- return StringValuePtr( str );
1082
- }
1083
-
1084
- /* This function is called when an overloaded method fails */
1085
- SWIGINTERN
1086
- void Ruby_Format_OverloadedError(
1087
- const int argc,
1088
- const int maxargs,
1089
- const char* method,
1090
- const char* prototypes
1091
- )
1092
- {
1093
- const char* msg = "Wrong # of arguments";
1094
- if ( argc <= maxargs ) msg = "Wrong arguments";
1095
- rb_raise(rb_eArgError,"%s for overloaded method '%s'.\n"
1096
- "Possible C/C++ prototypes are:\n%s",
1097
- msg, method, prototypes);
1098
- }
1099
980
 
1100
981
  /* -----------------------------------------------------------------------------
1101
982
  * See the LICENSE file for information on copyright, usage and redistribution
@@ -1113,54 +994,26 @@ void Ruby_Format_OverloadedError(
1113
994
  extern "C" {
1114
995
  #endif
1115
996
 
1116
- /* Ruby 1.8 actually assumes the first case. */
1117
- #if SIZEOF_VOIDP == SIZEOF_LONG
1118
- # define SWIG2NUM(v) LONG2NUM((unsigned long)v)
1119
- # define NUM2SWIG(x) (unsigned long)NUM2LONG(x)
1120
- #elif SIZEOF_VOIDP == SIZEOF_LONG_LONG
1121
- # define SWIG2NUM(v) LL2NUM((unsigned long long)v)
1122
- # define NUM2SWIG(x) (unsigned long long)NUM2LL(x)
1123
- #else
1124
- # error sizeof(void*) is not the same as long or long long
1125
- #endif
1126
-
1127
997
 
1128
998
  /* Global Ruby hash table to store Trackings from C/C++
1129
- structs to Ruby Objects.
1130
- */
1131
- static VALUE swig_ruby_trackings = Qnil;
1132
-
1133
- /* Global variable that stores a reference to the ruby
1134
- hash table delete function. */
1135
- static ID swig_ruby_hash_delete;
999
+ structs to Ruby Objects. */
1000
+ static VALUE swig_ruby_trackings;
1001
+
1002
+ /* Global variable that stores a reference to the ruby
1003
+ hash table delete function. */
1004
+ static ID swig_ruby_hash_delete = 0;
1136
1005
 
1137
1006
  /* Setup a Ruby hash table to store Trackings */
1138
1007
  SWIGRUNTIME void SWIG_RubyInitializeTrackings(void) {
1139
1008
  /* Create a ruby hash table to store Trackings from C++
1140
- objects to Ruby objects. */
1141
-
1142
- /* Try to see if some other .so has already created a
1143
- tracking hash table, which we keep hidden in an instance var
1144
- in the SWIG module.
1145
- This is done to allow multiple DSOs to share the same
1146
- tracking table.
1147
- */
1148
- ID trackings_id = rb_intern( "@__trackings__" );
1149
- VALUE verbose = rb_gv_get("VERBOSE");
1150
- rb_gv_set("VERBOSE", Qfalse);
1151
- swig_ruby_trackings = rb_ivar_get( _mSWIG, trackings_id );
1152
- rb_gv_set("VERBOSE", verbose);
1153
-
1154
- /* No, it hasn't. Create one ourselves */
1155
- if ( swig_ruby_trackings == Qnil )
1156
- {
1157
- swig_ruby_trackings = rb_hash_new();
1158
- rb_ivar_set( _mSWIG, trackings_id, swig_ruby_trackings );
1159
- }
1160
-
1161
- /* Now store a reference to the hash table delete function
1162
- so that we only have to look it up once.*/
1163
- swig_ruby_hash_delete = rb_intern("delete");
1009
+ objects to Ruby objects. Also make sure to tell
1010
+ the garabage collector about the hash table. */
1011
+ swig_ruby_trackings = rb_hash_new();
1012
+ rb_gc_register_address(&swig_ruby_trackings);
1013
+
1014
+ /* Now store a reference to the hash table delete function
1015
+ so that we only have to look it up once.*/
1016
+ swig_ruby_hash_delete = rb_intern("delete");
1164
1017
  }
1165
1018
 
1166
1019
  /* Get a Ruby number to reference a pointer */
@@ -1170,7 +1023,8 @@ SWIGRUNTIME VALUE SWIG_RubyPtrToReference(void* ptr) {
1170
1023
  a Ruby number object. */
1171
1024
 
1172
1025
  /* Convert the pointer to a Ruby number */
1173
- return SWIG2NUM(ptr);
1026
+ unsigned long value = (unsigned long) ptr;
1027
+ return LONG2NUM(value);
1174
1028
  }
1175
1029
 
1176
1030
  /* Get a Ruby number to reference an object */
@@ -1180,7 +1034,8 @@ SWIGRUNTIME VALUE SWIG_RubyObjectToReference(VALUE object) {
1180
1034
  a Ruby number object. */
1181
1035
 
1182
1036
  /* Convert the Object to a Ruby number */
1183
- return SWIG2NUM(object);
1037
+ unsigned long value = (unsigned long) object;
1038
+ return LONG2NUM(value);
1184
1039
  }
1185
1040
 
1186
1041
  /* Get a Ruby object from a previously stored reference */
@@ -1188,8 +1043,9 @@ SWIGRUNTIME VALUE SWIG_RubyReferenceToObject(VALUE reference) {
1188
1043
  /* The provided Ruby number object is a reference
1189
1044
  to the Ruby object we want.*/
1190
1045
 
1191
- /* Convert the Ruby number to a Ruby object */
1192
- return NUM2SWIG(reference);
1046
+ /* First convert the Ruby number to a C number */
1047
+ unsigned long value = NUM2LONG(reference);
1048
+ return (VALUE) value;
1193
1049
  }
1194
1050
 
1195
1051
  /* Add a Tracking from a C/C++ struct to a Ruby object */
@@ -1281,15 +1137,6 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
1281
1137
  return target;
1282
1138
  }
1283
1139
 
1284
- /* For ruby1.8.4 and earlier. */
1285
- #ifndef RUBY_INIT_STACK
1286
- RUBY_EXTERN void Init_stack(VALUE* addr);
1287
- # define RUBY_INIT_STACK \
1288
- VALUE variable_in_this_stack_frame; \
1289
- Init_stack(&variable_in_this_stack_frame);
1290
- #endif
1291
-
1292
-
1293
1140
  #ifdef __cplusplus
1294
1141
  }
1295
1142
  #endif
@@ -1354,7 +1201,6 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
1354
1201
  #define SWIG_MangleStr(value) SWIG_Ruby_MangleStr(value)
1355
1202
  #define SWIG_CheckConvert(value, ty) SWIG_Ruby_CheckConvert(value, ty)
1356
1203
 
1357
- #include "assert.h"
1358
1204
 
1359
1205
  /* -----------------------------------------------------------------------------
1360
1206
  * pointers/data manipulation
@@ -1362,6 +1208,9 @@ SWIG_Ruby_AppendOutput(VALUE target, VALUE o) {
1362
1208
 
1363
1209
  #ifdef __cplusplus
1364
1210
  extern "C" {
1211
+ #if 0
1212
+ } /* cc-mode */
1213
+ #endif
1365
1214
  #endif
1366
1215
 
1367
1216
  typedef struct {
@@ -1373,44 +1222,10 @@ typedef struct {
1373
1222
  } swig_class;
1374
1223
 
1375
1224
 
1376
- /* Global pointer used to keep some internal SWIG stuff */
1225
+ static VALUE _mSWIG = Qnil;
1377
1226
  static VALUE _cSWIG_Pointer = Qnil;
1378
1227
  static VALUE swig_runtime_data_type_pointer = Qnil;
1379
1228
 
1380
- /* Global IDs used to keep some internal SWIG stuff */
1381
- static ID swig_arity_id = 0;
1382
- static ID swig_call_id = 0;
1383
-
1384
- /*
1385
- If your swig extension is to be run within an embedded ruby and has
1386
- director callbacks, you should set -DRUBY_EMBEDDED during compilation.
1387
- This will reset ruby's stack frame on each entry point from the main
1388
- program the first time a virtual director function is invoked (in a
1389
- non-recursive way).
1390
- If this is not done, you run the risk of Ruby trashing the stack.
1391
- */
1392
-
1393
- #ifdef RUBY_EMBEDDED
1394
-
1395
- # define SWIG_INIT_STACK \
1396
- if ( !swig_virtual_calls ) { RUBY_INIT_STACK } \
1397
- ++swig_virtual_calls;
1398
- # define SWIG_RELEASE_STACK --swig_virtual_calls;
1399
- # define Ruby_DirectorTypeMismatchException(x) \
1400
- rb_raise( rb_eTypeError, x ); return c_result;
1401
-
1402
- static unsigned int swig_virtual_calls = 0;
1403
-
1404
- #else /* normal non-embedded extension */
1405
-
1406
- # define SWIG_INIT_STACK
1407
- # define SWIG_RELEASE_STACK
1408
- # define Ruby_DirectorTypeMismatchException(x) \
1409
- throw Swig::DirectorTypeMismatchException( x );
1410
-
1411
- #endif /* RUBY_EMBEDDED */
1412
-
1413
-
1414
1229
  SWIGRUNTIME VALUE
1415
1230
  getExceptionClass(void) {
1416
1231
  static int init = 0;
@@ -1442,8 +1257,6 @@ SWIG_Ruby_InitRuntime(void)
1442
1257
  {
1443
1258
  if (_mSWIG == Qnil) {
1444
1259
  _mSWIG = rb_define_module("SWIG");
1445
- swig_call_id = rb_intern("call");
1446
- swig_arity_id = rb_intern("arity");
1447
1260
  }
1448
1261
  }
1449
1262
 
@@ -1467,7 +1280,7 @@ SWIGRUNTIME VALUE
1467
1280
  SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1468
1281
  {
1469
1282
  int own = flags & SWIG_POINTER_OWN;
1470
- int track;
1283
+
1471
1284
  char *klass_name;
1472
1285
  swig_class *sklass;
1473
1286
  VALUE klass;
@@ -1480,15 +1293,14 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1480
1293
  sklass = (swig_class *) type->clientdata;
1481
1294
 
1482
1295
  /* Are we tracking this class and have we already returned this Ruby object? */
1483
- track = sklass->trackObjects;
1484
- if (track) {
1296
+ if (sklass->trackObjects) {
1485
1297
  obj = SWIG_RubyInstanceFor(ptr);
1486
1298
 
1487
1299
  /* Check the object's type and make sure it has the correct type.
1488
1300
  It might not in cases where methods do things like
1489
1301
  downcast methods. */
1490
1302
  if (obj != Qnil) {
1491
- VALUE value = rb_iv_get(obj, "@__swigtype__");
1303
+ VALUE value = rb_iv_get(obj, "__swigtype__");
1492
1304
  char* type_name = RSTRING_PTR(value);
1493
1305
 
1494
1306
  if (strcmp(type->name, type_name) == 0) {
@@ -1498,13 +1310,10 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1498
1310
  }
1499
1311
 
1500
1312
  /* Create a new Ruby object */
1501
- obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark),
1502
- ( own ? VOIDFUNC(sklass->destroy) :
1503
- (track ? VOIDFUNC(SWIG_RubyRemoveTracking) : 0 )
1504
- ), ptr);
1313
+ obj = Data_Wrap_Struct(sklass->klass, VOIDFUNC(sklass->mark), (own ? VOIDFUNC(sklass->destroy) : 0), ptr);
1505
1314
 
1506
1315
  /* If tracking is on for this class then track this object. */
1507
- if (track) {
1316
+ if (sklass->trackObjects) {
1508
1317
  SWIG_RubyAddTracking(ptr, obj);
1509
1318
  }
1510
1319
  } else {
@@ -1514,7 +1323,7 @@ SWIG_Ruby_NewPointerObj(void *ptr, swig_type_info *type, int flags)
1514
1323
  free((void *) klass_name);
1515
1324
  obj = Data_Wrap_Struct(klass, 0, 0, ptr);
1516
1325
  }
1517
- rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1326
+ rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
1518
1327
 
1519
1328
  return obj;
1520
1329
  }
@@ -1526,7 +1335,7 @@ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
1526
1335
  VALUE obj;
1527
1336
  swig_class *sklass = (swig_class *) type->clientdata;
1528
1337
  obj = Data_Wrap_Struct(klass, VOIDFUNC(sklass->mark), VOIDFUNC(sklass->destroy), 0);
1529
- rb_iv_set(obj, "@__swigtype__", rb_str_new2(type->name));
1338
+ rb_iv_set(obj, "__swigtype__", rb_str_new2(type->name));
1530
1339
  return obj;
1531
1340
  }
1532
1341
 
@@ -1534,7 +1343,7 @@ SWIG_Ruby_NewClassInstance(VALUE klass, swig_type_info *type)
1534
1343
  SWIGRUNTIMEINLINE char *
1535
1344
  SWIG_Ruby_MangleStr(VALUE obj)
1536
1345
  {
1537
- VALUE stype = rb_iv_get(obj, "@__swigtype__");
1346
+ VALUE stype = rb_iv_get(obj, "__swigtype__");
1538
1347
  return StringValuePtr(stype);
1539
1348
  }
1540
1349
 
@@ -1616,11 +1425,8 @@ SWIG_Ruby_ConvertPtrAndOwn(VALUE obj, void **ptr, swig_type_info *ty, int flags,
1616
1425
  tc = SWIG_TypeCheck(c, ty);
1617
1426
  if (!tc) {
1618
1427
  return SWIG_ERROR;
1619
- } else {
1620
- int newmemory = 0;
1621
- *ptr = SWIG_TypeCast(tc, vptr, &newmemory);
1622
- assert(!newmemory); /* newmemory handling not yet implemented */
1623
1428
  }
1429
+ *ptr = SWIG_TypeCast(tc, vptr);
1624
1430
  } else {
1625
1431
  *ptr = vptr;
1626
1432
  }
@@ -1701,42 +1507,10 @@ SWIG_Ruby_SetModule(swig_module_info *pointer)
1701
1507
  rb_define_readonly_variable("$swig_runtime_data_type_pointer" SWIG_RUNTIME_VERSION SWIG_TYPE_TABLE_NAME, &swig_runtime_data_type_pointer);
1702
1508
  }
1703
1509
 
1704
- /* This function can be used to check whether a proc or method or similarly
1705
- callable function has been passed. Usually used in a %typecheck, like:
1706
-
1707
- %typecheck(c_callback_t, precedence=SWIG_TYPECHECK_POINTER) {
1708
- $result = SWIG_Ruby_isCallable( $input );
1709
- }
1710
- */
1711
- SWIGINTERN
1712
- int SWIG_Ruby_isCallable( VALUE proc )
1713
- {
1714
- if ( rb_respond_to( proc, swig_call_id ) == Qtrue )
1715
- return 1;
1716
- return 0;
1717
- }
1718
-
1719
- /* This function can be used to check the arity (number of arguments)
1720
- a proc or method can take. Usually used in a %typecheck.
1721
- Valid arities will be that equal to minimal or those < 0
1722
- which indicate a variable number of parameters at the end.
1723
- */
1724
- SWIGINTERN
1725
- int SWIG_Ruby_arity( VALUE proc, int minimal )
1726
- {
1727
- if ( rb_respond_to( proc, swig_arity_id ) == Qtrue )
1728
- {
1729
- VALUE num = rb_funcall( proc, swig_arity_id, 0 );
1730
- int arity = NUM2INT(num);
1731
- if ( arity < 0 && (arity+1) < -minimal ) return 1;
1732
- if ( arity == minimal ) return 1;
1733
- return 1;
1734
- }
1735
- return 0;
1736
- }
1737
-
1738
-
1739
1510
  #ifdef __cplusplus
1511
+ #if 0
1512
+ { /* cc-mode */
1513
+ #endif
1740
1514
  }
1741
1515
  #endif
1742
1516
 
@@ -1771,11 +1545,7 @@ static swig_module_info swig_module = {swig_types, 6, 0, 0, 0, 0};
1771
1545
 
1772
1546
  static VALUE mMiriad;
1773
1547
 
1774
- #define SWIG_RUBY_THREAD_BEGIN_BLOCK
1775
- #define SWIG_RUBY_THREAD_END_BLOCK
1776
-
1777
-
1778
- #define SWIGVERSION 0x010335
1548
+ #define SWIGVERSION 0x010331
1779
1549
  #define SWIG_VERSION SWIGVERSION
1780
1550
 
1781
1551
 
@@ -1870,11 +1640,11 @@ SWIGINTERN int
1870
1640
  SWIG_AsCharPtrAndSize(VALUE obj, char** cptr, size_t* psize, int *alloc)
1871
1641
  {
1872
1642
  if (TYPE(obj) == T_STRING) {
1873
- #if defined(StringValuePtr)
1874
- char *cstr = StringValuePtr(obj);
1875
- #else
1643
+
1644
+
1645
+
1876
1646
  char *cstr = STR2CSTR(obj);
1877
- #endif
1647
+
1878
1648
  size_t size = RSTRING_LEN(obj) + 1;
1879
1649
  if (cptr) {
1880
1650
  if (alloc) {
@@ -1961,12 +1731,14 @@ SWIGINTERN void uvio_probvr(uvio *self,char *var,char *type,int *length,int *upd
1961
1731
  }
1962
1732
 
1963
1733
  #include <limits.h>
1964
- #if !defined(SWIG_NO_LLONG_MAX)
1965
- # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
1966
- # define LLONG_MAX __LONG_LONG_MAX__
1967
- # define LLONG_MIN (-LLONG_MAX - 1LL)
1968
- # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
1969
- # endif
1734
+ #ifndef LLONG_MIN
1735
+ # define LLONG_MIN LONG_LONG_MIN
1736
+ #endif
1737
+ #ifndef LLONG_MAX
1738
+ # define LLONG_MAX LONG_LONG_MAX
1739
+ #endif
1740
+ #ifndef ULLONG_MAX
1741
+ # define ULLONG_MAX ULONG_LONG_MAX
1970
1742
  #endif
1971
1743
 
1972
1744
 
@@ -1977,7 +1749,7 @@ SWIG_ruby_failed(void)
1977
1749
  }
1978
1750
 
1979
1751
 
1980
- /*@SWIG:/Users/davidm/local/share/swig/1.3.35/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
1752
+ /*@SWIG:%ruby_aux_method@*/
1981
1753
  SWIGINTERN VALUE SWIG_AUX_NUM2LONG(VALUE *args)
1982
1754
  {
1983
1755
  VALUE obj = args[0];
@@ -2034,7 +1806,7 @@ SWIGINTERN void uvio_wwrite(uvio *self,float *data,int *flags,int n){
2034
1806
  uvwwrite_c(self->fd, data, flags, n);
2035
1807
  }
2036
1808
 
2037
- /*@SWIG:/Users/davidm/local/share/swig/1.3.35/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
1809
+ /*@SWIG:%ruby_aux_method@*/
2038
1810
  SWIGINTERN VALUE SWIG_AUX_NUM2DBL(VALUE *args)
2039
1811
  {
2040
1812
  VALUE obj = args[0];
@@ -2184,7 +1956,7 @@ SWIGINTERN void uvio_hdaccess(uvio *self,int ihandle){
2184
1956
  }
2185
1957
  }
2186
1958
 
2187
- /*@SWIG:/Users/davidm/local/share/swig/1.3.35/ruby/rubyprimtypes.swg,23,%ruby_aux_method@*/
1959
+ /*@SWIG:%ruby_aux_method@*/
2188
1960
  SWIGINTERN VALUE SWIG_AUX_NUM2ULONG(VALUE *args)
2189
1961
  {
2190
1962
  VALUE obj = args[0];
@@ -2298,7 +2070,7 @@ _wrap_new_Uvio(int argc, VALUE *argv, VALUE self) {
2298
2070
  }
2299
2071
  res2 = SWIG_AsCharPtrAndSize(argv[1], &buf2, NULL, &alloc2);
2300
2072
  if (!SWIG_IsOK(res2)) {
2301
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","uvio", 2, argv[1] ));
2073
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "uvio" "', argument " "2"" of type '" "char *""'");
2302
2074
  }
2303
2075
  arg2 = (char *)(buf2);
2304
2076
  result = (uvio *)new_uvio(arg1,arg2);DATA_PTR(self) = result;
@@ -2336,7 +2108,7 @@ _wrap_Uvio_close(int argc, VALUE *argv, VALUE self) {
2336
2108
  }
2337
2109
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
2338
2110
  if (!SWIG_IsOK(res1)) {
2339
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","close", 1, self ));
2111
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "close" "', argument " "1"" of type '" "uvio *""'");
2340
2112
  }
2341
2113
  arg1 = (uvio *)(argp1);
2342
2114
  uvio_close(arg1);
@@ -2357,7 +2129,7 @@ _wrap_Uvio_flush(int argc, VALUE *argv, VALUE self) {
2357
2129
  }
2358
2130
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
2359
2131
  if (!SWIG_IsOK(res1)) {
2360
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","flush", 1, self ));
2132
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flush" "', argument " "1"" of type '" "uvio *""'");
2361
2133
  }
2362
2134
  arg1 = (uvio *)(argp1);
2363
2135
  uvio_flush(arg1);
@@ -2378,7 +2150,7 @@ _wrap_Uvio_uvnext(int argc, VALUE *argv, VALUE self) {
2378
2150
  }
2379
2151
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
2380
2152
  if (!SWIG_IsOK(res1)) {
2381
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","uvnext", 1, self ));
2153
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "uvnext" "', argument " "1"" of type '" "uvio *""'");
2382
2154
  }
2383
2155
  arg1 = (uvio *)(argp1);
2384
2156
  uvio_uvnext(arg1);
@@ -2399,7 +2171,7 @@ _wrap_Uvio_rewind(int argc, VALUE *argv, VALUE self) {
2399
2171
  }
2400
2172
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
2401
2173
  if (!SWIG_IsOK(res1)) {
2402
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","rewind", 1, self ));
2174
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rewind" "', argument " "1"" of type '" "uvio *""'");
2403
2175
  }
2404
2176
  arg1 = (uvio *)(argp1);
2405
2177
  uvio_rewind(arg1);
@@ -2436,12 +2208,12 @@ _wrap_Uvio_probvr(int argc, VALUE *argv, VALUE self) {
2436
2208
  }
2437
2209
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
2438
2210
  if (!SWIG_IsOK(res1)) {
2439
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","probvr", 1, self ));
2211
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "probvr" "', argument " "1"" of type '" "uvio *""'");
2440
2212
  }
2441
2213
  arg1 = (uvio *)(argp1);
2442
2214
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
2443
2215
  if (!SWIG_IsOK(res2)) {
2444
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","probvr", 2, argv[0] ));
2216
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "probvr" "', argument " "2"" of type '" "char *""'");
2445
2217
  }
2446
2218
  arg2 = (char *)(buf2);
2447
2219
  uvio_probvr(arg1,arg2,arg3,arg4,arg5);
@@ -2482,12 +2254,12 @@ _wrap_Uvio_putvr(int argc, VALUE *argv, VALUE self) {
2482
2254
  }
2483
2255
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
2484
2256
  if (!SWIG_IsOK(res1)) {
2485
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","putvr", 1, self ));
2257
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "putvr" "', argument " "1"" of type '" "uvio *""'");
2486
2258
  }
2487
2259
  arg1 = (uvio *)(argp1);
2488
2260
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
2489
2261
  if (!SWIG_IsOK(res2)) {
2490
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","putvr", 2, argv[0] ));
2262
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "putvr" "', argument " "2"" of type '" "char *""'");
2491
2263
  }
2492
2264
  arg2 = (char *)(buf2);
2493
2265
  {
@@ -2510,7 +2282,7 @@ _wrap_Uvio_putvr(int argc, VALUE *argv, VALUE self) {
2510
2282
  } else {
2511
2283
  VALUE elem0 = argv[1];
2512
2284
  if(TYPE(argv[1]) == T_ARRAY) {
2513
- arg4 = RARRAY(argv[1])->len;
2285
+ arg4 = RARRAY_LEN(argv[1]);
2514
2286
  elem0 = rb_ary_entry(argv[1],0);
2515
2287
  } else {
2516
2288
  // Convert into one element array
@@ -2612,12 +2384,12 @@ _wrap_Uvio_scan(int argc, VALUE *argv, VALUE self) {
2612
2384
  }
2613
2385
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
2614
2386
  if (!SWIG_IsOK(res1)) {
2615
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","scan", 1, self ));
2387
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "scan" "', argument " "1"" of type '" "uvio *""'");
2616
2388
  }
2617
2389
  arg1 = (uvio *)(argp1);
2618
2390
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
2619
2391
  if (!SWIG_IsOK(res2)) {
2620
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","scan", 2, argv[0] ));
2392
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "scan" "', argument " "2"" of type '" "char *""'");
2621
2393
  }
2622
2394
  arg2 = (char *)(buf2);
2623
2395
  uvio_scan(arg1,arg2);
@@ -2647,7 +2419,7 @@ _wrap_Uvio_write(int argc, VALUE *argv, VALUE self) {
2647
2419
  }
2648
2420
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
2649
2421
  if (!SWIG_IsOK(res1)) {
2650
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","write", 1, self ));
2422
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write" "', argument " "1"" of type '" "uvio *""'");
2651
2423
  }
2652
2424
  arg1 = (uvio *)(argp1);
2653
2425
  {
@@ -2660,10 +2432,10 @@ _wrap_Uvio_write(int argc, VALUE *argv, VALUE self) {
2660
2432
  Check_Type(argv[0], T_ARRAY);
2661
2433
  // Get the length of the array
2662
2434
  // TODO Bounds checking somehow?
2663
- int n = RARRAY(argv[0])->len;
2435
+ int n = RARRAY_LEN(argv[0]);
2664
2436
  arg2 = ALLOCA_N(double, n);
2665
2437
  // Get the first element in array
2666
- VALUE *ptr = RARRAY(argv[0])->ptr;
2438
+ VALUE *ptr = RARRAY_PTR(argv[0]);
2667
2439
  for (i=0; i < n; i++) {
2668
2440
  // Convert Ruby Object to double
2669
2441
  arg2[i] = NUM2DBL(ptr[i]);
@@ -2683,9 +2455,9 @@ _wrap_Uvio_write(int argc, VALUE *argv, VALUE self) {
2683
2455
  } else {
2684
2456
  Check_Type(argv[1], T_ARRAY);
2685
2457
  // Allocate C array on stack
2686
- ndata3 = RARRAY(argv[1])->len;
2458
+ ndata3 = RARRAY_LEN(argv[1]);
2687
2459
  arg3 = ALLOCA_N(float,ndata3);
2688
- VALUE * ptr = RARRAY(argv[1])->ptr;
2460
+ VALUE * ptr = RARRAY_PTR(argv[1]);
2689
2461
  // TODO Use write in #if to avoid copying on read?
2690
2462
  for(i=0; i < ndata3; i++) {
2691
2463
  arg3[i] = NUM2DBL(ptr[i]);
@@ -2702,9 +2474,9 @@ _wrap_Uvio_write(int argc, VALUE *argv, VALUE self) {
2702
2474
  nflag4 = NA_TOTAL(argv[2]);
2703
2475
  } else {
2704
2476
  Check_Type(argv[2], T_ARRAY);
2705
- nflag4 = RARRAY(argv[2])->len;
2477
+ nflag4 = RARRAY_LEN(argv[2]);
2706
2478
  arg4 = ALLOCA_N(int,nflag4);
2707
- VALUE * ptr = RARRAY(argv[2])->ptr;
2479
+ VALUE * ptr = RARRAY_PTR(argv[2]);
2708
2480
  for(i=0; i < nflag4; i++) {
2709
2481
  arg4[i] = FIX2INT(ptr[i]);
2710
2482
  }
@@ -2719,16 +2491,15 @@ _wrap_Uvio_write(int argc, VALUE *argv, VALUE self) {
2719
2491
  }
2720
2492
  }
2721
2493
  uvio_write(arg1,arg2,arg3,arg4,arg5);
2722
- vresult = rb_ary_new();
2723
2494
  {
2724
2495
  // If NArray, data are already in place
2725
2496
  if(TYPE(argv[0]) == T_ARRAY) {
2726
2497
  int i;
2727
2498
  // Get the length of the array
2728
2499
  // TODO Bounds checking somehow?
2729
- int n = RARRAY(argv[0])->len;
2500
+ int n = RARRAY_LEN(argv[0]);
2730
2501
  // Get the first element in array
2731
- VALUE *ptr = RARRAY(argv[0])->ptr;
2502
+ VALUE *ptr = RARRAY_PTR(argv[0]);
2732
2503
  for (i=0; i < n; i++) {
2733
2504
  // Store or convert doubles to Ruby Objects
2734
2505
  if(TYPE(ptr[i]) == T_FLOAT) {
@@ -2746,8 +2517,8 @@ _wrap_Uvio_write(int argc, VALUE *argv, VALUE self) {
2746
2517
  int i;
2747
2518
  // If NArray, data are already in place
2748
2519
  if(TYPE(argv[1]) == T_ARRAY) {
2749
- ndata = RARRAY(argv[1])->len;
2750
- VALUE * ptr = RARRAY(argv[1])->ptr;
2520
+ ndata = RARRAY_LEN(argv[1]);
2521
+ VALUE * ptr = RARRAY_PTR(argv[1]);
2751
2522
  for(i=0; i < ndata; i++) {
2752
2523
  // Store or convert doubles to Ruby Objects
2753
2524
  if(TYPE(ptr[i]) == T_FLOAT) {
@@ -2765,8 +2536,8 @@ _wrap_Uvio_write(int argc, VALUE *argv, VALUE self) {
2765
2536
  int i;
2766
2537
  // If NArray, data are already in place
2767
2538
  if(TYPE(argv[2]) == T_ARRAY) {
2768
- nflag = RARRAY(argv[2])->len;
2769
- VALUE * ptr = RARRAY(argv[2])->ptr;
2539
+ nflag = RARRAY_LEN(argv[2]);
2540
+ VALUE * ptr = RARRAY_PTR(argv[2]);
2770
2541
  for(i=0; i < nflag; i++) {
2771
2542
  ptr[i] = INT2FIX(arg4[i]);
2772
2543
  }
@@ -2796,7 +2567,7 @@ _wrap_Uvio_wwrite(int argc, VALUE *argv, VALUE self) {
2796
2567
  }
2797
2568
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
2798
2569
  if (!SWIG_IsOK(res1)) {
2799
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","wwrite", 1, self ));
2570
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wwrite" "', argument " "1"" of type '" "uvio *""'");
2800
2571
  }
2801
2572
  arg1 = (uvio *)(argp1);
2802
2573
  {
@@ -2812,9 +2583,9 @@ _wrap_Uvio_wwrite(int argc, VALUE *argv, VALUE self) {
2812
2583
  } else {
2813
2584
  Check_Type(argv[0], T_ARRAY);
2814
2585
  // Allocate C array on stack
2815
- ndata2 = RARRAY(argv[0])->len;
2586
+ ndata2 = RARRAY_LEN(argv[0]);
2816
2587
  arg2 = ALLOCA_N(float,ndata2);
2817
- VALUE * ptr = RARRAY(argv[0])->ptr;
2588
+ VALUE * ptr = RARRAY_PTR(argv[0]);
2818
2589
  // TODO Use wwrite in #if to avoid copying on read?
2819
2590
  for(i=0; i < ndata2; i++) {
2820
2591
  arg2[i] = NUM2DBL(ptr[i]);
@@ -2831,9 +2602,9 @@ _wrap_Uvio_wwrite(int argc, VALUE *argv, VALUE self) {
2831
2602
  nflag3 = NA_TOTAL(argv[1]);
2832
2603
  } else {
2833
2604
  Check_Type(argv[1], T_ARRAY);
2834
- nflag3 = RARRAY(argv[1])->len;
2605
+ nflag3 = RARRAY_LEN(argv[1]);
2835
2606
  arg3 = ALLOCA_N(int,nflag3);
2836
- VALUE * ptr = RARRAY(argv[1])->ptr;
2607
+ VALUE * ptr = RARRAY_PTR(argv[1]);
2837
2608
  for(i=0; i < nflag3; i++) {
2838
2609
  arg3[i] = FIX2INT(ptr[i]);
2839
2610
  }
@@ -2842,14 +2613,13 @@ _wrap_Uvio_wwrite(int argc, VALUE *argv, VALUE self) {
2842
2613
  arg4 = nflag3;
2843
2614
  }
2844
2615
  uvio_wwrite(arg1,arg2,arg3,arg4);
2845
- vresult = rb_ary_new();
2846
2616
  {
2847
2617
  int ndata;
2848
2618
  int i;
2849
2619
  // If NArray, data are already in place
2850
2620
  if(TYPE(argv[0]) == T_ARRAY) {
2851
- ndata = RARRAY(argv[0])->len;
2852
- VALUE * ptr = RARRAY(argv[0])->ptr;
2621
+ ndata = RARRAY_LEN(argv[0]);
2622
+ VALUE * ptr = RARRAY_PTR(argv[0]);
2853
2623
  for(i=0; i < ndata; i++) {
2854
2624
  // Store or convert doubles to Ruby Objects
2855
2625
  if(TYPE(ptr[i]) == T_FLOAT) {
@@ -2867,8 +2637,8 @@ _wrap_Uvio_wwrite(int argc, VALUE *argv, VALUE self) {
2867
2637
  int i;
2868
2638
  // If NArray, data are already in place
2869
2639
  if(TYPE(argv[1]) == T_ARRAY) {
2870
- nflag = RARRAY(argv[1])->len;
2871
- VALUE * ptr = RARRAY(argv[1])->ptr;
2640
+ nflag = RARRAY_LEN(argv[1]);
2641
+ VALUE * ptr = RARRAY_PTR(argv[1]);
2872
2642
  for(i=0; i < nflag; i++) {
2873
2643
  ptr[i] = INT2FIX(arg3[i]);
2874
2644
  }
@@ -2912,44 +2682,44 @@ _wrap_Uvio_set(int argc, VALUE *argv, VALUE self) {
2912
2682
  }
2913
2683
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
2914
2684
  if (!SWIG_IsOK(res1)) {
2915
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","set", 1, self ));
2685
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set" "', argument " "1"" of type '" "uvio *""'");
2916
2686
  }
2917
2687
  arg1 = (uvio *)(argp1);
2918
2688
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
2919
2689
  if (!SWIG_IsOK(res2)) {
2920
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","set", 2, argv[0] ));
2690
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "set" "', argument " "2"" of type '" "char *""'");
2921
2691
  }
2922
2692
  arg2 = (char *)(buf2);
2923
2693
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
2924
2694
  if (!SWIG_IsOK(res3)) {
2925
- SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char *","set", 3, argv[1] ));
2695
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "set" "', argument " "3"" of type '" "char *""'");
2926
2696
  }
2927
2697
  arg3 = (char *)(buf3);
2928
2698
  if (argc > 2) {
2929
2699
  ecode4 = SWIG_AsVal_int(argv[2], &val4);
2930
2700
  if (!SWIG_IsOK(ecode4)) {
2931
- SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "int","set", 4, argv[2] ));
2701
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "set" "', argument " "4"" of type '" "int""'");
2932
2702
  }
2933
2703
  arg4 = (int)(val4);
2934
2704
  }
2935
2705
  if (argc > 3) {
2936
2706
  ecode5 = SWIG_AsVal_double(argv[3], &val5);
2937
2707
  if (!SWIG_IsOK(ecode5)) {
2938
- SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","set", 5, argv[3] ));
2708
+ SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "set" "', argument " "5"" of type '" "double""'");
2939
2709
  }
2940
2710
  arg5 = (double)(val5);
2941
2711
  }
2942
2712
  if (argc > 4) {
2943
2713
  ecode6 = SWIG_AsVal_double(argv[4], &val6);
2944
2714
  if (!SWIG_IsOK(ecode6)) {
2945
- SWIG_exception_fail(SWIG_ArgError(ecode6), Ruby_Format_TypeError( "", "double","set", 6, argv[4] ));
2715
+ SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "set" "', argument " "6"" of type '" "double""'");
2946
2716
  }
2947
2717
  arg6 = (double)(val6);
2948
2718
  }
2949
2719
  if (argc > 5) {
2950
2720
  ecode7 = SWIG_AsVal_double(argv[5], &val7);
2951
2721
  if (!SWIG_IsOK(ecode7)) {
2952
- SWIG_exception_fail(SWIG_ArgError(ecode7), Ruby_Format_TypeError( "", "double","set", 7, argv[5] ));
2722
+ SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "set" "', argument " "7"" of type '" "double""'");
2953
2723
  }
2954
2724
  arg7 = (double)(val7);
2955
2725
  }
@@ -2987,7 +2757,7 @@ _wrap_Uvio_uvread(int argc, VALUE *argv, VALUE self) {
2987
2757
  }
2988
2758
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
2989
2759
  if (!SWIG_IsOK(res1)) {
2990
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","uvread", 1, self ));
2760
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "uvread" "', argument " "1"" of type '" "uvio *""'");
2991
2761
  }
2992
2762
  arg1 = (uvio *)(argp1);
2993
2763
  {
@@ -3000,10 +2770,10 @@ _wrap_Uvio_uvread(int argc, VALUE *argv, VALUE self) {
3000
2770
  Check_Type(argv[0], T_ARRAY);
3001
2771
  // Get the length of the array
3002
2772
  // TODO Bounds checking somehow?
3003
- int n = RARRAY(argv[0])->len;
2773
+ int n = RARRAY_LEN(argv[0]);
3004
2774
  arg2 = ALLOCA_N(double, n);
3005
2775
  // Get the first element in array
3006
- VALUE *ptr = RARRAY(argv[0])->ptr;
2776
+ VALUE *ptr = RARRAY_PTR(argv[0]);
3007
2777
  for (i=0; i < n; i++) {
3008
2778
  // Convert Ruby Object to double
3009
2779
  arg2[i] = NUM2DBL(ptr[i]);
@@ -3023,9 +2793,9 @@ _wrap_Uvio_uvread(int argc, VALUE *argv, VALUE self) {
3023
2793
  } else {
3024
2794
  Check_Type(argv[1], T_ARRAY);
3025
2795
  // Allocate C array on stack
3026
- ndata3 = RARRAY(argv[1])->len;
2796
+ ndata3 = RARRAY_LEN(argv[1]);
3027
2797
  arg3 = ALLOCA_N(float,ndata3);
3028
- VALUE * ptr = RARRAY(argv[1])->ptr;
2798
+ VALUE * ptr = RARRAY_PTR(argv[1]);
3029
2799
  // TODO Use uvread in #if to avoid copying on read?
3030
2800
  for(i=0; i < ndata3; i++) {
3031
2801
  arg3[i] = NUM2DBL(ptr[i]);
@@ -3042,9 +2812,9 @@ _wrap_Uvio_uvread(int argc, VALUE *argv, VALUE self) {
3042
2812
  nflag4 = NA_TOTAL(argv[2]);
3043
2813
  } else {
3044
2814
  Check_Type(argv[2], T_ARRAY);
3045
- nflag4 = RARRAY(argv[2])->len;
2815
+ nflag4 = RARRAY_LEN(argv[2]);
3046
2816
  arg4 = ALLOCA_N(int,nflag4);
3047
- VALUE * ptr = RARRAY(argv[2])->ptr;
2817
+ VALUE * ptr = RARRAY_PTR(argv[2]);
3048
2818
  for(i=0; i < nflag4; i++) {
3049
2819
  arg4[i] = FIX2INT(ptr[i]);
3050
2820
  }
@@ -3059,16 +2829,15 @@ _wrap_Uvio_uvread(int argc, VALUE *argv, VALUE self) {
3059
2829
  }
3060
2830
  }
3061
2831
  uvio_uvread(arg1,arg2,arg3,arg4,arg5,arg6);
3062
- vresult = rb_ary_new();
3063
2832
  {
3064
2833
  // If NArray, data are already in place
3065
2834
  if(TYPE(argv[0]) == T_ARRAY) {
3066
2835
  int i;
3067
2836
  // Get the length of the array
3068
2837
  // TODO Bounds checking somehow?
3069
- int n = RARRAY(argv[0])->len;
2838
+ int n = RARRAY_LEN(argv[0]);
3070
2839
  // Get the first element in array
3071
- VALUE *ptr = RARRAY(argv[0])->ptr;
2840
+ VALUE *ptr = RARRAY_PTR(argv[0]);
3072
2841
  for (i=0; i < n; i++) {
3073
2842
  // Store or convert doubles to Ruby Objects
3074
2843
  if(TYPE(ptr[i]) == T_FLOAT) {
@@ -3086,8 +2855,8 @@ _wrap_Uvio_uvread(int argc, VALUE *argv, VALUE self) {
3086
2855
  int i;
3087
2856
  // If NArray, data are already in place
3088
2857
  if(TYPE(argv[1]) == T_ARRAY) {
3089
- ndata = RARRAY(argv[1])->len;
3090
- VALUE * ptr = RARRAY(argv[1])->ptr;
2858
+ ndata = RARRAY_LEN(argv[1]);
2859
+ VALUE * ptr = RARRAY_PTR(argv[1]);
3091
2860
  for(i=0; i < ndata; i++) {
3092
2861
  // Store or convert doubles to Ruby Objects
3093
2862
  if(TYPE(ptr[i]) == T_FLOAT) {
@@ -3105,8 +2874,8 @@ _wrap_Uvio_uvread(int argc, VALUE *argv, VALUE self) {
3105
2874
  int i;
3106
2875
  // If NArray, data are already in place
3107
2876
  if(TYPE(argv[2]) == T_ARRAY) {
3108
- nflag = RARRAY(argv[2])->len;
3109
- VALUE * ptr = RARRAY(argv[2])->ptr;
2877
+ nflag = RARRAY_LEN(argv[2]);
2878
+ VALUE * ptr = RARRAY_PTR(argv[2]);
3110
2879
  for(i=0; i < nflag; i++) {
3111
2880
  ptr[i] = INT2FIX(arg4[i]);
3112
2881
  }
@@ -3144,7 +2913,7 @@ _wrap_Uvio_uvwread(int argc, VALUE *argv, VALUE self) {
3144
2913
  }
3145
2914
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
3146
2915
  if (!SWIG_IsOK(res1)) {
3147
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","uvwread", 1, self ));
2916
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "uvwread" "', argument " "1"" of type '" "uvio *""'");
3148
2917
  }
3149
2918
  arg1 = (uvio *)(argp1);
3150
2919
  {
@@ -3160,9 +2929,9 @@ _wrap_Uvio_uvwread(int argc, VALUE *argv, VALUE self) {
3160
2929
  } else {
3161
2930
  Check_Type(argv[0], T_ARRAY);
3162
2931
  // Allocate C array on stack
3163
- ndata2 = RARRAY(argv[0])->len;
2932
+ ndata2 = RARRAY_LEN(argv[0]);
3164
2933
  arg2 = ALLOCA_N(float,ndata2);
3165
- VALUE * ptr = RARRAY(argv[0])->ptr;
2934
+ VALUE * ptr = RARRAY_PTR(argv[0]);
3166
2935
  // TODO Use uvwread in #if to avoid copying on read?
3167
2936
  for(i=0; i < ndata2; i++) {
3168
2937
  arg2[i] = NUM2DBL(ptr[i]);
@@ -3179,9 +2948,9 @@ _wrap_Uvio_uvwread(int argc, VALUE *argv, VALUE self) {
3179
2948
  nflag3 = NA_TOTAL(argv[1]);
3180
2949
  } else {
3181
2950
  Check_Type(argv[1], T_ARRAY);
3182
- nflag3 = RARRAY(argv[1])->len;
2951
+ nflag3 = RARRAY_LEN(argv[1]);
3183
2952
  arg3 = ALLOCA_N(int,nflag3);
3184
- VALUE * ptr = RARRAY(argv[1])->ptr;
2953
+ VALUE * ptr = RARRAY_PTR(argv[1]);
3185
2954
  for(i=0; i < nflag3; i++) {
3186
2955
  arg3[i] = FIX2INT(ptr[i]);
3187
2956
  }
@@ -3190,14 +2959,13 @@ _wrap_Uvio_uvwread(int argc, VALUE *argv, VALUE self) {
3190
2959
  arg4 = nflag3;
3191
2960
  }
3192
2961
  uvio_uvwread(arg1,arg2,arg3,arg4,arg5);
3193
- vresult = rb_ary_new();
3194
2962
  {
3195
2963
  int ndata;
3196
2964
  int i;
3197
2965
  // If NArray, data are already in place
3198
2966
  if(TYPE(argv[0]) == T_ARRAY) {
3199
- ndata = RARRAY(argv[0])->len;
3200
- VALUE * ptr = RARRAY(argv[0])->ptr;
2967
+ ndata = RARRAY_LEN(argv[0]);
2968
+ VALUE * ptr = RARRAY_PTR(argv[0]);
3201
2969
  for(i=0; i < ndata; i++) {
3202
2970
  // Store or convert doubles to Ruby Objects
3203
2971
  if(TYPE(ptr[i]) == T_FLOAT) {
@@ -3215,8 +2983,8 @@ _wrap_Uvio_uvwread(int argc, VALUE *argv, VALUE self) {
3215
2983
  int i;
3216
2984
  // If NArray, data are already in place
3217
2985
  if(TYPE(argv[1]) == T_ARRAY) {
3218
- nflag = RARRAY(argv[1])->len;
3219
- VALUE * ptr = RARRAY(argv[1])->ptr;
2986
+ nflag = RARRAY_LEN(argv[1]);
2987
+ VALUE * ptr = RARRAY_PTR(argv[1]);
3220
2988
  for(i=0; i < nflag; i++) {
3221
2989
  ptr[i] = INT2FIX(arg3[i]);
3222
2990
  }
@@ -3257,7 +3025,7 @@ _wrap_Uvio_getvr(int argc, VALUE *argv, VALUE self) {
3257
3025
  }
3258
3026
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
3259
3027
  if (!SWIG_IsOK(res1)) {
3260
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","getvr", 1, self ));
3028
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "getvr" "', argument " "1"" of type '" "uvio *""'");
3261
3029
  }
3262
3030
  arg1 = (uvio *)(argp1);
3263
3031
  {
@@ -3335,7 +3103,7 @@ _wrap_Uvio_updatedq___(int argc, VALUE *argv, VALUE self) {
3335
3103
  }
3336
3104
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
3337
3105
  if (!SWIG_IsOK(res1)) {
3338
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","updated", 1, self ));
3106
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "updated" "', argument " "1"" of type '" "uvio *""'");
3339
3107
  }
3340
3108
  arg1 = (uvio *)(argp1);
3341
3109
  result = (int)uvio_updated(arg1);
@@ -3362,7 +3130,7 @@ _wrap_Uvio_track(int argc, VALUE *argv, VALUE self) {
3362
3130
  }
3363
3131
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
3364
3132
  if (!SWIG_IsOK(res1)) {
3365
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","track", 1, self ));
3133
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "track" "', argument " "1"" of type '" "uvio *""'");
3366
3134
  }
3367
3135
  arg1 = (uvio *)(argp1);
3368
3136
  {
@@ -3370,7 +3138,7 @@ _wrap_Uvio_track(int argc, VALUE *argv, VALUE self) {
3370
3138
  }
3371
3139
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
3372
3140
  if (!SWIG_IsOK(res3)) {
3373
- SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char *","track", 3, argv[1] ));
3141
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "track" "', argument " "3"" of type '" "char *""'");
3374
3142
  }
3375
3143
  arg3 = (char *)(buf3);
3376
3144
  uvio_track(arg1,arg2,arg3);
@@ -3402,12 +3170,12 @@ _wrap_Uvio_sela(int argc, VALUE *argv, VALUE self) {
3402
3170
  }
3403
3171
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
3404
3172
  if (!SWIG_IsOK(res1)) {
3405
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","sela", 1, self ));
3173
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sela" "', argument " "1"" of type '" "uvio *""'");
3406
3174
  }
3407
3175
  arg1 = (uvio *)(argp1);
3408
3176
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
3409
3177
  if (!SWIG_IsOK(res2)) {
3410
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","sela", 2, argv[0] ));
3178
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sela" "', argument " "2"" of type '" "char *""'");
3411
3179
  }
3412
3180
  arg2 = (char *)(buf2);
3413
3181
  {
@@ -3421,7 +3189,7 @@ _wrap_Uvio_sela(int argc, VALUE *argv, VALUE self) {
3421
3189
  }
3422
3190
  res4 = SWIG_AsCharPtrAndSize(argv[2], &buf4, NULL, &alloc4);
3423
3191
  if (!SWIG_IsOK(res4)) {
3424
- SWIG_exception_fail(SWIG_ArgError(res4), Ruby_Format_TypeError( "", "char *","sela", 4, argv[2] ));
3192
+ SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sela" "', argument " "4"" of type '" "char *""'");
3425
3193
  }
3426
3194
  arg4 = (char *)(buf4);
3427
3195
  uvio_sela(arg1,arg2,arg3,arg4);
@@ -3435,15 +3203,6 @@ fail:
3435
3203
  }
3436
3204
 
3437
3205
 
3438
-
3439
- /*
3440
- Document-method: Miriad::Uvio.select
3441
-
3442
- call-seq:
3443
- select(object, datasel, p1=0.0, p2=0.0)
3444
-
3445
- Iterate thru each element in the Uvio and select those that match a condition. A block must be provided.
3446
- */
3447
3206
  SWIGINTERN VALUE
3448
3207
  _wrap_Uvio_select(int argc, VALUE *argv, VALUE self) {
3449
3208
  uvio *arg1 = (uvio *) 0 ;
@@ -3466,12 +3225,12 @@ _wrap_Uvio_select(int argc, VALUE *argv, VALUE self) {
3466
3225
  }
3467
3226
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
3468
3227
  if (!SWIG_IsOK(res1)) {
3469
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","select", 1, self ));
3228
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "select" "', argument " "1"" of type '" "uvio *""'");
3470
3229
  }
3471
3230
  arg1 = (uvio *)(argp1);
3472
3231
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
3473
3232
  if (!SWIG_IsOK(res2)) {
3474
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","select", 2, argv[0] ));
3233
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "select" "', argument " "2"" of type '" "char *""'");
3475
3234
  }
3476
3235
  arg2 = (char *)(buf2);
3477
3236
  {
@@ -3486,14 +3245,14 @@ _wrap_Uvio_select(int argc, VALUE *argv, VALUE self) {
3486
3245
  if (argc > 2) {
3487
3246
  ecode4 = SWIG_AsVal_double(argv[2], &val4);
3488
3247
  if (!SWIG_IsOK(ecode4)) {
3489
- SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "double","select", 4, argv[2] ));
3248
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "select" "', argument " "4"" of type '" "double""'");
3490
3249
  }
3491
3250
  arg4 = (double)(val4);
3492
3251
  }
3493
3252
  if (argc > 3) {
3494
3253
  ecode5 = SWIG_AsVal_double(argv[3], &val5);
3495
3254
  if (!SWIG_IsOK(ecode5)) {
3496
- SWIG_exception_fail(SWIG_ArgError(ecode5), Ruby_Format_TypeError( "", "double","select", 5, argv[3] ));
3255
+ SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "select" "', argument " "5"" of type '" "double""'");
3497
3256
  }
3498
3257
  arg5 = (double)(val5);
3499
3258
  }
@@ -3519,7 +3278,7 @@ _wrap_Uvio_visno(int argc, VALUE *argv, VALUE self) {
3519
3278
  }
3520
3279
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
3521
3280
  if (!SWIG_IsOK(res1)) {
3522
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","visno", 1, self ));
3281
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "visno" "', argument " "1"" of type '" "uvio *""'");
3523
3282
  }
3524
3283
  arg1 = (uvio *)(argp1);
3525
3284
  result = (unsigned int)uvio_visno(arg1);
@@ -3542,7 +3301,7 @@ _wrap_Uvio_flagwr(int argc, VALUE *argv, VALUE self) {
3542
3301
  }
3543
3302
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
3544
3303
  if (!SWIG_IsOK(res1)) {
3545
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","flagwr", 1, self ));
3304
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "flagwr" "', argument " "1"" of type '" "uvio *""'");
3546
3305
  }
3547
3306
  arg1 = (uvio *)(argp1);
3548
3307
  {
@@ -3554,9 +3313,9 @@ _wrap_Uvio_flagwr(int argc, VALUE *argv, VALUE self) {
3554
3313
  int i;
3555
3314
  int nflag;
3556
3315
  Check_Type(argv[0], T_ARRAY);
3557
- nflag = RARRAY(argv[0])->len;
3316
+ nflag = RARRAY_LEN(argv[0]);
3558
3317
  arg2 = ALLOCA_N(int,nflag);
3559
- VALUE * ptr = RARRAY(argv[0])->ptr;
3318
+ VALUE * ptr = RARRAY_PTR(argv[0]);
3560
3319
  for(i=0; i < nflag; i++) {
3561
3320
  arg2[i] = FIX2INT(ptr[i]);
3562
3321
  }
@@ -3581,7 +3340,7 @@ _wrap_Uvio_wflagwr(int argc, VALUE *argv, VALUE self) {
3581
3340
  }
3582
3341
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
3583
3342
  if (!SWIG_IsOK(res1)) {
3584
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","wflagwr", 1, self ));
3343
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wflagwr" "', argument " "1"" of type '" "uvio *""'");
3585
3344
  }
3586
3345
  arg1 = (uvio *)(argp1);
3587
3346
  {
@@ -3593,9 +3352,9 @@ _wrap_Uvio_wflagwr(int argc, VALUE *argv, VALUE self) {
3593
3352
  int i;
3594
3353
  int nflag;
3595
3354
  Check_Type(argv[0], T_ARRAY);
3596
- nflag = RARRAY(argv[0])->len;
3355
+ nflag = RARRAY_LEN(argv[0]);
3597
3356
  arg2 = ALLOCA_N(int,nflag);
3598
- VALUE * ptr = RARRAY(argv[0])->ptr;
3357
+ VALUE * ptr = RARRAY_PTR(argv[0]);
3599
3358
  for(i=0; i < nflag; i++) {
3600
3359
  arg2[i] = FIX2INT(ptr[i]);
3601
3360
  }
@@ -3629,17 +3388,17 @@ _wrap_Uvio_haccess(int argc, VALUE *argv, VALUE self) {
3629
3388
  }
3630
3389
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
3631
3390
  if (!SWIG_IsOK(res1)) {
3632
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","haccess", 1, self ));
3391
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "haccess" "', argument " "1"" of type '" "uvio *""'");
3633
3392
  }
3634
3393
  arg1 = (uvio *)(argp1);
3635
3394
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
3636
3395
  if (!SWIG_IsOK(res2)) {
3637
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","haccess", 2, argv[0] ));
3396
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "haccess" "', argument " "2"" of type '" "char *""'");
3638
3397
  }
3639
3398
  arg2 = (char *)(buf2);
3640
3399
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
3641
3400
  if (!SWIG_IsOK(res3)) {
3642
- SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char *","haccess", 3, argv[1] ));
3401
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "haccess" "', argument " "3"" of type '" "char *""'");
3643
3402
  }
3644
3403
  arg3 = (char *)(buf3);
3645
3404
  result = (int)uvio_haccess(arg1,arg2,arg3);
@@ -3668,12 +3427,12 @@ _wrap_Uvio_hdaccess(int argc, VALUE *argv, VALUE self) {
3668
3427
  }
3669
3428
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
3670
3429
  if (!SWIG_IsOK(res1)) {
3671
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","hdaccess", 1, self ));
3430
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hdaccess" "', argument " "1"" of type '" "uvio *""'");
3672
3431
  }
3673
3432
  arg1 = (uvio *)(argp1);
3674
3433
  ecode2 = SWIG_AsVal_int(argv[0], &val2);
3675
3434
  if (!SWIG_IsOK(ecode2)) {
3676
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","hdaccess", 2, argv[0] ));
3435
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "hdaccess" "', argument " "2"" of type '" "int""'");
3677
3436
  }
3678
3437
  arg2 = (int)(val2);
3679
3438
  uvio_hdaccess(arg1,arg2);
@@ -3707,12 +3466,12 @@ _wrap_Uvio_hreadln(int argc, VALUE *argv, VALUE self) {
3707
3466
  }
3708
3467
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
3709
3468
  if (!SWIG_IsOK(res1)) {
3710
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","hreadln", 1, self ));
3469
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hreadln" "', argument " "1"" of type '" "uvio *""'");
3711
3470
  }
3712
3471
  arg1 = (uvio *)(argp1);
3713
3472
  ecode2 = SWIG_AsVal_int(argv[0], &val2);
3714
3473
  if (!SWIG_IsOK(ecode2)) {
3715
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","hreadln", 2, argv[0] ));
3474
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "hreadln" "', argument " "2"" of type '" "int""'");
3716
3475
  }
3717
3476
  arg2 = (int)(val2);
3718
3477
  uvio_hreadln(arg1,arg2,arg3,arg4,arg5);
@@ -3753,22 +3512,22 @@ _wrap_Uvio_hwriteln(int argc, VALUE *argv, VALUE self) {
3753
3512
  }
3754
3513
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
3755
3514
  if (!SWIG_IsOK(res1)) {
3756
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","hwriteln", 1, self ));
3515
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hwriteln" "', argument " "1"" of type '" "uvio *""'");
3757
3516
  }
3758
3517
  arg1 = (uvio *)(argp1);
3759
3518
  ecode2 = SWIG_AsVal_int(argv[0], &val2);
3760
3519
  if (!SWIG_IsOK(ecode2)) {
3761
- SWIG_exception_fail(SWIG_ArgError(ecode2), Ruby_Format_TypeError( "", "int","hwriteln", 2, argv[0] ));
3520
+ SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "hwriteln" "', argument " "2"" of type '" "int""'");
3762
3521
  }
3763
3522
  arg2 = (int)(val2);
3764
3523
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
3765
3524
  if (!SWIG_IsOK(res3)) {
3766
- SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char *","hwriteln", 3, argv[1] ));
3525
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "hwriteln" "', argument " "3"" of type '" "char *""'");
3767
3526
  }
3768
3527
  arg3 = (char *)(buf3);
3769
3528
  ecode4 = SWIG_AsVal_size_t(argv[2], &val4);
3770
3529
  if (!SWIG_IsOK(ecode4)) {
3771
- SWIG_exception_fail(SWIG_ArgError(ecode4), Ruby_Format_TypeError( "", "size_t","hwriteln", 4, argv[2] ));
3530
+ SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "hwriteln" "', argument " "4"" of type '" "size_t""'");
3772
3531
  }
3773
3532
  arg4 = (size_t)(val4);
3774
3533
  uvio_hwriteln(arg1,arg2,arg3,arg4);
@@ -3795,12 +3554,12 @@ _wrap_Uvio_hiswrite(int argc, VALUE *argv, VALUE self) {
3795
3554
  }
3796
3555
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
3797
3556
  if (!SWIG_IsOK(res1)) {
3798
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","hiswrite", 1, self ));
3557
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hiswrite" "', argument " "1"" of type '" "uvio *""'");
3799
3558
  }
3800
3559
  arg1 = (uvio *)(argp1);
3801
3560
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
3802
3561
  if (!SWIG_IsOK(res2)) {
3803
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","hiswrite", 2, argv[0] ));
3562
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hiswrite" "', argument " "2"" of type '" "char *""'");
3804
3563
  }
3805
3564
  arg2 = (char *)(buf2);
3806
3565
  uvio_hiswrite(arg1,arg2);
@@ -3831,17 +3590,17 @@ _wrap_Uvio_wrhda(int argc, VALUE *argv, VALUE self) {
3831
3590
  }
3832
3591
  res1 = SWIG_ConvertPtr(self, &argp1,SWIGTYPE_p_uvio, 0 | 0 );
3833
3592
  if (!SWIG_IsOK(res1)) {
3834
- SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "uvio *","wrhda", 1, self ));
3593
+ SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wrhda" "', argument " "1"" of type '" "uvio *""'");
3835
3594
  }
3836
3595
  arg1 = (uvio *)(argp1);
3837
3596
  res2 = SWIG_AsCharPtrAndSize(argv[0], &buf2, NULL, &alloc2);
3838
3597
  if (!SWIG_IsOK(res2)) {
3839
- SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "char *","wrhda", 2, argv[0] ));
3598
+ SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wrhda" "', argument " "2"" of type '" "char *""'");
3840
3599
  }
3841
3600
  arg2 = (char *)(buf2);
3842
3601
  res3 = SWIG_AsCharPtrAndSize(argv[1], &buf3, NULL, &alloc3);
3843
3602
  if (!SWIG_IsOK(res3)) {
3844
- SWIG_exception_fail(SWIG_ArgError(res3), Ruby_Format_TypeError( "", "char *","wrhda", 3, argv[1] ));
3603
+ SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wrhda" "', argument " "3"" of type '" "char *""'");
3845
3604
  }
3846
3605
  arg3 = (char *)(buf3);
3847
3606
  uvio_wrhda(arg1,arg2,arg3);
@@ -3950,7 +3709,7 @@ SWIGRUNTIME void
3950
3709
  SWIG_InitializeModule(void *clientdata) {
3951
3710
  size_t i;
3952
3711
  swig_module_info *module_head, *iter;
3953
- int found, init;
3712
+ int found;
3954
3713
 
3955
3714
  clientdata = clientdata;
3956
3715
 
@@ -3960,9 +3719,6 @@ SWIG_InitializeModule(void *clientdata) {
3960
3719
  swig_module.type_initial = swig_type_initial;
3961
3720
  swig_module.cast_initial = swig_cast_initial;
3962
3721
  swig_module.next = &swig_module;
3963
- init = 1;
3964
- } else {
3965
- init = 0;
3966
3722
  }
3967
3723
 
3968
3724
  /* Try and load any already created modules */
@@ -3991,12 +3747,6 @@ SWIG_InitializeModule(void *clientdata) {
3991
3747
  module_head->next = &swig_module;
3992
3748
  }
3993
3749
 
3994
- /* When multiple interpeters are used, a module could have already been initialized in
3995
- a different interpreter, but not yet have a pointer in this interpreter.
3996
- In this case, we do not want to continue adding types... everything should be
3997
- set up already */
3998
- if (init == 0) return;
3999
-
4000
3750
  /* Now work on filling in swig_module.types */
4001
3751
  #ifdef SWIGRUNTIME_DEBUG
4002
3752
  printf("SWIG_InitializeModule: size %d\n", swig_module.size);
@@ -4130,9 +3880,7 @@ SWIG_PropagateClientData(void) {
4130
3880
  }
4131
3881
  #endif
4132
3882
 
4133
- /*
4134
3883
 
4135
- */
4136
3884
  #ifdef __cplusplus
4137
3885
  extern "C"
4138
3886
  #endif