[Git][debian-gis-team/ruby-netcdf][master] 2 commits: Import upstream patch: Drop rb_secure, rb_safe_level

Youhei SASAKI (@uwabami) gitlab at salsa.debian.org
Sat Feb 19 06:24:23 GMT 2022



Youhei SASAKI pushed to branch master at Debian GIS Project / ruby-netcdf


Commits:
ce5c92e3 by Youhei SASAKI at 2022-02-19T14:56:30+09:00
Import upstream patch: Drop rb_secure, rb_safe_level

Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>

- - - - -
fde4bcd7 by Youhei SASAKI at 2022-02-19T14:57:01+09:00
Skip test/clone.rb related #996324

Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>

- - - - -


2 changed files:

- debian/patches/0005-import-upstream-Drop-obsolete-rb_secure-rb_safe_leve.patch
- debian/ruby-test-files.yaml


Changes:

=====================================
debian/patches/0005-import-upstream-Drop-obsolete-rb_secure-rb_safe_leve.patch
=====================================
@@ -8,11 +8,9 @@ Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
  lib/numru/netcdf.rb   | 1272 ++++++++++++++++++++++++-------------------------
  2 files changed, 905 insertions(+), 943 deletions(-)
 
-diff --git a/ext/numru/netcdfraw.c b/ext/numru/netcdfraw.c
-index b3fdf77..6cc4de9 100644
 --- a/ext/numru/netcdfraw.c
 +++ b/ext/numru/netcdfraw.c
-@@ -198,7 +198,7 @@ typedef int    na_shape_t;
+@@ -198,7 +198,7 @@
    obj = na_cast_object(obj, NA_SINT); \
    GetNArray(obj, na); \
    ptr = (int16_t *) NA_PTR(na,0); \
@@ -21,7 +19,7 @@ index b3fdf77..6cc4de9 100644
  #define Array_to_Clint(obj, ptr) \
  { \
    struct NARRAY *na; \
-@@ -257,7 +257,7 @@ static VALUE rb_eNetcdfFatal;
+@@ -257,7 +257,7 @@
  static VALUE rb_eNetcdfEntool;
  static VALUE rb_eNetcdfExdr;
  static VALUE rb_eNetcdfSyserr;
@@ -30,7 +28,7 @@ index b3fdf77..6cc4de9 100644
  
  struct Netcdf{
    int ncid;
-@@ -290,7 +290,7 @@ NetCDF_init(int ncid,char *filename)
+@@ -290,7 +290,7 @@
    Netcdffile->ncid=ncid;
    Netcdffile->closed=0;
    Netcdffile->name=xmalloc((strlen(filename)+1)*sizeof(char));
@@ -39,7 +37,7 @@ index b3fdf77..6cc4de9 100644
    return(Netcdffile);
  }
  
-@@ -322,7 +322,7 @@ NetCDF_att_init(int ncid,int varid,char *attname)
+@@ -322,7 +322,7 @@
    Netcdf_att->ncid=ncid;
    Netcdf_att->varid=varid;
    Netcdf_att->name=xmalloc((strlen(attname)+1)*sizeof(char));
@@ -48,7 +46,7 @@ index b3fdf77..6cc4de9 100644
    return(Netcdf_att);
  }
  
-@@ -351,7 +351,7 @@ NetCDF_free(struct Netcdf *Netcdffile)
+@@ -351,7 +351,7 @@
    if (!Netcdffile->closed){
        nc_close(Netcdffile->ncid); /* no error check -- not to stop during GC */
    }
@@ -57,7 +55,7 @@ index b3fdf77..6cc4de9 100644
    free(Netcdffile);
  }
  
-@@ -576,14 +576,11 @@ NetCDF_close(file)
+@@ -576,14 +576,11 @@
    int ncid;
    struct Netcdf *Netcdffile;
  
@@ -73,7 +71,7 @@ index b3fdf77..6cc4de9 100644
        Netcdffile->closed = 1;
    } else {
        rb_warn("file %s is already closed", Netcdffile->name);
-@@ -602,10 +599,9 @@ NetCDF_def_dim(VALUE file,VALUE dim_name,VALUE length)
+@@ -602,10 +599,9 @@
    struct Netcdf *Netcdffile;
    struct NetCDFDim *Netcdf_dim;
    VALUE Dimension;
@@ -86,7 +84,7 @@ index b3fdf77..6cc4de9 100644
    Check_Type(dim_name,T_STRING);
    c_dim_name=RSTRING_PTR(dim_name);
    c_length=NUM2UINT(length);
-@@ -696,19 +692,19 @@ NetCDF_put_att_numeric(int ncid, char *name,VALUE value,VALUE atttype, int varid
+@@ -696,19 +692,19 @@
      len = na_val->total;
      ptr = na_val->ptr;
      switch(na_typecode){
@@ -111,7 +109,7 @@ index b3fdf77..6cc4de9 100644
  	status = nc_put_att_double(ncid,varid,name,NC_DOUBLE,len,(double*)ptr);
  	break;
      default:
-@@ -746,7 +742,6 @@ NetCDF_put_att(VALUE file,VALUE att_name,VALUE value,VALUE atttype)
+@@ -746,7 +742,6 @@
      struct Netcdf *ncfile;
      char *name;
  
@@ -119,7 +117,7 @@ index b3fdf77..6cc4de9 100644
      Data_Get_Struct(file,struct Netcdf,ncfile);
      Check_Type(att_name,T_STRING);
      name = RSTRING_PTR(att_name);
-@@ -764,7 +759,6 @@ NetCDF_put_att_var(VALUE var,VALUE att_name,VALUE value,VALUE atttype)
+@@ -764,7 +759,6 @@
      struct NetCDFVar *ncvar;
      char *name;
  
@@ -127,7 +125,7 @@ index b3fdf77..6cc4de9 100644
      Data_Get_Struct(var,struct NetCDFVar,ncvar);
      Check_Type(att_name,T_STRING);
      name = RSTRING_PTR(att_name);
-@@ -791,20 +785,19 @@ NetCDF_def_var(VALUE file,VALUE var_name,VALUE vartype,VALUE dimensions)
+@@ -791,20 +785,19 @@
    struct NetCDFDim *Netcdf_dim;
    VALUE Var;
  
@@ -151,7 +149,7 @@ index b3fdf77..6cc4de9 100644
    } else {
        rb_raise(rb_eNetcdfError,
  	       "type specification must be by a string or nil");
-@@ -827,12 +820,12 @@ NetCDF_def_var(VALUE file,VALUE var_name,VALUE vartype,VALUE dimensions)
+@@ -827,12 +820,12 @@
        rb_raise(rb_eNetcdfError, "No such object of the netCDF dimension class.");
      }
    }
@@ -167,7 +165,7 @@ index b3fdf77..6cc4de9 100644
    Var=Data_Wrap_Struct(cNetCDFVar,nc_mark_obj,NetCDF_var_free,Netcdf_var);
    return Var;
  }
-@@ -852,10 +845,10 @@ NetCDF_dim(VALUE file,VALUE dim_name)
+@@ -852,10 +845,10 @@
    ncid=Netcdffile->ncid;
    Check_Type(dim_name,T_STRING);
    c_dim_name=RSTRING_PTR(dim_name);
@@ -180,7 +178,7 @@ index b3fdf77..6cc4de9 100644
        return(Qnil);  /*2003/08/27 back to orig (from changes on 2003/02/03)*/
      } else{
        NC_RAISE(status);
-@@ -863,14 +856,14 @@ NetCDF_dim(VALUE file,VALUE dim_name)
+@@ -863,14 +856,14 @@
    }
  
    Netcdf_dim=NetCDF_dim_init(ncid,dimidp);
@@ -198,7 +196,7 @@ index b3fdf77..6cc4de9 100644
    int ncid;
    int status;
    int varidp;
-@@ -883,16 +876,16 @@ NetCDF_var(VALUE file,VALUE var_name)
+@@ -883,16 +876,16 @@
    ncid=Netcdffile->ncid;
    Check_Type(var_name,T_STRING);
    c_var_name=RSTRING_PTR(var_name);
@@ -218,7 +216,7 @@ index b3fdf77..6cc4de9 100644
    Netcdf_var = NetCDF_var_init(ncid,varidp,file);
    Variable = Data_Wrap_Struct(cNetCDFVar,nc_mark_obj,NetCDF_var_free,Netcdf_var);
    return Variable;
-@@ -913,7 +906,7 @@ NetCDF_att(VALUE file,VALUE att_name)
+@@ -913,7 +906,7 @@
    ncid=Netcdffile->ncid;
    Check_Type(att_name,T_STRING);
    c_att_name=RSTRING_PTR(att_name);
@@ -227,7 +225,7 @@ index b3fdf77..6cc4de9 100644
  
    status = nc_inq_attid(ncid,NC_GLOBAL,c_att_name,&attnump);
    if(status != NC_NOERR){
-@@ -924,11 +917,11 @@ NetCDF_att(VALUE file,VALUE att_name)
+@@ -924,11 +917,11 @@
        NC_RAISE(status);
      }
    }
@@ -242,7 +240,7 @@ index b3fdf77..6cc4de9 100644
    return Attribute;
  }
  VALUE
-@@ -938,7 +931,7 @@ NetCDF_fill(VALUE file,VALUE mode)
+@@ -938,7 +931,7 @@
    int status;
    struct Netcdf *Netcdffile;
    int old_modep;
@@ -251,7 +249,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(file,struct Netcdf,Netcdffile);
    ncid = Netcdffile->ncid;
    if(mode==Qfalse){
-@@ -961,7 +954,6 @@ NetCDF_redef(VALUE file)
+@@ -961,7 +954,6 @@
    int status;
    struct Netcdf *Netcdffile;
  
@@ -259,7 +257,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(file,struct Netcdf,Netcdffile);
    ncid=Netcdffile->ncid;
    status = nc_redef(ncid);
-@@ -976,18 +968,17 @@ NetCDF_redef(VALUE file)
+@@ -976,18 +968,17 @@
    return Qtrue;
  }
  
@@ -280,7 +278,7 @@ index b3fdf77..6cc4de9 100644
      if(status == NC_ENOTINDEFINE){
        return Qnil;
      }
-@@ -998,7 +989,7 @@ NetCDF_enddef(VALUE file)
+@@ -998,7 +989,7 @@
    return Qtrue;
  }
  
@@ -289,7 +287,7 @@ index b3fdf77..6cc4de9 100644
  NetCDF_whether_in_define_mode(VALUE file)
  {
    /* returns true if the NetCDF object is currently in the define mode,
-@@ -1010,7 +1001,6 @@ NetCDF_whether_in_define_mode(VALUE file)
+@@ -1010,7 +1001,6 @@
    int status;
    struct Netcdf *Netcdffile;
  
@@ -297,7 +295,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(file,struct Netcdf,Netcdffile);
    ncid=Netcdffile->ncid;
    status = nc_redef(ncid);
-@@ -1030,7 +1020,7 @@ NetCDF_whether_in_define_mode(VALUE file)
+@@ -1030,7 +1020,7 @@
  }
  
  VALUE
@@ -306,7 +304,7 @@ index b3fdf77..6cc4de9 100644
  {
    int status;
    int ncid;
-@@ -1044,7 +1034,7 @@ NetCDF_open(VALUE mod,VALUE filename,VALUE omode)
+@@ -1044,7 +1034,7 @@
    c_filename=RSTRING_PTR(filename);
    Check_Type(omode,T_FIXNUM);
    c_omode=NUM2INT(omode);
@@ -315,7 +313,7 @@ index b3fdf77..6cc4de9 100644
    status = nc_open(c_filename,c_omode,&ncid);
    if(status !=NC_NOERR){NC_RAISE2(status,c_filename);}
  
-@@ -1061,13 +1051,13 @@ NetCDF_create(VALUE mod,VALUE filename,VALUE cmode)
+@@ -1061,13 +1051,13 @@
    char* c_filename;
    int c_cmode;
    struct Netcdf *ncfile;
@@ -331,7 +329,7 @@ index b3fdf77..6cc4de9 100644
    status = nc_create(c_filename,c_cmode,&ncid);
    if(status != NC_NOERR) NC_RAISE2(status, c_filename);
  
-@@ -1075,7 +1065,7 @@ NetCDF_create(VALUE mod,VALUE filename,VALUE cmode)
+@@ -1075,7 +1065,7 @@
    return( Data_Wrap_Struct(cNetCDF,0,NetCDF_free,ncfile) );
  }
  
@@ -340,7 +338,7 @@ index b3fdf77..6cc4de9 100644
  NetCDF_ndims(VALUE file)
  {
    int ncid;
-@@ -1092,7 +1082,7 @@ NetCDF_ndims(VALUE file)
+@@ -1092,7 +1082,7 @@
    return Integer;
  }
  
@@ -349,7 +347,7 @@ index b3fdf77..6cc4de9 100644
  NetCDF_nvars(VALUE file)
  {
    int ncid;
-@@ -1108,7 +1098,7 @@ NetCDF_nvars(VALUE file)
+@@ -1108,7 +1098,7 @@
    return Integer;
  }
  
@@ -358,7 +356,7 @@ index b3fdf77..6cc4de9 100644
  NetCDF_natts(VALUE file)
  {
    int ncid;
-@@ -1139,10 +1129,10 @@ NetCDF_unlimited(VALUE file)
+@@ -1139,10 +1129,10 @@
    ncid=ncfile->ncid;
    status=nc_inq_unlimdim(ncid,&unlimdimidp);
    if(status !=NC_NOERR) NC_RAISE(status);
@@ -372,7 +370,7 @@ index b3fdf77..6cc4de9 100644
    if(unlimdimidp != -1)
      {
        Dimension = Data_Wrap_Struct(cNetCDFDim,0,NetCDF_dim_free,Netcdf_dim);
-@@ -1156,7 +1146,7 @@ NetCDF_unlimited(VALUE file)
+@@ -1156,7 +1146,7 @@
  
  #if NCVER >= 400
  
@@ -381,7 +379,7 @@ index b3fdf77..6cc4de9 100644
  NetCDF_format(VALUE file)
  {
    int ncid;
-@@ -1177,7 +1167,7 @@ NetCDF_format(VALUE file)
+@@ -1177,7 +1167,7 @@
  }
  
  #endif
@@ -390,7 +388,7 @@ index b3fdf77..6cc4de9 100644
  VALUE
  NetCDF_sync(VALUE file)
  {
-@@ -1185,7 +1175,6 @@ NetCDF_sync(VALUE file)
+@@ -1185,7 +1175,6 @@
    int status;
    struct Netcdf *ncfile;
  
@@ -398,7 +396,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(file,struct Netcdf,ncfile);
    ncid=ncfile->ncid;
    status = nc_sync(ncid);
-@@ -1198,7 +1187,7 @@ NetCDF_path(VALUE file)
+@@ -1198,7 +1187,7 @@
  {
    char *path;
    struct Netcdf *ncfile;
@@ -407,7 +405,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(file,struct Netcdf,ncfile);
    path=ncfile->name;
    return(rb_str_new2(path));
-@@ -1212,14 +1201,14 @@ NetCDF_dim_length(VALUE Dim)
+@@ -1212,14 +1201,14 @@
    int dimid;
    size_t lengthp;
    struct NetCDFDim *Netcdf_dim;
@@ -424,7 +422,7 @@ index b3fdf77..6cc4de9 100644
    return(INT2NUM(lengthp));
  }
  
-@@ -1231,8 +1220,7 @@ NetCDF_dim_name(VALUE Dim,VALUE dimension_newname)
+@@ -1231,8 +1220,7 @@
    int dimid;
    char *c_dim_name;
    struct NetCDFDim *Netcdf_dim;
@@ -434,7 +432,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(Dim,struct NetCDFDim,Netcdf_dim);
    ncid=Netcdf_dim->ncid;
    dimid=Netcdf_dim->dimid;
-@@ -1241,7 +1229,7 @@ NetCDF_dim_name(VALUE Dim,VALUE dimension_newname)
+@@ -1241,7 +1229,7 @@
  
    status = nc_rename_dim(ncid,dimid,c_dim_name);
    if(status !=NC_NOERR) NC_RAISE(status);
@@ -443,7 +441,7 @@ index b3fdf77..6cc4de9 100644
    return Qnil;
  }
  
-@@ -1254,14 +1242,14 @@ NetCDF_dim_inqname(VALUE Dim)
+@@ -1254,16 +1242,15 @@
    char c_dim_name[NC_MAX_NAME];
    struct NetCDFDim *Netcdf_dim;
    VALUE str;
@@ -459,9 +457,11 @@ index b3fdf77..6cc4de9 100644
 -  
 +
    str = rb_str_new2(c_dim_name);
-   OBJ_TAINT(str);
+-  OBJ_TAINT(str);
    return(str);
-@@ -1273,7 +1261,7 @@ NetCDF_dim_whether_unlimited(VALUE Dim)
+ }
+ 
+@@ -1273,7 +1260,7 @@
    int status;
    int uldid;
    struct NetCDFDim *Netcdf_dim;
@@ -470,16 +470,18 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(Dim,struct NetCDFDim,Netcdf_dim);
    status=nc_inq_unlimdim(Netcdf_dim->ncid,&uldid);
    if(status !=NC_NOERR) NC_RAISE(status);
-@@ -1293,7 +1281,7 @@ NetCDF_att_inq_name(VALUE Att)
+@@ -1293,9 +1280,8 @@
  
    Data_Get_Struct(Att,struct NetCDFAtt,Netcdf_att);
    c_att_name=Netcdf_att->name;
 -  
 +
    str = rb_str_new2(c_att_name);
-   OBJ_TAINT(str);
+-  OBJ_TAINT(str);
    return(str);
-@@ -1311,16 +1299,16 @@ NetCDF_att_rename(VALUE Att,VALUE new_att_name)
+ }
+ 
+@@ -1311,16 +1297,16 @@
    Data_Get_Struct(Att,struct NetCDFAtt,Netcdf_att);
    ncid=Netcdf_att->ncid;
    varid=Netcdf_att->varid;
@@ -500,7 +502,7 @@ index b3fdf77..6cc4de9 100644
    strcpy(Netcdf_att->name,c_new_att_name);
    return Qnil;
  }
-@@ -1351,7 +1339,7 @@ NetCDF_id2var(VALUE file,VALUE varid)
+@@ -1351,7 +1337,7 @@
    struct Netcdf *ncfile;
    struct NetCDFVar *Netcdf_var;
    VALUE Var;
@@ -509,7 +511,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(file,struct Netcdf,ncfile);
    ncid=ncfile->ncid;
    Check_Type(varid,T_FIXNUM);
-@@ -1373,7 +1361,7 @@ NetCDF_id2att(VALUE file,VALUE attnum)
+@@ -1373,7 +1359,7 @@
    char *c_att_name;
    VALUE Att;
    c_att_name=ALLOCA_N(char,NC_MAX_NAME);
@@ -518,7 +520,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(file,struct Netcdf,ncfile);
    ncid=ncfile->ncid;
  
-@@ -1401,7 +1389,7 @@ NetCDF_var_deflate(int argc, VALUE *argv, VALUE Var)
+@@ -1401,7 +1387,7 @@
    struct NetCDFVar *Netcdf_var;
  
    int shuffle;
@@ -527,7 +529,7 @@ index b3fdf77..6cc4de9 100644
  
         http://www.unidata.ucar.edu/software/netcdf/papers/AMS_2008.pdf :
         The shuffle algorithm changes the byte order in the data stream;
-@@ -1421,7 +1409,7 @@ NetCDF_var_deflate(int argc, VALUE *argv, VALUE Var)
+@@ -1421,7 +1407,7 @@
             level specified by the deflate_level parameter.
           */
  
@@ -536,7 +538,7 @@ index b3fdf77..6cc4de9 100644
  		         "wrong # of arguments (%d). It must be 1 or 2", argc);
  
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
-@@ -1457,7 +1445,7 @@ NetCDF_var_deflate_params(VALUE Var)
+@@ -1457,7 +1443,7 @@
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid = Netcdf_var->ncid;
    varid = Netcdf_var->varid;
@@ -545,7 +547,7 @@ index b3fdf77..6cc4de9 100644
  			      &deflate_levelp);
    if(status != NC_NOERR) NC_RAISE(status);
    if (shufflep==0) {sh=Qfalse;} else {sh=Qtrue;}
-@@ -1508,7 +1496,7 @@ NetCDF_var_id2att(VALUE Var,VALUE attnum)
+@@ -1508,7 +1494,7 @@
    struct NetCDFAtt *Netcdf_att;
    char *c_att_name;
    VALUE Att;
@@ -554,7 +556,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid=Netcdf_var->ncid;
    c_varid=Netcdf_var->varid;
-@@ -1520,7 +1508,7 @@ NetCDF_var_id2att(VALUE Var,VALUE attnum)
+@@ -1520,7 +1506,7 @@
  
    status = nc_inq_attname(ncid,c_varid,c_attnum,c_att_name);
    if(status != NC_NOERR) NC_RAISE(status);
@@ -563,7 +565,7 @@ index b3fdf77..6cc4de9 100644
    Netcdf_att=NetCDF_att_init(ncid,c_varid,c_att_name);
    Att=Data_Wrap_Struct(cNetCDFAtt,0,Netcdf_att_free,Netcdf_att);
    return(Att);
-@@ -1545,7 +1533,7 @@ NetCDF_var_dims(VALUE Var)
+@@ -1545,7 +1531,7 @@
    Dims = rb_ary_new();
    for(i=0;i<ndims;i++){
        Netcdf_dim = NetCDF_dim_init(ncid,dimids[ndims-1-i]);
@@ -572,7 +574,7 @@ index b3fdf77..6cc4de9 100644
  		  Data_Wrap_Struct(cNetCDFDim,0,NetCDF_dim_free,Netcdf_dim));
    }
    return(Dims);
-@@ -1589,7 +1577,6 @@ NetCDF_att_copy(VALUE Att,VALUE Var_or_File)
+@@ -1589,7 +1575,6 @@
    struct Netcdf    *ncfile;
    struct NetCDFAtt *Netcdf_att_out;
  
@@ -580,7 +582,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(Att,struct NetCDFAtt,Netcdf_att);
    ncid_in=Netcdf_att->ncid;
    varid_in=Netcdf_att->varid;
-@@ -1635,7 +1622,7 @@ NetCDF_att_atttype(VALUE Att)
+@@ -1635,7 +1620,7 @@
    Attname = nctype2natype(xtypep);
    return(rb_str_new2(Attname));
  }
@@ -589,7 +591,7 @@ index b3fdf77..6cc4de9 100644
  VALUE
  NetCDF_att_typecode(VALUE Att)
  {
-@@ -1653,10 +1640,10 @@ NetCDF_att_typecode(VALUE Att)
+@@ -1653,10 +1638,10 @@
  
    status = nc_inq_atttype(ncid,varid,att_name,&xtypep);
    if(status != NC_NOERR) NC_RAISE(status);
@@ -602,7 +604,7 @@ index b3fdf77..6cc4de9 100644
  VALUE
  NetCDF_att_delete(VALUE Att)
  {
-@@ -1666,7 +1653,6 @@ NetCDF_att_delete(VALUE Att)
+@@ -1666,7 +1651,6 @@
    char *c_att_name;
    struct NetCDFAtt *Netcdf_att;
  
@@ -610,7 +612,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(Att,struct NetCDFAtt,Netcdf_att);
  
    ncid=Netcdf_att->ncid;
-@@ -1675,7 +1661,7 @@ NetCDF_att_delete(VALUE Att)
+@@ -1675,7 +1659,7 @@
  
    status = nc_del_att(ncid,varid,c_att_name);
    if(status != NC_NOERR) NC_RAISE(status);
@@ -619,7 +621,7 @@ index b3fdf77..6cc4de9 100644
    return Qnil;
  }
  
-@@ -1687,13 +1673,12 @@ NetCDF_att_put(VALUE Att,VALUE value,VALUE atttype)
+@@ -1687,13 +1671,12 @@
        */
  {
    struct NetCDFAtt *ncatt;
@@ -636,7 +638,15 @@ index b3fdf77..6cc4de9 100644
  VALUE
  NetCDF_att_get(VALUE Att)
  {
-@@ -1740,7 +1725,7 @@ NetCDF_att_get(VALUE Att)
+@@ -1731,7 +1714,6 @@
+     status = nc_get_att_text(ncid,varid,c_attname,tp);
+     if(status != NC_NOERR) NC_RAISE(status);
+     str = rb_str_new2(tp);
+-    OBJ_TAINT(str);
+     return(str);
+     break;
+   case NC_BYTE:
+@@ -1740,11 +1722,10 @@
  
      attlen[0]=lenp;
      Cbyte_to_NArray(NArray,1,attlen,up);
@@ -645,7 +655,11 @@ index b3fdf77..6cc4de9 100644
      status = nc_get_att_uchar(ncid,varid,c_attname,up);
      if(status != NC_NOERR) NC_RAISE(status);
  
-@@ -1753,7 +1738,7 @@ NetCDF_att_get(VALUE Att)
+-    OBJ_TAINT(NArray);
+     return NArray;
+     break;
+   case NC_SHORT:
+@@ -1753,23 +1734,21 @@
  
      attlen[0]=lenp;
      Csint_to_NArray(NArray,1,attlen,sp);
@@ -653,8 +667,9 @@ index b3fdf77..6cc4de9 100644
 +
      status = nc_get_att_short(ncid,varid,c_attname,sp);
      if(status != NC_NOERR) NC_RAISE(status);
-     OBJ_TAINT(NArray);
-@@ -1762,10 +1747,10 @@ NetCDF_att_get(VALUE Att)
+-    OBJ_TAINT(NArray);
+     return NArray;
+     break;
    case NC_INT:
      status = nc_inq_attlen(ncid,varid,c_attname,&lenp);
      if(status != NC_NOERR) NC_RAISE(status);
@@ -667,7 +682,11 @@ index b3fdf77..6cc4de9 100644
      status = nc_get_att_int(ncid,varid,c_attname,ip);
      if(status != NC_NOERR) NC_RAISE(status);
  
-@@ -1778,7 +1763,7 @@ NetCDF_att_get(VALUE Att)
+-    OBJ_TAINT(NArray);
+     return NArray;
+     break;
+   case NC_FLOAT:
+@@ -1778,11 +1757,10 @@
  
      attlen[0]=lenp;
      Cfloat_to_NArray(NArray,1,attlen,fp);
@@ -676,7 +695,11 @@ index b3fdf77..6cc4de9 100644
      status = nc_get_att_float(ncid,varid,c_attname,fp);
      if(status != NC_NOERR) NC_RAISE(status);
  
-@@ -1791,7 +1776,7 @@ NetCDF_att_get(VALUE Att)
+-    OBJ_TAINT(NArray);
+     return NArray;
+     break;
+   case NC_DOUBLE:
+@@ -1791,10 +1769,9 @@
  
      attlen[0]=lenp;
      Cdouble_to_NArray(NArray,1,attlen,dp);
@@ -684,8 +707,11 @@ index b3fdf77..6cc4de9 100644
 +
      status = nc_get_att_double(ncid,varid,c_attname,dp);
      if(status != NC_NOERR) NC_RAISE(status);
-     OBJ_TAINT(NArray);
-@@ -1803,7 +1788,7 @@ NetCDF_att_get(VALUE Att)
+-    OBJ_TAINT(NArray);
+     return NArray;
+     break;
+   default:
+@@ -1803,7 +1780,7 @@
    return Qnil;
  }
  
@@ -694,16 +720,18 @@ index b3fdf77..6cc4de9 100644
  VALUE
  NetCDF_var_inq_name(VALUE Var)
  {
-@@ -1820,7 +1805,7 @@ NetCDF_var_inq_name(VALUE Var)
+@@ -1820,9 +1797,8 @@
    varid=Netcdf_var->varid;
    status = nc_inq_varname(ncid,varid,c_var_name);
    if(status != NC_NOERR) NC_RAISE(status);
 -  
 +
    Var_name=rb_str_new2(c_var_name);
-   OBJ_TAINT(Var_name);
+-  OBJ_TAINT(Var_name);
    return Var_name;
-@@ -1837,7 +1822,7 @@ NetCDF_var_ndims(VALUE Var)
+ }
+ 
+@@ -1837,7 +1813,7 @@
    VALUE Var_ndims;
  
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
@@ -712,7 +740,7 @@ index b3fdf77..6cc4de9 100644
    ncid=Netcdf_var->ncid;
    varid=Netcdf_var->varid;
    status = nc_inq_varndims(ncid,varid,&ndimsp);
-@@ -1855,15 +1840,15 @@ NetCDF_var_vartype(VALUE Var)
+@@ -1855,15 +1831,15 @@
    nc_type xtypep;
    struct NetCDFVar *Netcdf_var;
    const char *Vartype;
@@ -731,7 +759,7 @@ index b3fdf77..6cc4de9 100644
    Vartype=nctype2natype(xtypep);
    return(rb_str_new2(Vartype));
  }
-@@ -1876,19 +1861,19 @@ NetCDF_var_typecode(VALUE Var)
+@@ -1876,19 +1852,19 @@
    int varid;
    nc_type xtypep;
    struct NetCDFVar *Netcdf_var;
@@ -755,7 +783,7 @@ index b3fdf77..6cc4de9 100644
  VALUE
  NetCDF_var_natts(VALUE Var)
  {
-@@ -1898,16 +1883,16 @@ NetCDF_var_natts(VALUE Var)
+@@ -1898,16 +1874,16 @@
    int nattsp;
    struct NetCDFVar *Netcdf_var;
    VALUE Var_natts;
@@ -776,7 +804,7 @@ index b3fdf77..6cc4de9 100644
    Var_natts=INT2FIX(nattsp);
    return Var_natts;
  }
-@@ -1918,7 +1903,7 @@ NetCDF_var_file(VALUE Var)
+@@ -1918,7 +1894,7 @@
    struct NetCDFVar *Netcdf_var;
    /* VALUE file; */
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
@@ -785,7 +813,7 @@ index b3fdf77..6cc4de9 100644
    return (Netcdf_var->file);
  }
  
-@@ -1930,15 +1915,14 @@ NetCDF_var_rename(VALUE Var,VALUE var_new_name)
+@@ -1930,15 +1906,14 @@
    int varid;
    char *c_var_new_name;
    struct NetCDFVar *Netcdf_var;
@@ -803,7 +831,7 @@ index b3fdf77..6cc4de9 100644
    status = nc_rename_var(ncid,varid,c_var_new_name);
    if(status !=NC_NOERR) NC_RAISE(status);
  
-@@ -1958,13 +1942,13 @@ NetCDF_var_att(VALUE Var,VALUE att_name)
+@@ -1958,13 +1933,13 @@
    VALUE Att;
  
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
@@ -819,7 +847,7 @@ index b3fdf77..6cc4de9 100644
    status = nc_inq_attid(ncid,varid,c_att_name,&c_attnump);
    if(status == NC_NOERR){
      Netcdf_att=NetCDF_att_init(ncid,varid,c_att_name);
-@@ -1982,17 +1966,17 @@ NetCDF_var_att(VALUE Var,VALUE att_name)
+@@ -1982,17 +1957,17 @@
  
  /* Redifinition of the "==" and "eql?" methods */
  
@@ -841,7 +869,7 @@ index b3fdf77..6cc4de9 100644
  	 strcmp(ncfilea->name,ncfileb->name)==0){
  	  return Qtrue;
        } else {
-@@ -2008,12 +1992,12 @@ NetCDF_var_eql(VALUE Vara,VALUE Varb)
+@@ -2008,12 +1983,12 @@
  {
    struct NetCDFVar *Netcdf_vara;
    struct NetCDFVar *Netcdf_varb;
@@ -856,7 +884,7 @@ index b3fdf77..6cc4de9 100644
  	 Netcdf_vara->varid == Netcdf_varb->varid){
  	  return Qtrue;
        } else {
-@@ -2024,7 +2008,7 @@ NetCDF_var_eql(VALUE Vara,VALUE Varb)
+@@ -2024,7 +1999,7 @@
    }
  }
  
@@ -865,7 +893,7 @@ index b3fdf77..6cc4de9 100644
  NetCDF_dim_eql(VALUE Dima,VALUE Dimb)
  {
    struct NetCDFDim *Netcdf_dima;
-@@ -2033,8 +2017,8 @@ NetCDF_dim_eql(VALUE Dima,VALUE Dimb)
+@@ -2033,8 +2008,8 @@
    if( rb_obj_is_kind_of(Dimb, cNetCDFDim) ){
        Data_Get_Struct(Dima,struct NetCDFDim,Netcdf_dima);
        Data_Get_Struct(Dimb,struct NetCDFDim,Netcdf_dimb);
@@ -876,7 +904,7 @@ index b3fdf77..6cc4de9 100644
  	 Netcdf_dima->dimid == Netcdf_dimb->dimid){
  	  return Qtrue;
        } else {
-@@ -2050,16 +2034,16 @@ NetCDF_att_eql(VALUE Atta,VALUE Attb)
+@@ -2050,16 +2025,16 @@
  {
    struct NetCDFAtt *Netcdf_atta;
    struct NetCDFAtt *Netcdf_attb;
@@ -898,7 +926,7 @@ index b3fdf77..6cc4de9 100644
  	  return Qfalse;
        }
    } else {
-@@ -2104,7 +2088,7 @@ NetCDF_get_var_char(VALUE Var)
+@@ -2104,11 +2079,10 @@
    }
  
    Cbyte_to_NArray(NArray,ndimsp,shape,ptr);
@@ -907,7 +935,11 @@ index b3fdf77..6cc4de9 100644
    status = nc_get_var_text(ncid,varid,(char *)ptr);
    if(status != NC_NOERR) NC_RAISE(status);
  
-@@ -2148,7 +2132,7 @@ NetCDF_get_var_byte(VALUE Var)
+-  OBJ_TAINT(NArray);
+   return NArray;
+ }
+ 
+@@ -2148,11 +2122,10 @@
    }
  
    Cbyte_to_NArray(NArray,ndimsp,shape,ptr);
@@ -916,7 +948,11 @@ index b3fdf77..6cc4de9 100644
    status = nc_get_var_uchar(ncid,varid,ptr);
    if(status != NC_NOERR) NC_RAISE(status);
  
-@@ -2192,7 +2176,7 @@ NetCDF_get_var_sint(VALUE Var)
+-  OBJ_TAINT(NArray);
+   return NArray;
+ }
+ 
+@@ -2192,11 +2165,10 @@
    }
  
    Csint_to_NArray(NArray,ndimsp,shape,ptr);
@@ -925,7 +961,11 @@ index b3fdf77..6cc4de9 100644
    status = nc_get_var_short(ncid,varid,ptr);
    if(status != NC_NOERR) NC_RAISE(status);
  
-@@ -2236,7 +2220,7 @@ NetCDF_get_var_int(VALUE Var)
+-  OBJ_TAINT(NArray);
+   return NArray;
+ }
+ 
+@@ -2236,11 +2208,10 @@
    }
  
    Clint_to_NArray(NArray,ndimsp,shape,ptr);
@@ -934,7 +974,19 @@ index b3fdf77..6cc4de9 100644
    status = nc_get_var_int(ncid,varid,ptr);
    if(status != NC_NOERR) NC_RAISE(status);
  
-@@ -2324,7 +2308,7 @@ NetCDF_get_var_double(VALUE Var)
+-  OBJ_TAINT(NArray);
+   return NArray;
+ }
+ 
+@@ -2284,7 +2255,6 @@
+   status = nc_get_var_float(ncid,varid,ptr);
+   if(status != NC_NOERR) NC_RAISE(status);
+ 
+-  OBJ_TAINT(NArray);
+   return NArray;
+ }
+ 
+@@ -2324,15 +2294,14 @@
    }
  
    Cdouble_to_NArray(NArray,ndimsp,shape,ptr);
@@ -943,7 +995,7 @@ index b3fdf77..6cc4de9 100644
    status = nc_get_var_double(ncid,varid,ptr);
    if(status != NC_NOERR) NC_RAISE(status);
  
-@@ -2332,7 +2316,7 @@ NetCDF_get_var_double(VALUE Var)
+-  OBJ_TAINT(NArray);
    return NArray;
  }
  
@@ -952,7 +1004,7 @@ index b3fdf77..6cc4de9 100644
  NetCDF_get_var1_char(VALUE Var,VALUE start)
  {
    int ncid;
-@@ -2349,7 +2333,7 @@ NetCDF_get_var1_char(VALUE Var,VALUE start)
+@@ -2349,7 +2318,7 @@
    na_shape_t *c_count;
    VALUE NArray;
  
@@ -961,7 +1013,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid = Netcdf_var->ncid;
    varid = Netcdf_var->varid;
-@@ -2358,12 +2342,12 @@ NetCDF_get_var1_char(VALUE Var,VALUE start)
+@@ -2358,12 +2327,12 @@
    if(ndims == 0) {
      rb_raise(rb_eNetcdfError,"Cannot specify a subset of a rank-0 scalar\n");
    }
@@ -976,7 +1028,7 @@ index b3fdf77..6cc4de9 100644
    c_start=ALLOCA_N(size_t,ndims);
    c_count=ALLOCA_N(na_shape_t,ndims);
    for(i=0;i<ndims;i++){
-@@ -2376,13 +2360,13 @@ NetCDF_get_var1_char(VALUE Var,VALUE start)
+@@ -2376,23 +2345,22 @@
        l_start += dimlen;
      }
      c_start[i]=l_start;
@@ -995,7 +1047,9 @@ index b3fdf77..6cc4de9 100644
    Cbyte_to_NArray(NArray,ndims,c_count,ptr);
    status = nc_get_var1_text(ncid,varid,c_start,(char *)ptr);
    if(status != NC_NOERR) NC_RAISE(status);
-@@ -2392,7 +2376,7 @@ NetCDF_get_var1_char(VALUE Var,VALUE start)
+ 
+-  OBJ_TAINT(NArray);
+   return NArray;
  
  }
  
@@ -1004,7 +1058,7 @@ index b3fdf77..6cc4de9 100644
  NetCDF_get_var1_byte(VALUE Var,VALUE start)
  {
    int ncid;
-@@ -2409,7 +2393,7 @@ NetCDF_get_var1_byte(VALUE Var,VALUE start)
+@@ -2409,7 +2377,7 @@
    na_shape_t *c_count;
    VALUE NArray;
  
@@ -1013,7 +1067,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid = Netcdf_var->ncid;
    varid = Netcdf_var->varid;
-@@ -2418,12 +2402,12 @@ NetCDF_get_var1_byte(VALUE Var,VALUE start)
+@@ -2418,12 +2386,12 @@
    if(ndims == 0) {
      rb_raise(rb_eNetcdfError,"Cannot specify a subset of a rank-0 scalar\n");
    }
@@ -1028,7 +1082,7 @@ index b3fdf77..6cc4de9 100644
    c_start=ALLOCA_N(size_t,ndims);
    c_count=ALLOCA_N(na_shape_t,ndims);
    for(i=0;i<ndims;i++){
-@@ -2436,13 +2420,13 @@ NetCDF_get_var1_byte(VALUE Var,VALUE start)
+@@ -2436,23 +2404,22 @@
        l_start += dimlen;
      }
      c_start[i]=l_start;
@@ -1047,7 +1101,9 @@ index b3fdf77..6cc4de9 100644
    Cbyte_to_NArray(NArray,ndims,c_count,ptr);
    status = nc_get_var1_uchar(ncid,varid,c_start,ptr);
    if(status != NC_NOERR) NC_RAISE(status);
-@@ -2452,7 +2436,7 @@ NetCDF_get_var1_byte(VALUE Var,VALUE start)
+ 
+-  OBJ_TAINT(NArray);
+   return NArray;
  
  }
  
@@ -1056,7 +1112,7 @@ index b3fdf77..6cc4de9 100644
  NetCDF_get_var1_sint(VALUE Var,VALUE start)
  {
    int ncid;
-@@ -2477,12 +2461,12 @@ NetCDF_get_var1_sint(VALUE Var,VALUE start)
+@@ -2477,12 +2444,12 @@
    if(ndims == 0) {
      rb_raise(rb_eNetcdfError,"Cannot specify a subset of a rank-0 scalar\n");
    }
@@ -1071,7 +1127,7 @@ index b3fdf77..6cc4de9 100644
    c_start=ALLOCA_N(size_t,ndims);
    c_count=ALLOCA_N(na_shape_t,ndims);
    for(i=0;i<ndims;i++){
-@@ -2497,9 +2481,9 @@ NetCDF_get_var1_sint(VALUE Var,VALUE start)
+@@ -2497,18 +2464,17 @@
      c_start[i]=l_start;
      c_count[i]=1;
    }
@@ -1083,7 +1139,8 @@ index b3fdf77..6cc4de9 100644
    status = nc_get_var1_short(ncid,varid,c_start,ptr);
    if(status != NC_NOERR) NC_RAISE(status);
  
-@@ -2508,7 +2492,7 @@ NetCDF_get_var1_sint(VALUE Var,VALUE start)
+-  OBJ_TAINT(NArray);
+   return NArray;
  
  }
  
@@ -1092,7 +1149,7 @@ index b3fdf77..6cc4de9 100644
  NetCDF_get_var1_int(VALUE Var,VALUE start)
  {
    int ncid;
-@@ -2533,12 +2517,12 @@ NetCDF_get_var1_int(VALUE Var,VALUE start)
+@@ -2533,12 +2499,12 @@
    if(ndims == 0) {
      rb_raise(rb_eNetcdfError,"Cannot specify a subset of a rank-0 scalar\n");
    }
@@ -1107,7 +1164,7 @@ index b3fdf77..6cc4de9 100644
    c_start=ALLOCA_N(size_t,ndims);
    c_count=ALLOCA_N(na_shape_t,ndims);
    for(i=0;i<ndims;i++){
-@@ -2553,9 +2537,9 @@ NetCDF_get_var1_int(VALUE Var,VALUE start)
+@@ -2553,18 +2519,17 @@
      c_start[i]=l_start;
      c_count[i]=1;
    }
@@ -1119,7 +1176,8 @@ index b3fdf77..6cc4de9 100644
    status = nc_get_var1_int(ncid,varid,c_start,ptr);
    if(status != NC_NOERR) NC_RAISE(status);
  
-@@ -2564,7 +2548,7 @@ NetCDF_get_var1_int(VALUE Var,VALUE start)
+-  OBJ_TAINT(NArray);
+   return NArray;
  
  }
  
@@ -1128,7 +1186,7 @@ index b3fdf77..6cc4de9 100644
  NetCDF_get_var1_float(VALUE Var,VALUE start)
  {
    int ncid;
-@@ -2589,12 +2573,12 @@ NetCDF_get_var1_float(VALUE Var,VALUE start)
+@@ -2589,12 +2554,12 @@
    if(ndims == 0) {
      rb_raise(rb_eNetcdfError,"Cannot specify a subset of a rank-0 scalar\n");
    }
@@ -1143,7 +1201,7 @@ index b3fdf77..6cc4de9 100644
    c_start=ALLOCA_N(size_t,ndims);
    c_count=ALLOCA_N(na_shape_t,ndims);
    for(i=0;i<ndims;i++){
-@@ -2609,9 +2593,9 @@ NetCDF_get_var1_float(VALUE Var,VALUE start)
+@@ -2609,18 +2574,17 @@
      c_start[i]=l_start;
      c_count[i]=1;
    }
@@ -1155,7 +1213,8 @@ index b3fdf77..6cc4de9 100644
    status = nc_get_var1_float(ncid,varid,c_start,ptr);
    if(status != NC_NOERR) NC_RAISE(status);
  
-@@ -2620,7 +2604,7 @@ NetCDF_get_var1_float(VALUE Var,VALUE start)
+-  OBJ_TAINT(NArray);
+   return NArray;
  
  }
  
@@ -1164,7 +1223,7 @@ index b3fdf77..6cc4de9 100644
  NetCDF_get_var1_double(VALUE Var,VALUE start)
  {
    int ncid;
-@@ -2645,12 +2629,12 @@ NetCDF_get_var1_double(VALUE Var,VALUE start)
+@@ -2645,12 +2609,12 @@
    if(ndims == 0) {
      rb_raise(rb_eNetcdfError,"Cannot specify a subset of a rank-0 scalar\n");
    }
@@ -1179,7 +1238,7 @@ index b3fdf77..6cc4de9 100644
    c_start=ALLOCA_N(size_t,ndims);
    c_count=ALLOCA_N(na_shape_t,ndims);
    for(i=0;i<ndims;i++){
-@@ -2665,9 +2649,9 @@ NetCDF_get_var1_double(VALUE Var,VALUE start)
+@@ -2665,13 +2629,12 @@
      c_start[i]=l_start;
      c_count[i]=1;
    }
@@ -1191,7 +1250,11 @@ index b3fdf77..6cc4de9 100644
    status = nc_get_var1_double(ncid,varid,c_start,ptr);
    if(status != NC_NOERR) NC_RAISE(status);
  
-@@ -2698,7 +2682,7 @@ NetCDF_get_vars_char(VALUE Var,VALUE start,VALUE end,VALUE stride)
+-  OBJ_TAINT(NArray);
+   return NArray;
+ 
+ }
+@@ -2698,7 +2661,7 @@
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid = Netcdf_var->ncid;
    varid = Netcdf_var->varid;
@@ -1200,7 +1263,7 @@ index b3fdf77..6cc4de9 100644
    status = nc_inq_varndims(ncid,varid,&ndims);
    if(status != NC_NOERR) NC_RAISE(status);
    if(ndims == 0) {
-@@ -2708,7 +2692,7 @@ NetCDF_get_vars_char(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -2708,7 +2671,7 @@
    dimids = ALLOCA_N(int,ndims);
    status = nc_inq_vardimid(ncid,varid,dimids);
    if(status != NC_NOERR) NC_RAISE(status);
@@ -1209,7 +1272,7 @@ index b3fdf77..6cc4de9 100644
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) < ndims){
      rb_raise(rb_eNetcdfError, "Length of 'start' is too short\n");
-@@ -2716,7 +2700,7 @@ NetCDF_get_vars_char(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -2716,7 +2679,7 @@
    c_start = ALLOCA_N(size_t,ndims);
    for(i=0; i<ndims; i++){
      l_start=NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
@@ -1218,7 +1281,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
        status = nc_inq_dimlen(ncid, dimids[i], &dimlen);
        if(status != NC_NOERR) NC_RAISE(status);
-@@ -2769,14 +2753,14 @@ NetCDF_get_vars_char(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -2769,18 +2732,17 @@
      }
    }
  
@@ -1236,7 +1299,11 @@ index b3fdf77..6cc4de9 100644
    status = nc_get_vars_text(ncid,varid,c_start,c_count,c_stride,(char *)ptr);
    if(status != NC_NOERR) NC_RAISE(status);
  
-@@ -2806,7 +2790,7 @@ NetCDF_get_vars_byte(VALUE Var,VALUE start,VALUE end,VALUE stride)
+-  OBJ_TAINT(NArray);
+   return NArray;
+ }
+ 
+@@ -2806,7 +2768,7 @@
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid = Netcdf_var->ncid;
    varid = Netcdf_var->varid;
@@ -1245,7 +1312,7 @@ index b3fdf77..6cc4de9 100644
    status = nc_inq_varndims(ncid,varid,&ndims);
    if(status != NC_NOERR) NC_RAISE(status);
    if(ndims == 0) {
-@@ -2816,7 +2800,7 @@ NetCDF_get_vars_byte(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -2816,7 +2778,7 @@
    dimids = ALLOCA_N(int,ndims);
    status = nc_inq_vardimid(ncid,varid,dimids);
    if(status != NC_NOERR) NC_RAISE(status);
@@ -1254,7 +1321,7 @@ index b3fdf77..6cc4de9 100644
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) < ndims){
      rb_raise(rb_eNetcdfError, "Length of 'start' is too short\n");
-@@ -2824,7 +2808,7 @@ NetCDF_get_vars_byte(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -2824,7 +2786,7 @@
    c_start = ALLOCA_N(size_t,ndims);
    for(i=0; i<ndims; i++){
      l_start=NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
@@ -1263,7 +1330,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
        status = nc_inq_dimlen(ncid, dimids[i], &dimlen);
        if(status != NC_NOERR) NC_RAISE(status);
-@@ -2877,14 +2861,14 @@ NetCDF_get_vars_byte(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -2877,18 +2839,17 @@
      }
    }
  
@@ -1281,7 +1348,11 @@ index b3fdf77..6cc4de9 100644
    status = nc_get_vars_uchar(ncid,varid,c_start,c_count,c_stride,ptr);
    if(status != NC_NOERR) NC_RAISE(status);
  
-@@ -2914,7 +2898,7 @@ NetCDF_get_vars_sint(VALUE Var,VALUE start,VALUE end,VALUE stride)
+-  OBJ_TAINT(NArray);
+   return NArray;
+ }
+ 
+@@ -2914,7 +2875,7 @@
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid = Netcdf_var->ncid;
    varid = Netcdf_var->varid;
@@ -1290,7 +1361,7 @@ index b3fdf77..6cc4de9 100644
    status = nc_inq_varndims(ncid,varid,&ndims);
    if(status != NC_NOERR) NC_RAISE(status);
    if(ndims == 0) {
-@@ -2924,7 +2908,7 @@ NetCDF_get_vars_sint(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -2924,7 +2885,7 @@
    dimids = ALLOCA_N(int,ndims);
    status = nc_inq_vardimid(ncid,varid,dimids);
    if(status != NC_NOERR) NC_RAISE(status);
@@ -1299,7 +1370,7 @@ index b3fdf77..6cc4de9 100644
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) < ndims){
      rb_raise(rb_eNetcdfError, "Length of 'start' is too short\n");
-@@ -2932,7 +2916,7 @@ NetCDF_get_vars_sint(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -2932,7 +2893,7 @@
    c_start = ALLOCA_N(size_t,ndims);
    for(i=0; i<ndims; i++){
      l_start=NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
@@ -1308,7 +1379,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
        status = nc_inq_dimlen(ncid, dimids[i], &dimlen);
        if(status != NC_NOERR) NC_RAISE(status);
-@@ -2984,19 +2968,19 @@ NetCDF_get_vars_sint(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -2984,20 +2945,19 @@
        c_count[i]=(l_end-c_start[i])/c_stride[i]+1;
      }
    }
@@ -1328,11 +1399,12 @@ index b3fdf77..6cc4de9 100644
    status = nc_get_vars_short(ncid,varid,c_start,c_count,c_stride,ptr);
    if(status != NC_NOERR) NC_RAISE(status);
 -  
+-  OBJ_TAINT(NArray);
 +
-   OBJ_TAINT(NArray);
    return NArray;
  }
-@@ -3023,7 +3007,7 @@ NetCDF_get_vars_int(VALUE Var,VALUE start,VALUE end,VALUE stride)
+ 
+@@ -3023,7 +2983,7 @@
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid = Netcdf_var->ncid;
    varid = Netcdf_var->varid;
@@ -1341,7 +1413,7 @@ index b3fdf77..6cc4de9 100644
    status = nc_inq_varndims(ncid,varid,&ndims);
    if(status != NC_NOERR) NC_RAISE(status);
    if(ndims == 0) {
-@@ -3033,7 +3017,7 @@ NetCDF_get_vars_int(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -3033,7 +2993,7 @@
    dimids = ALLOCA_N(int,ndims);
    status = nc_inq_vardimid(ncid,varid,dimids);
    if(status != NC_NOERR) NC_RAISE(status);
@@ -1350,7 +1422,7 @@ index b3fdf77..6cc4de9 100644
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) < ndims){
      rb_raise(rb_eNetcdfError, "Length of 'start' is too short\n");
-@@ -3041,7 +3025,7 @@ NetCDF_get_vars_int(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -3041,7 +3001,7 @@
    c_start = ALLOCA_N(size_t,ndims);
    for(i=0; i<ndims; i++){
      l_start=NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
@@ -1359,7 +1431,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
        status = nc_inq_dimlen(ncid, dimids[i], &dimlen);
        if(status != NC_NOERR) NC_RAISE(status);
-@@ -3094,14 +3078,14 @@ NetCDF_get_vars_int(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -3094,19 +3054,18 @@
      }
    }
  
@@ -1376,7 +1448,12 @@ index b3fdf77..6cc4de9 100644
  
    status = nc_get_vars_int(ncid,varid,c_start,c_count,c_stride,ptr);
    if(status != NC_NOERR) NC_RAISE(status);
-@@ -3132,7 +3116,7 @@ NetCDF_get_vars_float(VALUE Var,VALUE start,VALUE end,VALUE stride)
+ 
+-  OBJ_TAINT(NArray);
+   return NArray;
+ }
+ 
+@@ -3132,7 +3091,7 @@
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid = Netcdf_var->ncid;
    varid = Netcdf_var->varid;
@@ -1385,7 +1462,7 @@ index b3fdf77..6cc4de9 100644
    status = nc_inq_varndims(ncid,varid,&ndims);
    if(status != NC_NOERR) NC_RAISE(status);
    if(ndims == 0) {
-@@ -3142,7 +3126,7 @@ NetCDF_get_vars_float(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -3142,7 +3101,7 @@
    dimids = ALLOCA_N(int,ndims);
    status = nc_inq_vardimid(ncid,varid,dimids);
    if(status != NC_NOERR) NC_RAISE(status);
@@ -1394,7 +1471,7 @@ index b3fdf77..6cc4de9 100644
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) < ndims){
      rb_raise(rb_eNetcdfError, "Length of 'start' is too short\n");
-@@ -3150,7 +3134,7 @@ NetCDF_get_vars_float(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -3150,7 +3109,7 @@
    c_start = ALLOCA_N(size_t,ndims);
    for(i=0; i<ndims; i++){
      l_start=NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
@@ -1403,7 +1480,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
        status = nc_inq_dimlen(ncid, dimids[i], &dimlen);
        if(status != NC_NOERR) NC_RAISE(status);
-@@ -3202,16 +3186,16 @@ NetCDF_get_vars_float(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -3202,20 +3161,19 @@
        c_count[i]=(l_end-c_start[i])/c_stride[i]+1;
      }
    }
@@ -1424,7 +1501,11 @@ index b3fdf77..6cc4de9 100644
    status = nc_get_vars_float(ncid,varid,c_start,c_count,c_stride,ptr);
    if(status != NC_NOERR) NC_RAISE(status);
  
-@@ -3241,7 +3225,7 @@ NetCDF_get_vars_double(VALUE Var,VALUE start,VALUE end,VALUE stride)
+-  OBJ_TAINT(NArray);
+   return NArray;
+ }
+ 
+@@ -3241,7 +3199,7 @@
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid = Netcdf_var->ncid;
    varid = Netcdf_var->varid;
@@ -1433,7 +1514,7 @@ index b3fdf77..6cc4de9 100644
    status = nc_inq_varndims(ncid,varid,&ndims);
    if(status != NC_NOERR) NC_RAISE(status);
    if(ndims == 0) {
-@@ -3251,7 +3235,7 @@ NetCDF_get_vars_double(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -3251,7 +3209,7 @@
    dimids = ALLOCA_N(int,ndims);
    status = nc_inq_vardimid(ncid,varid,dimids);
    if(status != NC_NOERR) NC_RAISE(status);
@@ -1442,7 +1523,7 @@ index b3fdf77..6cc4de9 100644
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) < ndims){
      rb_raise(rb_eNetcdfError, "Length of 'start' is too short\n");
-@@ -3259,7 +3243,7 @@ NetCDF_get_vars_double(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -3259,7 +3217,7 @@
    c_start = ALLOCA_N(size_t,ndims);
    for(i=0; i<ndims; i++){
      l_start=NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
@@ -1451,7 +1532,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
        status = nc_inq_dimlen(ncid, dimids[i], &dimlen);
        if(status != NC_NOERR) NC_RAISE(status);
-@@ -3311,15 +3295,15 @@ NetCDF_get_vars_double(VALUE Var,VALUE start,VALUE end,VALUE stride)
+@@ -3311,19 +3269,18 @@
        c_count[i]=(l_end-c_start[i])/c_stride[i]+1;
      }
    }
@@ -1470,7 +1551,11 @@ index b3fdf77..6cc4de9 100644
    status = nc_get_vars_double(ncid,varid,c_start,c_count,c_stride,ptr);
    if(status != NC_NOERR) NC_RAISE(status);
  
-@@ -3343,13 +3327,12 @@ NetCDF_put_var_char(VALUE Var,VALUE NArray)
+-  OBJ_TAINT(NArray);
+   return NArray;
+ }
+ 
+@@ -3343,13 +3300,12 @@
    size_t lengthp;
    char *var_name;
  
@@ -1485,7 +1570,7 @@ index b3fdf77..6cc4de9 100644
    status = nc_inq_varndims(ncid,varid,&ndimsp);
    if(status != NC_NOERR) NC_RAISE(status);
    for(i=0;i<ndimsp;i++){
-@@ -3388,13 +3371,12 @@ NetCDF_put_var_byte(VALUE Var,VALUE NArray)
+@@ -3388,13 +3344,12 @@
    size_t lengthp;
    char *var_name;
  
@@ -1500,7 +1585,7 @@ index b3fdf77..6cc4de9 100644
    status = nc_inq_varndims(ncid,varid,&ndimsp);
    if(status != NC_NOERR) NC_RAISE(status);
    for(i=0;i<ndimsp;i++){
-@@ -3433,12 +3415,11 @@ NetCDF_put_var_short(VALUE Var,VALUE NArray)
+@@ -3433,12 +3388,11 @@
    size_t lengthp;
    char *var_name;
  
@@ -1514,7 +1599,7 @@ index b3fdf77..6cc4de9 100644
    status = nc_inq_varndims(ncid,varid,&ndimsp);
    if(status != NC_NOERR) NC_RAISE(status);
    for(i=0;i<ndimsp;i++){
-@@ -3478,7 +3459,6 @@ NetCDF_put_var_int(VALUE Var,VALUE NArray)
+@@ -3478,7 +3432,6 @@
    size_t lengthp;
    char *var_name;
  
@@ -1522,7 +1607,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid=Netcdf_var->ncid;
    varid=Netcdf_var->varid;
-@@ -3503,8 +3483,8 @@ NetCDF_put_var_int(VALUE Var,VALUE NArray)
+@@ -3503,8 +3456,8 @@
      if(status != NC_NOERR) NC_RAISE(status);
      rb_raise(rb_eNetcdfError,"Length of NArray don't equal to length of total array length in the '%s'\n",var_name);
    }
@@ -1533,7 +1618,7 @@ index b3fdf77..6cc4de9 100644
    status = nc_put_var_int(ncid,varid,ptr);
    if(status !=NC_NOERR) NC_RAISE(status);
    return Qnil;
-@@ -3525,15 +3505,14 @@ NetCDF_put_var_float(VALUE Var,VALUE NArray)
+@@ -3525,15 +3478,14 @@
    int dimids[NC_MAX_DIMS];
    size_t lengthp;
    char *var_name;
@@ -1552,7 +1637,7 @@ index b3fdf77..6cc4de9 100644
    status = nc_inq_varndims(ncid,varid,&ndimsp);
    if(status != NC_NOERR) NC_RAISE(status);
    for(i=0;i<ndimsp;i++){
-@@ -3574,7 +3553,6 @@ NetCDF_put_var_double(VALUE Var,VALUE NArray)
+@@ -3574,7 +3526,6 @@
    char *var_name;
  
  
@@ -1560,7 +1645,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid=Netcdf_var->ncid;
    varid=Netcdf_var->varid;
-@@ -3619,19 +3597,18 @@ NetCDF_put_var1_char(VALUE Var,VALUE NArray,VALUE start)
+@@ -3619,19 +3570,18 @@
    int ndims;
    int   *dimids;
    size_t dimlen;
@@ -1583,7 +1668,7 @@ index b3fdf77..6cc4de9 100644
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) <ndims) {
      rb_raise(rb_eNetcdfError,"Length of 'start' is too short\n");
-@@ -3640,7 +3617,7 @@ NetCDF_put_var1_char(VALUE Var,VALUE NArray,VALUE start)
+@@ -3640,7 +3590,7 @@
    c_start=ALLOCA_N(size_t,ndims);
    for(i=0;i<ndims;i++){
      l_start=NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
@@ -1592,7 +1677,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
        status = nc_inq_dimlen(ncid,dimids[i],&dimlen);
        if(status != NC_NOERR) NC_RAISE(status);
-@@ -3670,19 +3647,18 @@ NetCDF_put_var1_byte(VALUE Var,VALUE NArray,VALUE start)
+@@ -3670,19 +3620,18 @@
    int ndims;
    int   *dimids;
    size_t dimlen;
@@ -1615,7 +1700,7 @@ index b3fdf77..6cc4de9 100644
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) <ndims) {
      rb_raise(rb_eNetcdfError,"Length of 'start' is too short\n");
-@@ -3691,7 +3667,7 @@ NetCDF_put_var1_byte(VALUE Var,VALUE NArray,VALUE start)
+@@ -3691,7 +3640,7 @@
    c_start=ALLOCA_N(size_t,ndims);
    for(i=0;i<ndims;i++){
      l_start=NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
@@ -1624,7 +1709,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
        status = nc_inq_dimlen(ncid,dimids[i],&dimlen);
        if(status != NC_NOERR) NC_RAISE(status);
-@@ -3721,19 +3697,18 @@ NetCDF_put_var1_sint(VALUE Var,VALUE NArray,VALUE start)
+@@ -3721,19 +3670,18 @@
    int ndims;
    int   *dimids;
    size_t dimlen;
@@ -1647,7 +1732,7 @@ index b3fdf77..6cc4de9 100644
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) <ndims) {
      rb_raise(rb_eNetcdfError,"Length of 'start' is too short\n");
-@@ -3742,7 +3717,7 @@ NetCDF_put_var1_sint(VALUE Var,VALUE NArray,VALUE start)
+@@ -3742,7 +3690,7 @@
    c_start=ALLOCA_N(size_t,ndims);
    for(i=0;i<ndims;i++){
      l_start=NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
@@ -1656,7 +1741,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
        status = nc_inq_dimlen(ncid,dimids[i],&dimlen);
        if(status != NC_NOERR) NC_RAISE(status);
-@@ -3771,19 +3746,18 @@ NetCDF_put_var1_int(VALUE Var,VALUE NArray,VALUE start)
+@@ -3771,19 +3719,18 @@
    int ndims;
    int   *dimids;
    size_t dimlen;
@@ -1679,7 +1764,7 @@ index b3fdf77..6cc4de9 100644
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) <ndims) {
      rb_raise(rb_eNetcdfError,"Length of 'start' is too short\n");
-@@ -3792,7 +3766,7 @@ NetCDF_put_var1_int(VALUE Var,VALUE NArray,VALUE start)
+@@ -3792,7 +3739,7 @@
    c_start=ALLOCA_N(size_t,ndims);
    for(i=0;i<ndims;i++){
      l_start=NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
@@ -1688,7 +1773,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
        status = nc_inq_dimlen(ncid,dimids[i],&dimlen);
        if(status != NC_NOERR) NC_RAISE(status);
-@@ -3822,19 +3796,18 @@ NetCDF_put_var1_float(VALUE Var,VALUE NArray,VALUE start)
+@@ -3822,19 +3769,18 @@
    int ndims;
    int   *dimids;
    size_t dimlen;
@@ -1711,7 +1796,7 @@ index b3fdf77..6cc4de9 100644
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) <ndims) {
      rb_raise(rb_eNetcdfError,"Length of 'start' is too short\n");
-@@ -3843,7 +3816,7 @@ NetCDF_put_var1_float(VALUE Var,VALUE NArray,VALUE start)
+@@ -3843,7 +3789,7 @@
    c_start=ALLOCA_N(size_t,ndims);
    for(i=0;i<ndims;i++){
      l_start=NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
@@ -1720,7 +1805,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
        status = nc_inq_dimlen(ncid,dimids[i],&dimlen);
        if(status != NC_NOERR) NC_RAISE(status);
-@@ -3873,19 +3846,18 @@ NetCDF_put_var1_double(VALUE Var,VALUE NArray,VALUE start)
+@@ -3873,19 +3819,18 @@
    int ndims;
    int   *dimids;
    size_t dimlen;
@@ -1743,7 +1828,7 @@ index b3fdf77..6cc4de9 100644
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) <ndims) {
      rb_raise(rb_eNetcdfError,"Length of 'start' is too short\n");
-@@ -3894,7 +3866,7 @@ NetCDF_put_var1_double(VALUE Var,VALUE NArray,VALUE start)
+@@ -3894,7 +3839,7 @@
    c_start=ALLOCA_N(size_t,ndims);
    for(i=0;i<ndims;i++){
      l_start=NUM2INT(RARRAY_PTR(start)[ndims-1-i]);
@@ -1752,7 +1837,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
        status = nc_inq_dimlen(ncid,dimids[i],&dimlen);
        if(status != NC_NOERR) NC_RAISE(status);
-@@ -3930,7 +3902,6 @@ NetCDF_put_vars_char(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -3930,7 +3875,6 @@
    int   *dimids;
    size_t dimlen;
  
@@ -1760,7 +1845,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid=Netcdf_var->ncid;
    varid=Netcdf_var->varid;
-@@ -3943,12 +3914,12 @@ NetCDF_put_vars_char(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -3943,12 +3887,12 @@
  
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) < ndims) {
@@ -1775,7 +1860,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
  	status = nc_inq_dimlen(ncid, dimids[i], &dimlen);
  	if(status != NC_NOERR) NC_RAISE(status);
-@@ -3956,7 +3927,7 @@ NetCDF_put_vars_char(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -3956,7 +3900,7 @@
      }
      c_start[i]=l_start;
    }
@@ -1784,7 +1869,7 @@ index b3fdf77..6cc4de9 100644
    c_stride=ALLOCA_N(ptrdiff_t,ndims);
    switch(TYPE(stride)){
    case T_NIL:
-@@ -3967,12 +3938,12 @@ NetCDF_put_vars_char(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -3967,12 +3911,12 @@
    default:
        Check_Type(stride,T_ARRAY);
        if(RARRAY_LEN(stride) < ndims) {
@@ -1799,7 +1884,7 @@ index b3fdf77..6cc4de9 100644
  	  }
        }
    }
-@@ -3990,7 +3961,7 @@ NetCDF_put_vars_char(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -3990,7 +3934,7 @@
    default:
        Check_Type(end,T_ARRAY);
        if(RARRAY_LEN(end) < ndims) {
@@ -1808,7 +1893,24 @@ index b3fdf77..6cc4de9 100644
        }
        for(i=0; i<ndims; i++){
  	  l_end=NUM2INT(RARRAY_PTR(end)[ndims-1-i]);
-@@ -4036,7 +4007,6 @@ NetCDF_put_vars_byte(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4007,11 +3951,11 @@
+ 	  ptr = ALLOCA_N(unsigned char,c_count_all);
+ 	  for(i=0;i<c_count_all;i++){ptr[i]=scalar;}
+       } else if(len != c_count_all) {
+-	rb_raise(rb_eNetcdfError, 
+-		 "length of the array does not agree with that of the subset\n"); 
+-      } 
+-  } 
+-  
++	rb_raise(rb_eNetcdfError,
++		 "length of the array does not agree with that of the subset\n");
++      }
++  }
++
+   status = nc_put_vars_text(ncid,varid,c_start,c_count,c_stride,(char *)ptr);
+   if(status != NC_NOERR) NC_RAISE(status);
+   return Qnil;
+@@ -4036,7 +3980,6 @@
    int   *dimids;
    size_t dimlen;
  
@@ -1816,7 +1918,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid=Netcdf_var->ncid;
    varid=Netcdf_var->varid;
-@@ -4049,12 +4019,12 @@ NetCDF_put_vars_byte(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4049,12 +3992,12 @@
  
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) < ndims) {
@@ -1831,7 +1933,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
  	status = nc_inq_dimlen(ncid, dimids[i], &dimlen);
  	if(status != NC_NOERR) NC_RAISE(status);
-@@ -4062,7 +4032,7 @@ NetCDF_put_vars_byte(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4062,7 +4005,7 @@
      }
      c_start[i]=l_start;
    }
@@ -1840,7 +1942,7 @@ index b3fdf77..6cc4de9 100644
    c_stride=ALLOCA_N(ptrdiff_t,ndims);
    switch(TYPE(stride)){
    case T_NIL:
-@@ -4073,12 +4043,12 @@ NetCDF_put_vars_byte(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4073,12 +4016,12 @@
    default:
        Check_Type(stride,T_ARRAY);
        if(RARRAY_LEN(stride) < ndims) {
@@ -1855,7 +1957,7 @@ index b3fdf77..6cc4de9 100644
  	  }
        }
    }
-@@ -4096,7 +4066,7 @@ NetCDF_put_vars_byte(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4096,7 +4039,7 @@
    default:
        Check_Type(end,T_ARRAY);
        if(RARRAY_LEN(end) < ndims) {
@@ -1864,7 +1966,24 @@ index b3fdf77..6cc4de9 100644
        }
        for(i=0; i<ndims; i++){
  	  l_end=NUM2INT(RARRAY_PTR(end)[ndims-1-i]);
-@@ -4142,7 +4112,6 @@ NetCDF_put_vars_sint(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4113,11 +4056,11 @@
+ 	  ptr = ALLOCA_N(unsigned char,c_count_all);
+ 	  for(i=0;i<c_count_all;i++){ptr[i]=scalar;}
+       } else if(len != c_count_all) {
+-	rb_raise(rb_eNetcdfError, 
+-		 "length of the array does not agree with that of the subset\n"); 
+-      } 
+-  } 
+-  
++	rb_raise(rb_eNetcdfError,
++		 "length of the array does not agree with that of the subset\n");
++      }
++  }
++
+   status = nc_put_vars_uchar(ncid,varid,c_start,c_count,c_stride,ptr);
+   if(status != NC_NOERR) NC_RAISE(status);
+   return Qnil;
+@@ -4142,7 +4085,6 @@
    int   *dimids;
    size_t dimlen;
  
@@ -1872,7 +1991,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid=Netcdf_var->ncid;
    varid=Netcdf_var->varid;
-@@ -4155,12 +4124,12 @@ NetCDF_put_vars_sint(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4155,12 +4097,12 @@
  
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) < ndims) {
@@ -1887,7 +2006,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
  	status = nc_inq_dimlen(ncid, dimids[i], &dimlen);
  	if(status != NC_NOERR) NC_RAISE(status);
-@@ -4168,7 +4137,7 @@ NetCDF_put_vars_sint(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4168,7 +4110,7 @@
      }
      c_start[i]=l_start;
    }
@@ -1896,7 +2015,7 @@ index b3fdf77..6cc4de9 100644
    c_stride=ALLOCA_N(ptrdiff_t,ndims);
    switch(TYPE(stride)){
    case T_NIL:
-@@ -4179,12 +4148,12 @@ NetCDF_put_vars_sint(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4179,12 +4121,12 @@
    default:
        Check_Type(stride,T_ARRAY);
        if(RARRAY_LEN(stride) < ndims) {
@@ -1911,7 +2030,7 @@ index b3fdf77..6cc4de9 100644
  	  }
        }
    }
-@@ -4202,7 +4171,7 @@ NetCDF_put_vars_sint(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4202,7 +4144,7 @@
    default:
        Check_Type(end,T_ARRAY);
        if(RARRAY_LEN(end) < ndims) {
@@ -1920,7 +2039,18 @@ index b3fdf77..6cc4de9 100644
        }
        for(i=0; i<ndims; i++){
  	  l_end=NUM2INT(RARRAY_PTR(end)[ndims-1-i]);
-@@ -4249,7 +4218,6 @@ NetCDF_put_vars_int(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4219,8 +4161,8 @@
+ 	  ptr = ALLOCA_N(short,c_count_all);
+ 	  for(i=0;i<c_count_all;i++){ptr[i]=scalar;}
+       } else if(len != c_count_all) {
+-	  rb_raise(rb_eNetcdfError, 
+-              "length of the array does not agree with that of the subset\n"); 
++	  rb_raise(rb_eNetcdfError,
++              "length of the array does not agree with that of the subset\n");
+       }
+   }
+ 
+@@ -4249,7 +4191,6 @@
    int   *dimids;
    size_t dimlen;
  
@@ -1928,7 +2058,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid=Netcdf_var->ncid;
    varid=Netcdf_var->varid;
-@@ -4262,12 +4230,12 @@ NetCDF_put_vars_int(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4262,12 +4203,12 @@
  
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) < ndims) {
@@ -1943,7 +2073,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
  	status = nc_inq_dimlen(ncid, dimids[i], &dimlen);
  	if(status != NC_NOERR) NC_RAISE(status);
-@@ -4275,7 +4243,7 @@ NetCDF_put_vars_int(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4275,7 +4216,7 @@
      }
      c_start[i]=l_start;
    }
@@ -1952,7 +2082,7 @@ index b3fdf77..6cc4de9 100644
    c_stride=ALLOCA_N(ptrdiff_t,ndims);
    switch(TYPE(stride)){
    case T_NIL:
-@@ -4286,12 +4254,12 @@ NetCDF_put_vars_int(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4286,12 +4227,12 @@
    default:
        Check_Type(stride,T_ARRAY);
        if(RARRAY_LEN(stride) < ndims) {
@@ -1967,7 +2097,7 @@ index b3fdf77..6cc4de9 100644
  	  }
        }
    }
-@@ -4309,7 +4277,7 @@ NetCDF_put_vars_int(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4309,7 +4250,7 @@
    default:
        Check_Type(end,T_ARRAY);
        if(RARRAY_LEN(end) < ndims) {
@@ -1976,7 +2106,7 @@ index b3fdf77..6cc4de9 100644
        }
        for(i=0; i<ndims; i++){
  	  l_end=NUM2INT(RARRAY_PTR(end)[ndims-1-i]);
-@@ -4326,8 +4294,8 @@ NetCDF_put_vars_int(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4326,8 +4267,8 @@
  	  ptr = ALLOCA_N(int,c_count_all);
  	  for(i=0;i<c_count_all;i++){ptr[i]=scalar;}
        } else if(len != c_count_all) {
@@ -1987,7 +2117,7 @@ index b3fdf77..6cc4de9 100644
        }
    }
  
-@@ -4356,7 +4324,6 @@ NetCDF_put_vars_float(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4356,7 +4297,6 @@
    int   *dimids;
    size_t dimlen;
  
@@ -1995,7 +2125,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid=Netcdf_var->ncid;
    varid=Netcdf_var->varid;
-@@ -4369,12 +4336,12 @@ NetCDF_put_vars_float(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4369,12 +4309,12 @@
  
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) < ndims) {
@@ -2010,7 +2140,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
  	status = nc_inq_dimlen(ncid, dimids[i], &dimlen);
  	if(status != NC_NOERR) NC_RAISE(status);
-@@ -4382,7 +4349,7 @@ NetCDF_put_vars_float(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4382,7 +4322,7 @@
      }
      c_start[i]=l_start;
    }
@@ -2019,7 +2149,7 @@ index b3fdf77..6cc4de9 100644
    c_stride=ALLOCA_N(ptrdiff_t,ndims);
    switch(TYPE(stride)){
    case T_NIL:
-@@ -4393,12 +4360,12 @@ NetCDF_put_vars_float(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4393,12 +4333,12 @@
    default:
        Check_Type(stride,T_ARRAY);
        if(RARRAY_LEN(stride) < ndims) {
@@ -2034,7 +2164,7 @@ index b3fdf77..6cc4de9 100644
  	  }
        }
    }
-@@ -4416,7 +4383,7 @@ NetCDF_put_vars_float(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride)
+@@ -4416,7 +4356,7 @@
    default:
        Check_Type(end,T_ARRAY);
        if(RARRAY_LEN(end) < ndims) {
@@ -2043,7 +2173,18 @@ index b3fdf77..6cc4de9 100644
        }
        for(i=0; i<ndims; i++){
  	  l_end=NUM2INT(RARRAY_PTR(end)[ndims-1-i]);
-@@ -4463,7 +4430,6 @@ NetCDF_put_vars_double(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride
+@@ -4433,8 +4373,8 @@
+ 	  ptr = ALLOCA_N(float,c_count_all);
+ 	  for(i=0;i<c_count_all;i++){ptr[i]=scalar;}
+       } else if(len != c_count_all) {
+-	  rb_raise(rb_eNetcdfError, 
+-              "length of the array does not agree with that of the subset\n"); 
++	  rb_raise(rb_eNetcdfError,
++              "length of the array does not agree with that of the subset\n");
+       }
+   }
+ 
+@@ -4463,7 +4403,6 @@
    int   *dimids;
    size_t dimlen;
  
@@ -2051,7 +2192,7 @@ index b3fdf77..6cc4de9 100644
    Data_Get_Struct(Var,struct NetCDFVar,Netcdf_var);
    ncid=Netcdf_var->ncid;
    varid=Netcdf_var->varid;
-@@ -4476,12 +4442,12 @@ NetCDF_put_vars_double(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride
+@@ -4476,12 +4415,12 @@
  
    Check_Type(start,T_ARRAY);
    if(RARRAY_LEN(start) < ndims) {
@@ -2066,7 +2207,7 @@ index b3fdf77..6cc4de9 100644
      if(l_start < 0) {
  	status = nc_inq_dimlen(ncid, dimids[i], &dimlen);
  	if(status != NC_NOERR) NC_RAISE(status);
-@@ -4489,7 +4455,7 @@ NetCDF_put_vars_double(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride
+@@ -4489,7 +4428,7 @@
      }
      c_start[i]=l_start;
    }
@@ -2075,7 +2216,7 @@ index b3fdf77..6cc4de9 100644
    c_stride=ALLOCA_N(ptrdiff_t,ndims);
    switch(TYPE(stride)){
    case T_NIL:
-@@ -4500,12 +4466,12 @@ NetCDF_put_vars_double(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride
+@@ -4500,12 +4439,12 @@
    default:
        Check_Type(stride,T_ARRAY);
        if(RARRAY_LEN(stride) < ndims) {
@@ -2090,7 +2231,7 @@ index b3fdf77..6cc4de9 100644
  	  }
        }
    }
-@@ -4523,7 +4489,7 @@ NetCDF_put_vars_double(VALUE Var,VALUE NArray,VALUE start,VALUE end,VALUE stride
+@@ -4523,7 +4462,7 @@
    default:
        Check_Type(end,T_ARRAY);
        if(RARRAY_LEN(end) < ndims) {
@@ -2099,7 +2240,18 @@ index b3fdf77..6cc4de9 100644
        }
        for(i=0; i<ndims; i++){
  	  l_end=NUM2INT(RARRAY_PTR(end)[ndims-1-i]);
-@@ -4589,7 +4555,7 @@ Init_netcdfraw(void)
+@@ -4540,8 +4479,8 @@
+ 	  ptr = ALLOCA_N(double,c_count_all);
+ 	  for(i=0;i<c_count_all;i++){ptr[i]=scalar;}
+       } else if(len != c_count_all) {
+-	  rb_raise(rb_eNetcdfError, 
+-              "length of the array does not agree with that of the subset\n"); 
++	  rb_raise(rb_eNetcdfError,
++              "length of the array does not agree with that of the subset\n");
+       }
+   }
+ 
+@@ -4589,7 +4528,7 @@
    rb_eNetcdfEdge = rb_define_class("NetcdfEdge",rb_eNetcdfError);
    rb_eNetcdfStride = rb_define_class("NetcdfStride",rb_eNetcdfError);
    rb_eNetcdfBadname = rb_define_class("NetcdfBadname",rb_eNetcdfError);
@@ -2108,7 +2260,7 @@ index b3fdf77..6cc4de9 100644
    rb_eNetcdfRange = rb_define_class("NetcdfRange",rb_eNetcdfError);
    rb_eNetcdfNomem = rb_define_class("NetcdfNomem",rb_eNetcdfError);
    /* Global error status */
-@@ -4607,10 +4573,10 @@ Init_netcdfraw(void)
+@@ -4607,10 +4546,10 @@
    rb_define_const(cNetCDF, "NC_NOCLOBBER", INT2FIX(NC_NOCLOBBER));
  #if NCVER >= 400
    rb_define_const(cNetCDF, "NC_64BIT_OFFSET", INT2FIX(NC_64BIT_OFFSET));
@@ -2121,7 +2273,7 @@ index b3fdf77..6cc4de9 100644
          data model in NetCDF4 by disabling new features like groups */
    rb_define_const(cNetCDF, "NC_ENDIAN_NATIVE", INT2FIX(NC_ENDIAN_NATIVE));
    rb_define_const(cNetCDF, "NC_ENDIAN_LITTLE", INT2FIX(NC_ENDIAN_LITTLE));
-@@ -4621,7 +4587,7 @@ Init_netcdfraw(void)
+@@ -4621,7 +4560,7 @@
    rb_define_const(cNetCDF, "NC_FORMAT_NETCDF4", INT2FIX(NC_FORMAT_NETCDF4));
    rb_define_const(cNetCDF, "NC_FORMAT_NETCDF4_CLASSIC", INT2FIX(NC_FORMAT_NETCDF4_CLASSIC));
  #endif
@@ -2130,7 +2282,7 @@ index b3fdf77..6cc4de9 100644
  #ifdef NARRAY_BIGMEM
    rb_define_const(cNetCDF, "SUPPORT_BIGMEM", Qtrue);
  #else
-@@ -4658,7 +4624,7 @@ Init_netcdfraw(void)
+@@ -4658,7 +4597,7 @@
    rb_define_private_method(cNetCDF,"id2var",NetCDF_id2var,1);
    rb_define_private_method(cNetCDF,"id2dim",NetCDF_id2dim,1);
    rb_define_private_method(cNetCDF,"id2att",NetCDF_id2att,1);
@@ -2139,7 +2291,7 @@ index b3fdf77..6cc4de9 100644
    /* rb_define_method(cNetCDF,"eql?",NetCDF_eql,1); */
  
    /* The methods of the NetCDFDim class */
-@@ -4736,7 +4702,7 @@ Init_netcdfraw(void)
+@@ -4736,7 +4675,7 @@
    rb_define_method(cNetCDFVar,"get_var_int",NetCDF_get_var_int,0);
    rb_define_method(cNetCDFVar,"get_var_sfloat",NetCDF_get_var_float,0);
    rb_define_method(cNetCDFVar,"get_var_float",NetCDF_get_var_double,0);
@@ -2148,11 +2300,9 @@ index b3fdf77..6cc4de9 100644
    rb_define_method(cNetCDFVar,"get_vars_char",NetCDF_get_vars_char,3);
    rb_define_method(cNetCDFVar,"get_vars_byte",NetCDF_get_vars_byte,3);
    rb_define_method(cNetCDFVar,"get_vars_sint",NetCDF_get_vars_sint,3);
-diff --git a/lib/numru/netcdf.rb b/lib/numru/netcdf.rb
-index 4e68f01..45722f5 100644
 --- a/lib/numru/netcdf.rb
 +++ b/lib/numru/netcdf.rb
-@@ -36,7 +36,7 @@ module NumRu
+@@ -36,7 +36,7 @@
        raise("This method is available only for NetCDF >= 4") unless @@nc4
        case cmode
        when  0, nil, NC_CLASSIC_MODEL, /^CLASSIC$/i, NC_FORMAT_CLASSIC
@@ -2161,7 +2311,7 @@ index 4e68f01..45722f5 100644
          @@cr_format = 0
        when NC_64BIT_OFFSET, /^64BIT_OFFSET$/i, NC_FORMAT_64BIT
          @@cr_format = NC_64BIT_OFFSET
-@@ -65,229 +65,225 @@ module NumRu
+@@ -65,229 +65,225 @@
      end
  
      def NetCDF.open(filename,mode="r",share=false)
@@ -2196,8 +2346,6 @@ index 4e68f01..45722f5 100644
 -       else
 -	  nc_create(filename,omode)
 -       end
--    end
--    
 +      call_create=false   # false-> nc_open; true->nc_create
 +      case(mode)
 +      when "r","rb"                          # read only
@@ -2229,7 +2377,8 @@ index 4e68f01..45722f5 100644
 +      else
 +        nc_create(filename,omode)
 +      end
-+    end
+     end
+-    
 +
      class << NetCDF
        alias new open
@@ -2536,7 +2685,7 @@ index 4e68f01..45722f5 100644
      end
  
      alias :rank :ndims
-@@ -295,516 +291,516 @@ module NumRu
+@@ -295,516 +291,516 @@
      def each_att
        num_att=natts()
        for attnum in 0..num_att-1
@@ -3341,7 +3490,9 @@ index 4e68f01..45722f5 100644
        na.reshape!( *shape )
 -     na
 -   end
--
++      na
++    end
+ 
 -   def []=(*a)
 -     val = a.pop
 -     a = __rubber_expansion(a)
@@ -3420,9 +3571,6 @@ index 4e68f01..45722f5 100644
 - class NetCDFAtt
 -   
 -   def put(val,atttype=nil)
-+      na
-+    end
-+
 +    def []=(*a)
 +      val = a.pop
 +      a = __rubber_expansion(a)
@@ -3513,8 +3661,6 @@ index 4e68f01..45722f5 100644
 -   def inspect
 -     'NetCDFDim:'+name
 -   end
--
--   def length_ul0
 +    end
 +
 +    def inspect
@@ -3526,7 +3672,8 @@ index 4e68f01..45722f5 100644
 +    def inspect
 +      'NetCDFDim:'+name
 +    end
-+
+ 
+-   def length_ul0
 +    def length_ul0
        if unlimited?
 -	 0


=====================================
debian/ruby-test-files.yaml
=====================================
@@ -1,7 +1,7 @@
 ---
 - test/aref_aset.rb
 - test/char_var.rb
-- test/clone.rb
+# - test/clone.rb
 - test/create_tmp.rb
 - test/def_var_with_dim.rb
 - test/factor_offset.rb



View it on GitLab: https://salsa.debian.org/debian-gis-team/ruby-netcdf/-/compare/2619ef2becdb33d0c5c6561661a545d1459ca9e3...fde4bcd71b4934e955e86cf0b5b313809ec86891

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/ruby-netcdf/-/compare/2619ef2becdb33d0c5c6561661a545d1459ca9e3...fde4bcd71b4934e955e86cf0b5b313809ec86891
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grass-devel/attachments/20220219/5afea516/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list