[Git][debian-gis-team/ruby-hdfeos5][master] 5 commits: Refresh patches

Youhei SASAKI (@uwabami) gitlab at salsa.debian.org
Wed Oct 20 09:22:04 BST 2021



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


Commits:
453447b4 by Youhei SASAKI at 2021-10-20T13:32:05+09:00
Refresh patches

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

- - - - -
fe70827c by Youhei SASAKI at 2021-10-20T13:33:49+09:00
Add patch: drop deprecated API: rb_safe_level, rb_secure (Closes: #996291)

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

- - - - -
7c82f04f by Youhei SASAKI at 2021-10-20T13:33:58+09:00
Remove empty leading paragraph in Description.

Changes-By: lintian-brush

- - - - -
7fa49bbf by Youhei SASAKI at 2021-10-20T13:34:03+09:00
Bump debhelper from old 12 to 13.

Changes-By: lintian-brush
Fixes: lintian: package-uses-old-debhelper-compat-version
See-also: https://lintian.debian.org/tags/package-uses-old-debhelper-compat-version.html

- - - - -
2cbf13d8 by Youhei SASAKI at 2021-10-20T13:34:13+09:00
Fix field name cases in debian/control (Architecture => Architecture, Source => Source).

Changes-By: lintian-brush
Fixes: lintian: cute-field
See-also: https://lintian.debian.org/tags/cute-field.html

- - - - -


6 changed files:

- debian/changelog
- debian/control
- debian/patches/0005-length-typo.patch
- debian/patches/0006-hid_t.patch
- + debian/patches/0007-Drop-obsolete-rb_secure-rb_safe_level.patch
- debian/patches/series


Changes:

=====================================
debian/changelog
=====================================
@@ -1,10 +1,17 @@
 ruby-hdfeos5 (1.2-11) UNRELEASED; urgency=medium
 
+  [ Bas Couwenberg ]
   * Team upload.
   * Bump watch file version to 4.
   * Update lintian overrides.
   * Bump Standards-Version to 4.6.0, no changes.
 
+  [ Youhei SASAKI ]
+  * Remove empty leading paragraph in Description.
+  * Bump debhelper from old 12 to 13.
+  * Fix field name cases in debian/control (Architecture => Architecture, Source
+    => Source).
+
  -- Bas Couwenberg <sebastic at debian.org>  Fri, 06 Nov 2020 19:58:00 +0100
 
 ruby-hdfeos5 (1.2-10) unstable; urgency=medium


=====================================
debian/control
=====================================
@@ -1,9 +1,8 @@
-Source: ruby-hdfeos5
 Maintainer: Debian GIS Project <pkg-grass-devel at lists.alioth.debian.org>
 Uploaders: Youhei SASAKI <uwabami at gfd-dennou.org>
 Section: ruby
 Priority: optional
-Build-Depends: debhelper-compat (= 12),
+Build-Depends: debhelper-compat (= 13),
                gem2deb,
                libgctp-dev,
                libhdf5-dev,
@@ -15,12 +14,13 @@ Vcs-Browser: https://salsa.debian.org/debian-gis-team/ruby-hdfeos5
 Vcs-Git: https://salsa.debian.org/debian-gis-team/ruby-hdfeos5.git
 Homepage: https://www.gfd-dennou.org/arch/ruby/products/ruby-hdfeos5/
 XS-Ruby-Versions: all
+Source: ruby-hdfeos5
 
-Package: ruby-hdfeos5
 Architecture: any
 Depends: ruby | ruby-interpreter,
          ${shlibs:Depends},
          ${misc:Depends}
+Package: ruby-hdfeos5
 Description: Ruby interface to the HDF-EOS5 library
  HDF-EOS5 is a software library designed built on HDF5 to support EOS-specific
  data structures, namely Grid, Point, and Swath.


=====================================
debian/patches/0005-length-typo.patch
=====================================
@@ -1,9 +1,18 @@
-Description: Fix 'lengh' typo, replace with 'length'.
-Author: Bas Couwenberg <sebastic at debian.org>
+From: Bas Couwenberg <sebastic at debian.org>
+Date: Wed, 20 Oct 2021 13:09:41 +0900
+Subject: Fix 'lengh' typo, replace with 'length'.
 
+---
+ hdfeos5gd_wrap.c | 12 ++++++------
+ hdfeos5sw_wrap.c | 12 ++++++------
+ hdfeos5za_wrap.c | 12 ++++++------
+ 3 files changed, 18 insertions(+), 18 deletions(-)
+
+diff --git a/hdfeos5gd_wrap.c b/hdfeos5gd_wrap.c
+index 2ef221b..06c5b11 100644
 --- a/hdfeos5gd_wrap.c
 +++ b/hdfeos5gd_wrap.c
-@@ -2335,7 +2335,7 @@ hdfeos5_gdwritefield_char(VALUE mod, VAL
+@@ -2335,7 +2335,7 @@ hdfeos5_gdwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
      i_data = ALLOCA_N(unsigned char,c_edge_all);
      for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
        } else if(len != c_edge_all) {
@@ -12,7 +21,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
  
-@@ -2431,7 +2431,7 @@ hdfeos5_gdwritefield_short(VALUE mod, VA
+@@ -2431,7 +2431,7 @@ hdfeos5_gdwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
  	i_data = ALLOCA_N(short,c_edge_all);
  	for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
        } else if(len != c_edge_all) {
@@ -21,7 +30,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
  
-@@ -2527,7 +2527,7 @@ hdfeos5_gdwritefield_int(VALUE mod, VALU
+@@ -2527,7 +2527,7 @@ hdfeos5_gdwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
      i_data = ALLOCA_N(int,c_edge_all);
      for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
        } else if(len != c_edge_all) {
@@ -30,7 +39,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
  
-@@ -2623,7 +2623,7 @@ hdfeos5_gdwritefield_long(VALUE mod, VAL
+@@ -2623,7 +2623,7 @@ hdfeos5_gdwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
      i_data = ALLOCA_N(long,c_edge_all);
      for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
        } else if(len != c_edge_all) {
@@ -39,7 +48,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
  
-@@ -2719,7 +2719,7 @@ hdfeos5_gdwritefield_float(VALUE mod, VA
+@@ -2719,7 +2719,7 @@ hdfeos5_gdwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
      i_data = ALLOCA_N(float,c_edge_all);
      for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
        } else if(len != c_edge_all) {
@@ -48,7 +57,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
  
-@@ -2815,7 +2815,7 @@ hdfeos5_gdwritefield_double(VALUE mod, V
+@@ -2815,7 +2815,7 @@ hdfeos5_gdwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
      i_data = ALLOCA_N(double,c_edge_all);
      for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
        } else if(len != c_edge_all) {
@@ -57,9 +66,11 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
      status = HE5_GDwritefield(i_gridid, i_fldname, c_start, c_stride, c_edge, i_data);
+diff --git a/hdfeos5sw_wrap.c b/hdfeos5sw_wrap.c
+index 55473d6..caf04ac 100644
 --- a/hdfeos5sw_wrap.c
 +++ b/hdfeos5sw_wrap.c
-@@ -3004,7 +3004,7 @@ hdfeos5_swwritefield_char(VALUE mod, VAL
+@@ -3004,7 +3004,7 @@ hdfeos5_swwritefield_char(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
  	i_data = ALLOCA_N(unsigned char,(c_edge_all +1));
  	for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
        } else if(len != c_edge_all) {
@@ -68,7 +79,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
  
-@@ -3100,7 +3100,7 @@ hdfeos5_swwritefield_short(VALUE mod, VA
+@@ -3100,7 +3100,7 @@ hdfeos5_swwritefield_short(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
  	i_data = ALLOCA_N(short,c_edge_all);
  	for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
        } else if(len != c_edge_all) {
@@ -77,7 +88,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
  
-@@ -3196,7 +3196,7 @@ hdfeos5_swwritefield_int(VALUE mod, VALU
+@@ -3196,7 +3196,7 @@ hdfeos5_swwritefield_int(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALUE
  	i_data = ALLOCA_N(int,c_edge_all);
  	for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
        } else if(len != c_edge_all) {
@@ -86,7 +97,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
  
-@@ -3292,7 +3292,7 @@ hdfeos5_swwritefield_long(VALUE mod, VAL
+@@ -3292,7 +3292,7 @@ hdfeos5_swwritefield_long(VALUE mod, VALUE start, VALUE stride, VALUE edge, VALU
  	i_data = ALLOCA_N(long,c_edge_all);
  	for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
        } else if(len != c_edge_all) {
@@ -95,7 +106,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
  
-@@ -3388,7 +3388,7 @@ hdfeos5_swwritefield_float(VALUE mod, VA
+@@ -3388,7 +3388,7 @@ hdfeos5_swwritefield_float(VALUE mod, VALUE start, VALUE stride, VALUE edge, VAL
  	i_data = ALLOCA_N(float,c_edge_all);
  	for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
        } else if(len != c_edge_all) {
@@ -104,7 +115,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
  
-@@ -3484,7 +3484,7 @@ hdfeos5_swwritefield_double(VALUE mod, V
+@@ -3484,7 +3484,7 @@ hdfeos5_swwritefield_double(VALUE mod, VALUE start, VALUE stride, VALUE edge, VA
  	i_data = ALLOCA_N(double,c_edge_all);
  	for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
        } else if(len != c_edge_all) {
@@ -113,9 +124,11 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
  
+diff --git a/hdfeos5za_wrap.c b/hdfeos5za_wrap.c
+index f26a809..3e1d3af 100644
 --- a/hdfeos5za_wrap.c
 +++ b/hdfeos5za_wrap.c
-@@ -1894,7 +1894,7 @@ hdfeos5_zawrite_char(VALUE mod, VALUE st
+@@ -1894,7 +1894,7 @@ hdfeos5_zawrite_char(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE da
  	i_data = ALLOCA_N(unsigned char,c_count_all);
  	for(i=0;i<c_count_all;i++){i_data[i]=scalar;}
        } else if(len != c_count_all) {
@@ -124,7 +137,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
  
-@@ -1990,7 +1990,7 @@ hdfeos5_zawrite_short(VALUE mod, VALUE s
+@@ -1990,7 +1990,7 @@ hdfeos5_zawrite_short(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE d
  	i_data = ALLOCA_N(short,c_count_all);
  	for(i=0;i<c_count_all;i++){i_data[i]=scalar;}
        } else if(len != c_count_all) {
@@ -133,7 +146,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
  
-@@ -2086,7 +2086,7 @@ hdfeos5_zawrite_int(VALUE mod, VALUE sta
+@@ -2086,7 +2086,7 @@ hdfeos5_zawrite_int(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE dat
  	i_data = ALLOCA_N(int,c_count_all);
  	for(i=0;i<c_count_all;i++){i_data[i]=scalar;}
        } else if(len != c_count_all) {
@@ -142,7 +155,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
  
-@@ -2182,7 +2182,7 @@ hdfeos5_zawrite_long(VALUE mod, VALUE st
+@@ -2182,7 +2182,7 @@ hdfeos5_zawrite_long(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE da
  	i_data = ALLOCA_N(long,c_count_all);
  	for(i=0;i<c_count_all;i++){i_data[i]=scalar;}
        } else if(len != c_count_all) {
@@ -151,7 +164,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
  
-@@ -2278,7 +2278,7 @@ hdfeos5_zawrite_float(VALUE mod, VALUE s
+@@ -2278,7 +2278,7 @@ hdfeos5_zawrite_float(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE d
  	i_data = ALLOCA_N(float,c_count_all);
  	for(i=0;i<c_count_all;i++){i_data[i]=scalar;}
        } else if(len != c_count_all) {
@@ -160,7 +173,7 @@ Author: Bas Couwenberg <sebastic at debian.org>
        }
      }
  
-@@ -2374,7 +2374,7 @@ hdfeos5_zawrite_double(VALUE mod, VALUE
+@@ -2374,7 +2374,7 @@ hdfeos5_zawrite_double(VALUE mod, VALUE start, VALUE stride, VALUE count, VALUE
  	i_data = ALLOCA_N(double,c_count_all);
  	for(i=0;i<c_count_all;i++){i_data[i]=scalar;}
        } else if(len != c_count_all) {


=====================================
debian/patches/0006-hid_t.patch
=====================================
@@ -1,8 +1,32 @@
-DescriptioN: Add support for HDF5 1.10.
- hid_t type changed from 32-bit to a 64-bit value.
-Author: Gilles Filippini <pini at debian.org>
+From: Gilles Filippini <pini at debian.org>
+Date: Wed, 20 Oct 2021 13:09:41 +0900
+Subject: Add support for HDF5 1.10.
+
 Bug-Debian: https://bugs.debian.org/846353
 
+hid_t type changed from 32-bit to a 64-bit value.
+---
+ hdfeos5_chkdatatype.c |  2 +-
+ hdfeos5gd_wrap.c      | 10 +++++-----
+ hdfeos5sw_wrap.c      | 10 +++++-----
+ hdfeos5za_wrap.c      |  8 ++++----
+ 4 files changed, 15 insertions(+), 15 deletions(-)
+
+diff --git a/hdfeos5_chkdatatype.c b/hdfeos5_chkdatatype.c
+index e01a12b..f99b4ee 100644
+--- a/hdfeos5_chkdatatype.c
++++ b/hdfeos5_chkdatatype.c
+@@ -156,7 +156,7 @@ check_numbertype(char *numbertype)
+ 		  __FILE__,__LINE__);
+ }
+ 
+-int 
++hid_t 
+ change_numbertype(char *numbertype)
+ {
+   if(strcmp(numbertype,"byte")==0) return(H5T_NATIVE_CHAR);
+diff --git a/hdfeos5gd_wrap.c b/hdfeos5gd_wrap.c
+index 06c5b11..4098ef0 100644
 --- a/hdfeos5gd_wrap.c
 +++ b/hdfeos5gd_wrap.c
 @@ -20,7 +20,7 @@
@@ -14,7 +38,7 @@ Bug-Debian: https://bugs.debian.org/846353
  extern int   change_entrycode(char *);
  extern int   change_projcode(char *);
  extern int   change_compmethod(char *);
-@@ -1327,7 +1327,7 @@ hdfeos5_gdinqfields(VALUE mod, VALUE ent
+@@ -1327,7 +1327,7 @@ hdfeos5_gdinqfields(VALUE mod, VALUE entrycode)
   
      i_count = (int)o_nflds;
      rank = hdfeos5_cintary2obj(o_rank, i_count, 1, &i_count);
@@ -23,7 +47,7 @@ Bug-Debian: https://bugs.debian.org/846353
  
      return rb_ary_new3(4, nflds, fieldlist, rank, ntype);
  }
-@@ -1905,12 +1905,12 @@ hdfeos5_gdsetextdata(VALUE mod, VALUE fi
+@@ -1905,12 +1905,12 @@ hdfeos5_gdsetextdata(VALUE mod, VALUE filelist, VALUE offset, VALUE size)
        size = rb_Array(size);
      }
      i_filelist = RSTRING_PTR(filelist);
@@ -38,7 +62,7 @@ Bug-Debian: https://bugs.debian.org/846353
      hdfeos5_freecunsint64ary(i_size);
      return rtn_val;
  }
-@@ -1946,7 +1946,7 @@ hdfeos5_gdgetextdata(VALUE mod, VALUE fi
+@@ -1946,7 +1946,7 @@ hdfeos5_gdgetextdata(VALUE mod, VALUE fieldname)
      
      namelength = hdfeos5_cintary2obj((int*)o_namelength,o_nfiles,1,&o_nfiles);
      filelist = hdfeos5_ccharary2obj(o_filelist,o_nfiles,o_nfiles);
@@ -47,9 +71,11 @@ Bug-Debian: https://bugs.debian.org/846353
      size = hdfeos5_cunsint64ary2obj(o_size,o_nfiles,1,&o_nfiles);
  
      return rb_ary_new3(5,nfiles, namelength, filelist, offset, size);
+diff --git a/hdfeos5sw_wrap.c b/hdfeos5sw_wrap.c
+index caf04ac..46578f1 100644
 --- a/hdfeos5sw_wrap.c
 +++ b/hdfeos5sw_wrap.c
-@@ -1098,7 +1098,7 @@ hdfeos5_swinqdatafields(VALUE mod, VALUE
+@@ -1098,7 +1098,7 @@ hdfeos5_swinqdatafields(VALUE mod, VALUE entrycode)
   
      i_count = (int)o_nflds;
      rank = hdfeos5_cintary2obj(o_rank, i_count, 1, &i_count);
@@ -58,7 +84,7 @@ Bug-Debian: https://bugs.debian.org/846353
  
      return rb_ary_new3(4, nflds, fieldlist, rank, ntype);
  }
-@@ -1139,7 +1139,7 @@ hdfeos5_swinqgeofields(VALUE mod, VALUE
+@@ -1139,7 +1139,7 @@ hdfeos5_swinqgeofields(VALUE mod, VALUE entrycode)
  
      i_count = (int)o_nflds;
      rank = hdfeos5_cintary2obj(o_rank, i_count, 1, &i_count);
@@ -67,7 +93,7 @@ Bug-Debian: https://bugs.debian.org/846353
  
      return rb_ary_new3(4, nflds, fieldlist, rank, ntype);
  }
-@@ -2685,12 +2685,12 @@ hdfeos5_swsetextdata(VALUE mod, VALUE fi
+@@ -2685,12 +2685,12 @@ hdfeos5_swsetextdata(VALUE mod, VALUE filelist, VALUE offset, VALUE size)
        size = rb_Array(size);
      }
      i_filelist = RSTRING_PTR(filelist);
@@ -82,7 +108,7 @@ Bug-Debian: https://bugs.debian.org/846353
      hdfeos5_freecunsint64ary(i_size);
      return rtn_val;
  }
-@@ -2726,7 +2726,7 @@ hdfeos5_swgetextdata(VALUE mod, VALUE fi
+@@ -2726,7 +2726,7 @@ hdfeos5_swgetextdata(VALUE mod, VALUE fieldname)
      
      namelength = hdfeos5_cintary2obj((int*)o_namelength,o_rtn_val,1,&o_rtn_val);
      filelist = hdfeos5_ccharary2obj(o_filelist,o_rtn_val,o_rtn_val);
@@ -91,9 +117,11 @@ Bug-Debian: https://bugs.debian.org/846353
      size = hdfeos5_cunsint64ary2obj(o_size,o_rtn_val,1,&o_rtn_val);
  
      return rb_ary_new3(5,rtn_val, namelength, filelist, offset, size);
+diff --git a/hdfeos5za_wrap.c b/hdfeos5za_wrap.c
+index 3e1d3af..323e659 100644
 --- a/hdfeos5za_wrap.c
 +++ b/hdfeos5za_wrap.c
-@@ -785,7 +785,7 @@ hdfeos5_zainquire(VALUE mod, VALUE entry
+@@ -785,7 +785,7 @@ hdfeos5_zainquire(VALUE mod, VALUE entrycode)
   
      i_count = (int)o_nflds;
      rank = hdfeos5_cintary2obj(o_rank, i_count, 1, &i_count);
@@ -102,7 +130,7 @@ Bug-Debian: https://bugs.debian.org/846353
  
      return rb_ary_new3(4, nflds, fieldlist, rank, ntype);
  }
-@@ -1603,12 +1603,12 @@ hdfeos5_zasetextdata(VALUE mod, VALUE fi
+@@ -1603,12 +1603,12 @@ hdfeos5_zasetextdata(VALUE mod, VALUE filelist, VALUE offset, VALUE size)
        size = rb_Array(size);
      }
      i_filelist = RSTRING_PTR(filelist);
@@ -117,7 +145,7 @@ Bug-Debian: https://bugs.debian.org/846353
      hdfeos5_freecunsint64ary(i_size);
      return rtn_val;
  }
-@@ -1644,7 +1644,7 @@ hdfeos5_zagetextdata(VALUE mod, VALUE fi
+@@ -1644,7 +1644,7 @@ hdfeos5_zagetextdata(VALUE mod, VALUE fieldname)
      
      namelength = hdfeos5_cintary2obj((int*)o_namelength,o_rtn_val,1,&o_rtn_val);
      filelist = hdfeos5_ccharary2obj(o_filelist,o_rtn_val,o_rtn_val);
@@ -126,14 +154,3 @@ Bug-Debian: https://bugs.debian.org/846353
      size = hdfeos5_cunsint64ary2obj(o_size,o_rtn_val,1,&o_rtn_val);
  
      return rb_ary_new3(5,rtn_val, namelength, filelist, offset, size);
---- a/hdfeos5_chkdatatype.c
-+++ b/hdfeos5_chkdatatype.c
-@@ -156,7 +156,7 @@ check_numbertype(char *numbertype)
- 		  __FILE__,__LINE__);
- }
- 
--int 
-+hid_t 
- change_numbertype(char *numbertype)
- {
-   if(strcmp(numbertype,"byte")==0) return(H5T_NATIVE_CHAR);


=====================================
debian/patches/0007-Drop-obsolete-rb_secure-rb_safe_level.patch
=====================================
@@ -0,0 +1,3552 @@
+From: Youhei SASAKI <uwabami at gfd-dennou.org>
+Date: Wed, 20 Oct 2021 13:17:11 +0900
+Subject: Drop obsolete rb_secure, rb_safe_level
+
+Signed-off-by: Youhei SASAKI <uwabami at gfd-dennou.org>
+---
+ hdfeos5gd_wrap.c   | 163 +++++++++++++++------------------------------------
+ hdfeos5main_wrap.c |   3 +-
+ hdfeos5pt_wrap.c   | 152 ++++++++++++++++--------------------------------
+ hdfeos5sw_wrap.c   | 167 ++++++++++++-----------------------------------------
+ hdfeos5za_wrap.c   | 118 ++++++++++---------------------------
+ 5 files changed, 163 insertions(+), 440 deletions(-)
+
+--- a/hdfeos5gd_wrap.c
++++ b/hdfeos5gd_wrap.c
+@@ -326,7 +326,6 @@
+     char*  file;
+     VALUE Grid;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_fid=he5file->fid;
+     file=he5file->name;
+@@ -366,7 +365,6 @@
+     struct HE5Gd *he5grid;
+     VALUE Grid;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_fid=he5file->fid;
+     i_fname=he5file->name;
+@@ -393,7 +391,6 @@
+     VALUE rtn_val;
+     struct HE5Gd *he5grid;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+     Check_Type(dimname,T_STRING);
+@@ -418,7 +415,6 @@
+     VALUE rtn_val;
+     struct HE5Gd *he5grid;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+     Check_Type(projcode,T_STRING);
+@@ -448,7 +444,6 @@
+     VALUE rtn_val;
+     struct HE5Gd *he5grid;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+     Check_Type(code,T_STRING);
+@@ -480,7 +475,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -509,7 +503,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -542,7 +535,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -577,7 +569,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -599,7 +590,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -621,7 +611,6 @@
+     VALUE ndim;
+     struct HE5Gd *he5grid;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -650,12 +639,11 @@
+     VALUE lowrightpt;
+     struct HE5Gd *he5grid;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+-    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_DOUBLE, pt, &upleftpt,   &o_datbuf1); 
+-    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_DOUBLE, pt, &lowrightpt, &o_datbuf2); 
++    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_DOUBLE, pt, &upleftpt,   &o_datbuf1);
++    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_DOUBLE, pt, &lowrightpt, &o_datbuf2);
+     o_rtn_val = HE5_GDgridinfo(i_gridid, &o_xdimsize, &o_ydimsize, o_datbuf1, o_datbuf2);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     xdimsize = LONG2NUM(o_xdimsize);
+@@ -679,11 +667,10 @@
+     VALUE projparm;
+     struct HE5Gd *he5grid;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+-    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_FLOAT, maxcharsize, &projparm, &o_projparm); 
++    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_FLOAT, maxcharsize, &projparm, &o_projparm);
+     o_rtn_val = HE5_GDprojinfo(i_gridid, &o_projcode, &o_zonecode, &o_spherecode, o_projparm);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     change_projtype(o_projcode,str);
+@@ -703,7 +690,6 @@
+     VALUE origincode;
+     struct HE5Gd *he5grid;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -724,7 +710,6 @@
+     VALUE pixregcode;
+     struct HE5Gd *he5grid;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -750,14 +735,13 @@
+     VALUE compparm;
+     VALUE rtn_val;
+     struct HE5GdField *he5field;
+-                  
+ 
+-    rb_secure(4);
++
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fldname=he5field->name;
+     i_gridid=he5field->gdid;
+ 
+-    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_INT, ncomplevel, &compparm, &o_compparm); 
++    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_INT, ncomplevel, &compparm, &o_compparm);
+     o_rtn_val = HE5_GDcompinfo(i_gridid, i_fldname, &o_compcode, o_compparm);
+     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
+     change_comptype(o_compcode,str);
+@@ -783,7 +767,6 @@
+     VALUE dimlist;
+     struct HE5GdField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -814,7 +797,6 @@
+     VALUE tiledims;
+     struct HE5GdField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -843,7 +825,6 @@
+ 
+     struct HE5GdField *he5field;
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(file, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -882,7 +863,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fieldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -1015,7 +995,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1030,7 +1009,7 @@
+     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
+     i_count = hdfeos5_obj2cunsint64ary(count);
+ 
+-    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf); 
++    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
+     o_rtn_val = HE5_GDwriteattr(i_gridid, i_attrname, i_numbertype, i_count, i_datbuf);
+     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
+     hdfeos5_freecunsint64ary(i_count);
+@@ -1049,7 +1028,6 @@
+     herr_t o_rtn_val;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1059,7 +1037,7 @@
+ 
+     o_rtn_val = HE5_GDattrinfo(i_gridid, i_attrname, &o_ntype, &o_count);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+-    HE5Wrap_make_NArray1D_or_str(o_ntype, o_count, &result, &o_datbuf); 
++    HE5Wrap_make_NArray1D_or_str(o_ntype, o_count, &result, &o_datbuf);
+     o_rtn_val = HE5_GDreadattr(i_gridid, i_attrname, o_datbuf);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     return result;
+@@ -1077,7 +1055,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5 *he5file;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_filename=he5file->name;
+ 
+@@ -1105,7 +1082,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1143,7 +1119,6 @@
+     VALUE fillval;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1176,7 +1151,6 @@
+     VALUE size;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1212,7 +1186,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1242,7 +1215,6 @@
+     VALUE dims;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1251,7 +1223,7 @@
+ 
+     hs_dims = ALLOCA_N(unsigned long long,  i_count);
+     o_dimnames = ALLOCA_N(char,(i_strbufsize + 1));
+-    
++
+     o_ndims = HE5_GDinqdims(i_gridid, o_dimnames, hs_dims);
+     if(o_ndims < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     ndims = LONG2NUM(o_ndims);
+@@ -1273,7 +1245,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1306,7 +1277,6 @@
+     VALUE ntype;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1319,12 +1289,12 @@
+     o_nflds = HE5_GDinqfields(i_gridid, o_fieldlist, o_rank, NULL);
+     if (o_nflds < 0 ) return  Qfalse ;
+ 
+-    o_ntype = ALLOCA_N(hid_t, (o_nflds + 1)); 
++    o_ntype = ALLOCA_N(hid_t, (o_nflds + 1));
+     o_nflds = HE5_GDinqfields(i_gridid, o_fieldlist, o_rank, o_ntype);
+     if (o_nflds < 0 ) return  Qfalse ;
+     else              nflds = LONG2NUM(o_nflds);
+     fieldlist = rb_str_new(o_fieldlist,i_strbufsize);
+- 
++
+     i_count = (int)o_nflds;
+     rank = hdfeos5_cintary2obj(o_rank, i_count, 1, &i_count);
+     ntype = hdfeos5_cunsint64ary2obj(o_ntype, i_count, 1, &i_count);
+@@ -1340,7 +1310,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1372,7 +1341,6 @@
+     VALUE latitude;
+     struct HE5Gd *he5grid;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1410,8 +1378,8 @@
+     }
+     i_s = hdfeos5_obj2cfloatary(s);
+ 
+-    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_FLOAT, i_npnts, &longitude, &o_longitude); 
+-    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_FLOAT, i_npnts, &latitude, &o_latitude); 
++    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_FLOAT, i_npnts, &longitude, &o_longitude);
++    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_FLOAT, i_npnts, &latitude, &o_latitude);
+     o_rtn_val = HE5_GDrs2ll(i_projcode, (double*)i_projparm, i_xdimsize, i_ydimsize, (double*)i_upleft, (double*)i_lowright, i_npnts, (double*)i_r, (double*)i_s, o_longitude, o_latitude, i_pixcen, i_pixcnr);
+     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
+ 
+@@ -1435,7 +1403,6 @@
+     VALUE regionID;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1478,7 +1445,6 @@
+     VALUE lowrightpt;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fieldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -1486,8 +1452,8 @@
+     Check_Type(regionid,T_FIXNUM);
+     i_regionid = NUM2INT(regionid);
+ 
+-    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_INT, i_npt, &upleftpt, &o_upleftpt); 
+-    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_INT, i_npt, &lowrightpt, &o_lowrightpt); 
++    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_INT, i_npt, &upleftpt, &o_upleftpt);
++    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_INT, i_npt, &lowrightpt, &o_lowrightpt);
+     o_rtn_val = HE5_GDregioninfo(i_gridid, i_regionid, i_fieldname, &o_ntype, &o_rank, o_dims, &o_size, o_upleftpt, o_lowrightpt);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     change_chartype(o_ntype, str);
+@@ -1510,7 +1476,6 @@
+     VALUE buffer;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fieldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -1552,7 +1517,6 @@
+     hid_t o_rtn_val;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1584,7 +1548,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1618,7 +1581,6 @@
+     VALUE pixval;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1633,8 +1595,8 @@
+     }
+     i_latval = hdfeos5_obj2cfloatary(latval);
+ 
+-    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_LONG, i_nlonlat, &pixrow, &o_pixrow); 
+-    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_LONG, i_nlonlat, &pixval, &o_pixval); 
++    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_LONG, i_nlonlat, &pixrow, &o_pixrow);
++    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_LONG, i_nlonlat, &pixval, &o_pixval);
+     o_rtn_val = HE5_GDgetpixels(i_gridid, i_nlonlat, (double*)i_lonval, (double*)i_latval, o_pixrow, o_pixval);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",
+                    __FILE__,__LINE__);
+@@ -1657,7 +1619,6 @@
+     VALUE buffer;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fieldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -1692,7 +1653,6 @@
+     VALUE interpval;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fieldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -1708,7 +1668,7 @@
+     }
+     i_latval = (double*)hdfeos5_obj2cfloatary(latval);
+ 
+-    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_DOUBLE, i_nvalues, &interpval, &o_interpval); 
++    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_DOUBLE, i_nvalues, &interpval, &o_interpval);
+     o_rtn_val = HE5_GDinterpolate(i_gridid, i_nvalues, i_lonval, i_latval, i_fieldname, o_interpval);
+     hdfeos5_freecfloatary((float*)i_lonval);
+     hdfeos5_freecfloatary((float*)i_latval);
+@@ -1731,7 +1691,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fieldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -1747,7 +1706,7 @@
+     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
+     i_count = hdfeos5_obj2cunsint64ary(count);
+ 
+-    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf); 
++    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
+     o_rtn_val = HE5_GDwritelocattr(i_gridid, i_fieldname, i_attrname, i_numbertype, i_count, i_datbuf);
+     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
+     hdfeos5_freecunsint64ary(i_count);
+@@ -1767,7 +1726,6 @@
+     unsigned long long o_count;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fieldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -1775,7 +1733,7 @@
+     SafeStringValue(attrname);
+     i_attrname = RSTRING_PTR(attrname);
+ 
+-    o_rtn_val = HE5_GDlocattrinfo(i_gridid, i_fieldname, i_attrname, 
++    o_rtn_val = HE5_GDlocattrinfo(i_gridid, i_fieldname, i_attrname,
+                   &o_ntype, &o_count);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",
+                    __FILE__,__LINE__);
+@@ -1800,14 +1758,13 @@
+     VALUE strbufsize;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fieldname=he5field->name;
+     i_gridid=he5field->gdid;
+ 
+     o_nattr = HE5_GDinqlocattrs(i_gridid, i_fieldname, NULL, &o_strbufsize);
+     if(o_nattr < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+- 
++
+     o_attrnames = ALLOCA_N(char, (o_strbufsize + 1));
+     o_nattr = HE5_GDinqlocattrs(i_gridid, i_fieldname, o_attrnames, &o_strbufsize);
+     if(o_nattr < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+@@ -1830,7 +1787,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1846,7 +1802,7 @@
+     i_count = hdfeos5_obj2cunsint64ary(count);
+     i_datbuf = hdfeos5_obj2cfloatary(datbuf);
+ 
+-    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf); 
++    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
+     o_rtn_val = HE5_GDwritegrpattr(i_gridid, i_attrname, i_numbertype, i_count, i_datbuf);
+     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
+     hdfeos5_freecunsint64ary(i_count);
+@@ -1865,7 +1821,6 @@
+     herr_t o_rtn_val;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1892,7 +1847,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1932,7 +1886,6 @@
+     VALUE size;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1943,7 +1896,7 @@
+ 
+     o_nfiles = HE5_GDgetextdata(i_gridid, i_fieldname, o_namelength, o_filelist, o_offset, o_size);
+     nfiles = INT2NUM(o_nfiles);
+-    
++
+     namelength = hdfeos5_cintary2obj((int*)o_namelength,o_nfiles,1,&o_nfiles);
+     filelist = hdfeos5_ccharary2obj(o_filelist,o_nfiles,o_nfiles);
+     offset = hdfeos5_cunsint64ary2obj(o_offset,o_nfiles,1,&o_nfiles);
+@@ -1962,7 +1915,6 @@
+     VALUE aliaslist;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -1986,7 +1938,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -2017,7 +1968,6 @@
+     VALUE buffer;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -2051,7 +2001,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -2076,7 +2025,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Gd *he5grid;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+@@ -2099,7 +2047,6 @@
+     long o_rtn_val;
+ 
+     struct HE5 *he5file;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_filename=he5file->name;
+ 
+@@ -2118,7 +2065,6 @@
+     VALUE rstr;
+ 
+     struct HE5 *he5file;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_filename=he5file->name;
+ 
+@@ -2140,14 +2086,13 @@
+     struct HE5Gd *he5grid;
+     struct HE5GdField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Gd, he5grid);
+     i_gridid=he5grid->gdid;
+ 
+     Check_Type(fieldname,T_STRING);
+     SafeStringValue(fieldname);
+     i_fieldname = RSTRING_PTR(fieldname);
+-    
++
+     he5field = HE5GdField_init(i_fieldname, i_gridid, mod);
+     return(Data_Wrap_Struct(cHE5GdField, he5gdfield_mark_obj, HE5GdField_free, he5field));
+ }
+@@ -2158,14 +2103,13 @@
+     char *i_fieldname;
+     struct HE5GdField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fieldname=he5field->name;
+ 
+     return rb_str_new2(i_fieldname);
+ }
+ 
+-VALUE 
++VALUE
+ hdfeos5_grid_whether_in_define_mode(VALUE gd)
+ {
+     int fid;
+@@ -2174,7 +2118,7 @@
+     uintn access = 0;
+     int status;
+     struct HE5Gd *he5grid;
+-  
++
+     Data_Get_Struct(gd, struct HE5Gd, he5grid);
+     fid=he5grid->fid;
+ 
+@@ -2196,7 +2140,7 @@
+ {
+     char *i_name;
+     struct HE5Gd *he5grid;
+-  
++
+     Data_Get_Struct(gd, struct HE5Gd, he5grid);
+ 
+     i_name=he5grid->name;
+@@ -2208,7 +2152,7 @@
+ {
+     char *i_name;
+     struct HE5Gd *he5grid;
+-  
++
+     Data_Get_Struct(gd, struct HE5Gd, he5grid);
+ 
+     i_name=he5grid->name;
+@@ -2219,8 +2163,7 @@
+ hdfeos5_gd_file(VALUE gd)
+ {
+     struct HE5Gd *he5grid;
+-  
+-    rb_secure(4);
++
+     Data_Get_Struct(gd, struct HE5Gd, he5grid);
+     return(he5grid->file);
+ }
+@@ -2230,7 +2173,6 @@
+ {
+     struct HE5GdField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(field, struct HE5GdField, he5field);
+     return(he5field->grid);
+ }
+@@ -2241,7 +2183,6 @@
+     char *i_name;
+     struct HE5GdField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(field, struct HE5GdField, he5field);
+ 
+     i_name=he5field->name;
+@@ -2269,7 +2210,6 @@
+     unsigned char  scalar,*i_data;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -2282,7 +2222,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i]);
+       if(l_start < 0) {
+     l_start += hs_dims[i];
+       }
+@@ -2335,7 +2275,7 @@
+     i_data = ALLOCA_N(unsigned char,c_edge_all);
+     for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
+       } else if(len != c_edge_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -2365,7 +2305,6 @@
+     short scalar,*i_data;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -2378,7 +2317,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -2431,7 +2370,7 @@
+ 	i_data = ALLOCA_N(short,c_edge_all);
+ 	for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
+       } else if(len != c_edge_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -2461,7 +2400,6 @@
+     int scalar,*i_data;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -2474,7 +2412,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i]);
+       if(l_start < 0) {
+     l_start += hs_dims[i];
+       }
+@@ -2527,7 +2465,7 @@
+     i_data = ALLOCA_N(int,c_edge_all);
+     for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
+       } else if(len != c_edge_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -2557,7 +2495,6 @@
+     long scalar,*i_data;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -2623,7 +2560,7 @@
+     i_data = ALLOCA_N(long,c_edge_all);
+     for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
+       } else if(len != c_edge_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -2653,7 +2590,6 @@
+     float scalar,*i_data;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -2666,7 +2602,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i]);
+       if(l_start < 0) {
+     l_start += hs_dims[i];
+       }
+@@ -2719,7 +2655,7 @@
+     i_data = ALLOCA_N(float,c_edge_all);
+     for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
+       } else if(len != c_edge_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -2749,7 +2685,6 @@
+     double scalar,*i_data;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -2762,7 +2697,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i]);
+       if(l_start < 0) {
+     l_start += hs_dims[i];
+       }
+@@ -2815,7 +2750,7 @@
+     i_data = ALLOCA_N(double,c_edge_all);
+     for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
+       } else if(len != c_edge_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+     status = HE5_GDwritefield(i_gridid, i_fldname, c_start, c_stride, c_edge, i_data);
+@@ -2843,7 +2778,6 @@
+     VALUE NArray;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -2857,7 +2791,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+       if(l_start < 0) {
+     l_start += hs_dims[i];
+       }
+@@ -2957,7 +2891,6 @@
+     VALUE NArray;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -2971,7 +2904,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+       if(l_start < 0) {
+     l_start += hs_dims[i];
+       }
+@@ -3071,7 +3004,6 @@
+     VALUE NArray;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -3085,7 +3017,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+       if(l_start < 0) {
+     l_start += hs_dims[i];
+       }
+@@ -3185,7 +3117,6 @@
+     VALUE NArray;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -3199,7 +3130,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+       if(l_start < 0) {
+     l_start += hs_dims[i];
+       }
+@@ -3299,7 +3230,6 @@
+     VALUE NArray;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -3313,7 +3243,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+       if(l_start < 0) {
+     l_start += hs_dims[i];
+       }
+@@ -3413,7 +3343,6 @@
+     VALUE NArray;
+ 
+     struct HE5GdField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5GdField, he5field);
+     i_fldname=he5field->name;
+     i_gridid=he5field->gdid;
+@@ -3427,7 +3356,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+       if(l_start < 0) {
+     l_start += hs_dims[i];
+       }
+@@ -3597,7 +3526,7 @@
+     rb_define_method(cHE5GdField, "put_vars_float", hdfeos5_gdwritefield_float, 4);
+     rb_define_method(cHE5GdField, "put_vars_double", hdfeos5_gdwritefield_double, 4);
+     rb_define_method(cHE5GdField, "put_vars_short", hdfeos5_gdwritefield_short, 4);
+-    
++
+     rb_define_method(cHE5GdField, "get_vars_char", hdfeos5_gdreadfield_char, 3);
+     rb_define_method(cHE5GdField, "get_vars_int", hdfeos5_gdreadfield_int, 3);
+     rb_define_method(cHE5GdField, "get_vars_long", hdfeos5_gdreadfield_long, 3);
+--- a/hdfeos5main_wrap.c
++++ b/hdfeos5main_wrap.c
+@@ -99,7 +99,6 @@
+     char *i_name;
+     struct HE5 *he5file;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(file, struct HE5, he5file);
+     i_name=he5file->name;
+ 
+@@ -113,9 +112,6 @@
+     herr_t o_rtn_val;
+     struct HE5 *he5file;
+ 
+-    if (rb_safe_level() >= 4 && !OBJ_TAINTED(file)) {
+-      rb_raise(rb_eSecurityError, "Insecure: can't close [%s:%d]",__FILE__,__LINE__);
+-    }
+     Data_Get_Struct(file, struct HE5, he5file);
+     i_fid=he5file->fid;
+ 
+--- a/hdfeos5pt_wrap.c
++++ b/hdfeos5pt_wrap.c
+@@ -146,7 +146,7 @@
+     ptr = (int32_t *) NA_PTR(na,0); \
+     len = na->total; \
+     shape = na->shape; \
+-}                              
++}
+ #define Array_to_Clong_len_shape(obj, ptr, len, shape) \
+ { \
+     struct NARRAY *na; \
+@@ -168,7 +168,7 @@
+ static VALUE cHE5Pt;
+ static VALUE cHE5PtField;
+ 
+-struct HE5{                                         
++struct HE5{
+   hid_t fid;
+   char *name;
+   int closed;
+@@ -264,7 +264,7 @@
+     if(i_nlevels < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+ 
+     for(i=0;i<i_nlevels;i++) {
+-       status = HE5_PTlevelinfo(i_ptid, i, &dtsinfo); 
++       status = HE5_PTlevelinfo(i_ptid, i, &dtsinfo);
+        if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+        for(j=0;j<dtsinfo.nfields;j++) {
+           if(strcmp(i_fieldname,dtsinfo.fieldname[j])==0){
+@@ -292,7 +292,7 @@
+     if(i_nlevels < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+ 
+     for(i=0;i<i_nlevels;i++) {
+-       status = HE5_PTlevelinfo(i_ptid, i, &dtsinfo); 
++       status = HE5_PTlevelinfo(i_ptid, i, &dtsinfo);
+        if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+        for(j=0;j<dtsinfo.nfields;j++) {
+           if(strcmp(i_fieldname,dtsinfo.fieldname[j])==0){
+@@ -325,10 +325,10 @@
+     shape_child=HE5_PTnrecs(i_ptid, i_level+1);
+     o_data_child=ALLOCA_N(char,shape_child);
+ 
+-   // parent 
++   // parent
+     status = HE5_PTreadlevelF(i_ptid, i_level, o_linkfield, H5T_NATIVE_CHAR, o_data_parent);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+-   // child 
++   // child
+     status = HE5_PTreadlevelF(i_ptid, i_level+1, o_linkfield, H5T_NATIVE_CHAR, o_data_child);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+ 
+@@ -357,10 +357,10 @@
+     shape_child=HE5_PTnrecs(i_ptid, i_level+1);
+     o_data_child=ALLOCA_N(short,shape_child);
+ 
+-   // parent 
++   // parent
+     status = HE5_PTreadlevelF(i_ptid, i_level, o_linkfield, H5T_NATIVE_SHORT, o_data_parent);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+-   // child 
++   // child
+     status = HE5_PTreadlevelF(i_ptid, i_level+1, o_linkfield, H5T_NATIVE_SHORT, o_data_child);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+ 
+@@ -389,10 +389,10 @@
+     shape_child=HE5_PTnrecs(i_ptid, i_level+1);
+     o_data_child=ALLOCA_N(int,shape_child);
+ 
+-   // parent 
++   // parent
+     status = HE5_PTreadlevelF(i_ptid, i_level, o_linkfield, HE5T_NATIVE_INT, o_data_parent);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+-   // child 
++   // child
+     status = HE5_PTreadlevelF(i_ptid, i_level+1, o_linkfield, HE5T_NATIVE_INT, o_data_child);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+ 
+@@ -421,10 +421,10 @@
+     shape_child=HE5_PTnrecs(i_ptid, i_level+1);
+     o_data_child=ALLOCA_N(long,shape_child);
+ 
+-   // parent 
++   // parent
+     status = HE5_PTreadlevelF(i_ptid, i_level, o_linkfield, H5T_NATIVE_LONG, o_data_parent);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+-   // child 
++   // child
+     status = HE5_PTreadlevelF(i_ptid, i_level+1, o_linkfield, H5T_NATIVE_LONG, o_data_child);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+ 
+@@ -453,10 +453,10 @@
+     shape_child=HE5_PTnrecs(i_ptid, i_level+1);
+     o_data_child=ALLOCA_N(float,shape_child);
+ 
+-   // parent 
++   // parent
+     status = HE5_PTreadlevelF(i_ptid, i_level, o_linkfield, H5T_NATIVE_FLOAT, o_data_parent);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+-   // child 
++   // child
+     status = HE5_PTreadlevelF(i_ptid, i_level+1, o_linkfield, H5T_NATIVE_FLOAT, o_data_child);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+ 
+@@ -485,10 +485,10 @@
+     shape_child=HE5_PTnrecs(i_ptid, i_level+1);
+     o_data_child=ALLOCA_N(double,shape_child);
+ 
+-   // parent 
++   // parent
+     status = HE5_PTreadlevelF(i_ptid, i_level, o_linkfield, H5T_NATIVE_DOUBLE, o_data_parent);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+-   // child 
++   // child
+     status = HE5_PTreadlevelF(i_ptid, i_level+1, o_linkfield, H5T_NATIVE_DOUBLE, o_data_child);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+ 
+@@ -539,7 +539,6 @@
+     char*  file;
+     VALUE Point;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_fid=he5file->fid;
+     file=he5file->name;
+@@ -565,7 +564,6 @@
+     struct HE5Pt *he5point;
+     VALUE Point;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_fid=he5file->fid;
+     i_fname=he5file->name;
+@@ -590,7 +588,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Pt *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Pt, he5point);
+     i_ptid=he5point->ptid;
+ 
+@@ -608,7 +605,6 @@
+     VALUE nrec;
+     struct HE5Pt *he5point;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Pt, he5point);
+     i_ptid=he5point->ptid;
+     Check_Type(level,T_FIXNUM);
+@@ -627,7 +623,6 @@
+     VALUE nlevels;
+     struct HE5Pt *he5point;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Pt, he5point);
+     i_ptid=he5point->ptid;
+ 
+@@ -653,7 +648,6 @@
+     VALUE nflds;
+     struct HE5Pt *he5point;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Pt, he5point);
+     i_ptid=he5point->ptid;
+ 
+@@ -699,7 +693,6 @@
+     VALUE levelname;
+     struct HE5Pt *he5point;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Pt, he5point);
+     i_ptid=he5point->ptid;
+ 
+@@ -741,7 +734,7 @@
+     char *i_fieldlist;
+     long *i_dimlist;
+     char *i_datatype;
+-    int *i_ntypelist; 
++    int *i_ntypelist;
+     char i_dtypecheck[HE5_HDFE_UTLBUFSIZE];
+     int *i_array;
+     int o_rtn_val;
+@@ -750,7 +743,6 @@
+     size_t slen[maxcharsize];
+     char   *pntr[maxcharsize];
+ 
+-    rb_secure(4);
+     struct HE5Pt *he5point;
+     Data_Get_Struct(file, struct HE5Pt, he5point);
+     i_ptid=he5point->ptid;
+@@ -804,7 +796,6 @@
+     herr_t o_rtn_val;
+     VALUE rtn_val;
+ 
+-    rb_secure(4);
+     struct HE5Pt *he5point;
+     Data_Get_Struct(file, struct HE5Pt, he5point);
+     i_ptid=he5point->ptid;
+@@ -888,7 +879,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Pt *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Pt, he5point);
+     i_ptid=he5point->ptid;
+ 
+@@ -903,7 +893,7 @@
+     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
+     i_count = hdfeos5_obj2cunsint64ary(count);
+ 
+-    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf); 
++    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
+     o_rtn_val = HE5_PTwriteattr(i_ptid, i_attrname, i_numbertype, i_count, i_datbuf);
+     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
+     hdfeos5_freecunsint64ary(i_count);
+@@ -922,7 +912,6 @@
+     herr_t o_rtn_val;
+ 
+     struct HE5Pt *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Pt, he5point);
+     i_ptid=he5point->ptid;
+ 
+@@ -932,7 +921,7 @@
+ 
+     o_rtn_val = HE5_PTattrinfo(i_ptid, i_attrname, &o_ntype, &o_count);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+-    HE5Wrap_make_NArray1D_or_str(o_ntype, o_count, &result, &o_datbuf); 
++    HE5Wrap_make_NArray1D_or_str(o_ntype, o_count, &result, &o_datbuf);
+     o_rtn_val = HE5_PTreadattr(i_ptid, i_attrname, o_datbuf);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     return result;
+@@ -961,18 +950,17 @@
+     VALUE fieldname;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+     i_ptid=he5point->ptid;
+-    
++
+     i_level=HE5_PTlevelindx(i_ptid, i_levelname);
+     if(i_level <0) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     i_nrecs=HE5_PTnrecs(i_ptid, i_level);
+     o_dims[0]=i_nrecs;
+ 
+-    o_rtn_val = HE5_PTlevelinfo(i_ptid, i_level, &dtsinfo); 
++    o_rtn_val = HE5_PTlevelinfo(i_ptid, i_level, &dtsinfo);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+ 
+     for(i=0;i<dtsinfo.nfields;i++) {
+@@ -1063,7 +1051,6 @@
+     VALUE size;
+ 
+     struct HE5Pt *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Pt, he5point);
+     i_ptid=he5point->ptid;
+ 
+@@ -1098,7 +1085,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5 *he5file;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_filename=he5file->name;
+ 
+@@ -1127,7 +1113,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Pt *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Pt, he5point);
+     i_ptid=he5point->ptid;
+ 
+@@ -1157,7 +1142,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Pt *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Pt, he5point);
+     i_ptid=he5point->ptid;
+ 
+@@ -1172,7 +1156,7 @@
+     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
+     i_count = hdfeos5_obj2cunsint64ary(count);
+ 
+-    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf); 
++    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
+     o_rtn_val = HE5_PTwritegrpattr(i_ptid, i_attrname, i_numbertype, i_count, i_datbuf);
+     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
+     hdfeos5_freecunsint64ary(i_count);
+@@ -1191,7 +1175,6 @@
+     herr_t o_rtn_val;
+ 
+     struct HE5Pt *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Pt, he5point);
+     i_ptid=he5point->ptid;
+ 
+@@ -1219,7 +1202,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Pt *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Pt, he5point);
+     i_ptid=he5point->ptid;
+ 
+@@ -1249,7 +1231,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_ptid=he5point->ptid;
+@@ -1265,7 +1246,7 @@
+     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
+     i_count = hdfeos5_obj2cunsint64ary(count);
+ 
+-    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf); 
++    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
+     o_rtn_val = HE5_PTwritelocattr(i_ptid, i_levelname, i_attrname, i_numbertype, i_count, i_datbuf);
+     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
+     hdfeos5_freecintary((int*)i_count);
+@@ -1285,7 +1266,6 @@
+     unsigned long long o_count;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_ptid=he5point->ptid;
+@@ -1293,7 +1273,7 @@
+     SafeStringValue(attrname);
+     i_attrname = RSTRING_PTR(attrname);
+ 
+-    o_rtn_val = HE5_PTlocattrinfo(i_ptid, i_levelname, i_attrname, 
++    o_rtn_val = HE5_PTlocattrinfo(i_ptid, i_levelname, i_attrname,
+ 				  &o_ntype, &o_count);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",
+ 				   __FILE__,__LINE__);
+@@ -1318,14 +1298,13 @@
+     VALUE strbufsize;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_ptid=he5point->ptid;
+ 
+     o_nattr = HE5_PTinqlocattrs(i_ptid, i_levelname, NULL, &o_strbufsize);
+     if(o_nattr == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]", __FILE__,__LINE__);
+- 
++
+     o_attrnames = ALLOCA_N(char, (o_strbufsize + 1)*sizeof(char));
+     o_nattr = HE5_PTinqlocattrs(i_ptid, i_levelname, o_attrnames, &o_strbufsize);
+     if(o_nattr == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]", __FILE__,__LINE__);
+@@ -1346,7 +1325,6 @@
+     struct HE5PtField *he5point;
+     VALUE linkfield;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_ptid=he5point->ptid;
+     i_levelname=he5point->levelname;
+@@ -1371,7 +1349,6 @@
+     struct HE5PtField *he5point;
+     VALUE linkfield;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_ptid=he5point->ptid;
+     i_levelname=he5point->levelname;
+@@ -1394,7 +1371,6 @@
+     VALUE levelnumber;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_ptid=he5point->ptid;
+@@ -1464,7 +1440,6 @@
+     long o_rtn_val;
+ 
+     struct HE5 *he5file;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_filename=he5file->name;
+ 
+@@ -1483,14 +1458,13 @@
+     VALUE rstr;
+ 
+     struct HE5 *he5file;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_filename=he5file->name;
+ 
+     o_rtn_val = HE5_PTinqpoint(i_filename, NULL, &o_strbufsize);
+     if( o_rtn_val <= 0) return Qfalse;
+     o_pointlist = ALLOCA_N(char, (o_strbufsize + 1));
+-    
++
+     o_rtn_val = HE5_PTinqpoint(i_filename, o_pointlist, &o_strbufsize);
+     if( o_rtn_val <= 0) return Qfalse;
+     rstr = rb_str_new(o_pointlist, o_strbufsize);
+@@ -1509,7 +1483,6 @@
+     struct HE5Pt *he5pt;
+     VALUE fieldlist;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Pt, he5pt);
+     i_ptid=he5pt->ptid;
+ 
+@@ -1540,7 +1513,6 @@
+     struct HE5Pt *he5pt;
+     struct HE5PtField *he5point;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Pt, he5pt);
+     i_ptid=he5pt->ptid;
+ 
+@@ -1554,7 +1526,7 @@
+ 
+     he5point = HE5PtField_init(i_fieldname, i_levelname, i_ptid, mod);
+     return(Data_Wrap_Struct(cHE5PtField, he5ptfield_mark_obj, HE5PtField_free, he5point));
+-}              
++}
+ 
+ VALUE
+ hdfeos5_ptsetfield_level(VALUE mod,VALUE fieldname,VALUE levelname)
+@@ -1565,7 +1537,6 @@
+     struct HE5Pt *he5pt;
+     struct HE5PtField *he5point;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Pt, he5pt);
+     i_ptid=he5pt->ptid;
+ 
+@@ -1584,14 +1555,13 @@
+     char *i_fieldname;
+     struct HE5PtField *he5point;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_fieldname=he5point->name;
+ 
+     return rb_str_new2(i_fieldname);
+ }
+ 
+-VALUE 
++VALUE
+ hdfeos5_pt_whether_in_define_mode(VALUE pt)
+ {
+     int fid;
+@@ -1622,7 +1592,7 @@
+ {
+     char *i_name;
+     struct HE5Pt *he5point;
+-  
++
+     Data_Get_Struct(pt, struct HE5Pt, he5point);
+ 
+     i_name=he5point->name;
+@@ -1634,7 +1604,7 @@
+ {
+     char *i_name;
+     struct HE5Pt *he5point;
+-  
++
+     Data_Get_Struct(pt, struct HE5Pt, he5point);
+ 
+     i_name=he5point->name;
+@@ -1645,8 +1615,7 @@
+ hdfeos5_pt_file(VALUE pt)
+ {
+     struct HE5Pt *he5point;
+-  
+-    rb_secure(4);
++
+     Data_Get_Struct(pt, struct HE5Pt, he5point);
+     return(he5point->file);
+ }
+@@ -1656,7 +1625,6 @@
+ {
+     struct HE5PtField *he5point;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(field, struct HE5PtField, he5point);
+     return(he5point->point);
+ }
+@@ -1667,7 +1635,6 @@
+     char *i_name;
+     struct HE5PtField *he5point;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(level, struct HE5PtField, he5point);
+ 
+     i_name=he5point->name;
+@@ -1690,7 +1657,6 @@
+     unsigned char *i_data;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_fieldname=he5point->name;
+     i_levelname=he5point->levelname;
+@@ -1725,7 +1691,6 @@
+     int *i_data;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -1760,7 +1725,6 @@
+     short *i_data;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -1795,7 +1759,6 @@
+     long *i_data;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -1830,7 +1793,6 @@
+     float *i_data;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -1865,7 +1827,6 @@
+     double *i_data;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -1907,7 +1868,6 @@
+     HE5_CmpDTSinfo    dtsinfo;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -1917,7 +1877,7 @@
+     i_nrecs=HE5_PTnrecs(i_ptid, i_level);
+     if(i_level <0) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+ 
+-    status = HE5_PTlevelinfo(i_ptid, i_level, &dtsinfo); 
++    status = HE5_PTlevelinfo(i_ptid, i_level, &dtsinfo);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     for(i=0;i<dtsinfo.nfields;i++) {
+        if(strcmp(i_fieldname,dtsinfo.fieldname[i])==0){
+@@ -1938,13 +1898,13 @@
+     status = HE5_PTfwdlinkinfo(i_ptid, i_level, o_linkfield);
+     if( status !=FAIL ) {
+ 
+-       // parent level field 
++       // parent level field
+        for(i=0;i<dtsinfo.nfields;i++) {
+           if(strcmp(o_linkfield,dtsinfo.fieldname[i])==0){
+              i_ntype=dtsinfo.numtype[i];
+           }
+        }
+-       // child level field 
++       // child level field
+        i_nrecs=HE5_PTnrecs(i_ptid, i_level+1);
+        for(i=0;i<i_rank;i++){
+          shape[i_rank-1-i]=i_nrecs;
+@@ -2016,7 +1976,6 @@
+     HE5_CmpDTSinfo    dtsinfo;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -2026,7 +1985,7 @@
+     i_nrecs=HE5_PTnrecs(i_ptid, i_level);
+     if(i_level <0) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+ 
+-    status = HE5_PTlevelinfo(i_ptid, i_level, &dtsinfo); 
++    status = HE5_PTlevelinfo(i_ptid, i_level, &dtsinfo);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     for(i=0;i<dtsinfo.nfields;i++) {
+        if(strcmp(i_fieldname,dtsinfo.fieldname[i])==0){
+@@ -2047,13 +2006,13 @@
+     status = HE5_PTfwdlinkinfo(i_ptid, i_level, o_linkfield);
+     if( status !=FAIL ) {
+ 
+-       // parent level field 
++       // parent level field
+        for(i=0;i<dtsinfo.nfields;i++) {
+           if(strcmp(o_linkfield,dtsinfo.fieldname[i])==0){
+              i_ntype=dtsinfo.numtype[i];
+           }
+        }
+-       // child level field 
++       // child level field
+        i_nrecs=HE5_PTnrecs(i_ptid, i_level+1);
+        for(i=0;i<i_rank;i++){
+          shape[i_rank-1-i]=i_nrecs;
+@@ -2125,7 +2084,6 @@
+     HE5_CmpDTSinfo    dtsinfo;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -2135,7 +2093,7 @@
+     i_nrecs=HE5_PTnrecs(i_ptid, i_level);
+     if(i_level <0) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+ 
+-    status = HE5_PTlevelinfo(i_ptid, i_level, &dtsinfo); 
++    status = HE5_PTlevelinfo(i_ptid, i_level, &dtsinfo);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     for(i=0;i<dtsinfo.nfields;i++) {
+        if(strcmp(i_fieldname,dtsinfo.fieldname[i])==0){
+@@ -2156,13 +2114,13 @@
+     status = HE5_PTfwdlinkinfo(i_ptid, i_level, o_linkfield);
+     if( status !=FAIL ) {
+ 
+-       // parent level field 
++       // parent level field
+        for(i=0;i<dtsinfo.nfields;i++) {
+           if(strcmp(o_linkfield,dtsinfo.fieldname[i])==0){
+              i_ntype=dtsinfo.numtype[i];
+           }
+        }
+-       // child level field 
++       // child level field
+        i_nrecs=HE5_PTnrecs(i_ptid, i_level+1);
+        for(i=0;i<i_rank;i++){
+          shape[i_rank-1-i]=i_nrecs;
+@@ -2234,7 +2192,6 @@
+     HE5_CmpDTSinfo    dtsinfo;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -2244,7 +2201,7 @@
+     i_nrecs=HE5_PTnrecs(i_ptid, i_level);
+     if(i_level <0) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+ 
+-    status = HE5_PTlevelinfo(i_ptid, i_level, &dtsinfo); 
++    status = HE5_PTlevelinfo(i_ptid, i_level, &dtsinfo);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     for(i=0;i<dtsinfo.nfields;i++) {
+        if(strcmp(i_fieldname,dtsinfo.fieldname[i])==0){
+@@ -2265,13 +2222,13 @@
+     status = HE5_PTfwdlinkinfo(i_ptid, i_level, o_linkfield);
+     if( status !=FAIL ) {
+ 
+-       // parent level field 
++       // parent level field
+        for(i=0;i<dtsinfo.nfields;i++) {
+           if(strcmp(o_linkfield,dtsinfo.fieldname[i])==0){
+              i_ntype=dtsinfo.numtype[i];
+           }
+        }
+-       // child level field 
++       // child level field
+        i_nrecs=HE5_PTnrecs(i_ptid, i_level+1);
+        for(i=0;i<i_rank;i++){
+          shape[i_rank-1-i]=i_nrecs;
+@@ -2343,7 +2300,6 @@
+     HE5_CmpDTSinfo    dtsinfo;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -2352,7 +2308,7 @@
+     i_level=HE5_PTlevelindx(i_ptid, i_levelname);
+     i_nrecs=HE5_PTnrecs(i_ptid, i_level);
+     if(i_level <0) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+-    status = HE5_PTlevelinfo(i_ptid, i_level, &dtsinfo); 
++    status = HE5_PTlevelinfo(i_ptid, i_level, &dtsinfo);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     for(i=0;i<dtsinfo.nfields;i++) {
+        if(strcmp(i_fieldname,dtsinfo.fieldname[i])==0){
+@@ -2374,13 +2330,13 @@
+     status = HE5_PTfwdlinkinfo(i_ptid, i_level, o_linkfield);
+     if( status !=FAIL ) {
+ 
+-       // parent level field 
++       // parent level field
+        for(i=0;i<dtsinfo.nfields;i++) {
+           if(strcmp(o_linkfield,dtsinfo.fieldname[i])==0){
+              i_ntype=dtsinfo.numtype[i];
+           }
+        }
+-       // child level field 
++       // child level field
+        i_nrecs=HE5_PTnrecs(i_ptid, i_level+1);
+        for(i=0;i<i_rank;i++){
+          shape[i_rank-1-i]=i_nrecs;
+@@ -2452,7 +2408,6 @@
+     HE5_CmpDTSinfo    dtsinfo;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -2462,7 +2417,7 @@
+     i_nrecs=HE5_PTnrecs(i_ptid, i_level);
+     if(i_level <0) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+ 
+-    status = HE5_PTlevelinfo(i_ptid, i_level, &dtsinfo); 
++    status = HE5_PTlevelinfo(i_ptid, i_level, &dtsinfo);
+     if(status == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     for(i=0;i<dtsinfo.nfields;i++) {
+        if(strcmp(i_fieldname,dtsinfo.fieldname[i])==0){
+@@ -2483,13 +2438,13 @@
+     status = HE5_PTfwdlinkinfo(i_ptid, i_level, o_linkfield);
+     if( status !=FAIL ) {
+ 
+-       // parent level field 
++       // parent level field
+        for(i=0;i<dtsinfo.nfields;i++) {
+           if(strcmp(o_linkfield,dtsinfo.fieldname[i])==0){
+              i_ntype=dtsinfo.numtype[i];
+           }
+        }
+-       // child level field 
++       // child level field
+        i_nrecs=HE5_PTnrecs(i_ptid, i_level+1);
+        for(i=0;i<i_rank;i++){
+          shape[i_rank-1-i]=i_nrecs;
+@@ -2556,7 +2511,6 @@
+     unsigned char *i_data;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -2594,7 +2548,6 @@
+     short *i_data;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -2632,7 +2585,6 @@
+     int *i_data;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -2670,7 +2622,6 @@
+     long *i_data;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -2708,7 +2659,6 @@
+     float *i_data;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -2746,7 +2696,6 @@
+     double *i_data;
+ 
+     struct HE5PtField *he5point;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5PtField, he5point);
+     i_levelname=he5point->levelname;
+     i_fieldname=he5point->name;
+@@ -2824,7 +2773,7 @@
+     rb_define_method(cHE5PtField, "put_vars_float", hdfeos5_ptwritelevel_float, 2);
+     rb_define_method(cHE5PtField, "put_vars_double", hdfeos5_ptwritelevel_double, 2);
+     rb_define_method(cHE5PtField, "put_vars_short", hdfeos5_ptwritelevel_short, 2);
+-    
++
+     rb_define_method(cHE5PtField, "get_vars_char", hdfeos5_ptreadlevel_char, 0);
+     rb_define_method(cHE5PtField, "get_vars_int", hdfeos5_ptreadlevel_int, 0);
+     rb_define_method(cHE5PtField, "get_vars_long", hdfeos5_ptreadlevel_long, 0);
+@@ -2839,4 +2788,3 @@
+     rb_define_method(cHE5PtField, "fwdlink", hdfeos5_ptfwdlinkinfo, 0);
+     rb_define_method(cHE5PtField, "bcklink", hdfeos5_ptbcklinkinfo, 0);
+ }
+-
+--- a/hdfeos5sw_wrap.c
++++ b/hdfeos5sw_wrap.c
+@@ -315,7 +315,6 @@
+     char*  file;
+     VALUE Swath;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_fid=he5file->fid;
+     file=he5file->name;
+@@ -341,7 +340,6 @@
+     struct HE5Sw *he5swath;
+     VALUE Swath;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_fid=he5file->fid;
+     i_fname=he5file->name;
+@@ -368,7 +366,6 @@
+     VALUE rtn_val;
+     struct HE5Sw *he5swath;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+     Check_Type(dimname,T_STRING);
+@@ -390,7 +387,6 @@
+     VALUE ndim;
+     struct HE5Sw *he5swath;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -416,7 +412,6 @@
+     VALUE increment;
+     struct HE5Sw *he5swath;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -451,7 +446,6 @@
+     VALUE dimsize;
+     struct HE5Sw *he5swath;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -488,12 +482,11 @@
+     VALUE compparm;
+     struct HE5SwField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fldname=he5field->name;
+     i_swathid=he5field->swid;
+ 
+-    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_INT, ncomplevel, &compparm, &o_compparm); 
++    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_INT, ncomplevel, &compparm, &o_compparm);
+     o_rtn_val = HE5_SWcompinfo(i_swathid, i_fldname, &o_compcode, o_compparm);
+     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
+     change_comptype(o_compcode,str);
+@@ -519,7 +512,6 @@
+     VALUE dimlist;
+     struct HE5SwField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -547,7 +539,6 @@
+     VALUE chunk_dims;
+     struct HE5Sw *he5swath;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+     Check_Type(fldname,T_STRING);
+@@ -578,7 +569,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -610,7 +600,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -642,7 +631,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -669,7 +657,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -699,7 +686,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -739,7 +725,6 @@
+ 
+     struct HE5SwField *he5field;
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(file, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -781,7 +766,6 @@
+ 
+     struct HE5SwField *he5field;
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(file, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -820,7 +804,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fieldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -849,7 +832,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fieldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -879,7 +861,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -894,7 +875,7 @@
+     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
+     i_count = hdfeos5_obj2cunsint64ary(count);
+ 
+-    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf); 
++    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
+     o_rtn_val = HE5_SWwriteattr(i_swathid, i_attrname, i_numbertype, i_count, i_datbuf);
+     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
+     hdfeos5_freecunsint64ary(i_count);
+@@ -913,7 +894,6 @@
+     herr_t o_rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -923,7 +903,7 @@
+ 
+     o_rtn_val = HE5_SWattrinfo(i_swathid, i_attrname, &o_ntype, &o_count);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+-    HE5Wrap_make_NArray1D_or_str(o_ntype, o_count, &result, &o_datbuf); 
++    HE5Wrap_make_NArray1D_or_str(o_ntype, o_count, &result, &o_datbuf);
+     o_rtn_val = HE5_SWreadattr(i_swathid, i_attrname, o_datbuf);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     return result;
+@@ -941,7 +921,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -972,7 +951,6 @@
+     VALUE dims;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -981,7 +959,7 @@
+ 
+     hs_dims = ALLOCA_N(unsigned long long,  i_count);
+     o_dimnames = ALLOCA_N(char, (i_strbufsize + 1));
+-    
++
+     o_ndims = HE5_SWinqdims(i_swathid, o_dimnames, hs_dims);
+     if(o_ndims < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     ndims = LONG2NUM(o_ndims);
+@@ -1007,7 +985,6 @@
+     VALUE increment;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1042,7 +1019,6 @@
+     VALUE idxsizes;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1077,7 +1053,6 @@
+     VALUE ntype;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1090,12 +1065,12 @@
+     o_nflds = HE5_SWinqdatafields(i_swathid, o_fieldlist, NULL, NULL);
+     if (o_nflds < 0 ) return  Qfalse ;
+ 
+-    o_ntype = ALLOCA_N(hid_t, (o_nflds + 1)); 
++    o_ntype = ALLOCA_N(hid_t, (o_nflds + 1));
+     o_nflds = HE5_SWinqdatafields(i_swathid, o_fieldlist, o_rank, o_ntype);
+     if (o_nflds < 0 ) return  Qfalse ;
+     else              nflds = LONG2NUM(o_nflds);
+     fieldlist = rb_str_new(o_fieldlist,i_strbufsize);
+- 
++
+     i_count = (int)o_nflds;
+     rank = hdfeos5_cintary2obj(o_rank, i_count, 1, &i_count);
+     ntype = hdfeos5_cunsint64ary2obj(o_ntype, i_count, 1, &i_count);
+@@ -1119,7 +1094,6 @@
+     VALUE ntype;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1161,7 +1135,6 @@
+     VALUE size;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1197,7 +1170,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1225,7 +1197,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5 *he5file;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_filename=he5file->name;
+ 
+@@ -1361,7 +1332,6 @@
+     VALUE type_id;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_swathid=he5field->swid;
+     i_fieldname=he5field->name;
+@@ -1389,7 +1359,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1409,7 +1378,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1447,7 +1415,6 @@
+     VALUE idxrange;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1486,7 +1453,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1520,7 +1486,6 @@
+     VALUE buffer;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fieldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -1553,7 +1518,6 @@
+     VALUE buffer;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fieldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -1597,7 +1561,6 @@
+     hid_t o_rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1629,7 +1592,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1667,7 +1629,6 @@
+     VALUE fillval;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1700,7 +1661,6 @@
+     VALUE size;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fieldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -1737,7 +1697,6 @@
+     VALUE size;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fieldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -1765,7 +1724,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1791,7 +1749,6 @@
+     VALUE indicies;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1821,7 +1778,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1848,7 +1804,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1863,7 +1818,7 @@
+     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
+     i_count = hdfeos5_obj2cunsint64ary(count);
+ 
+-    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf); 
++    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
+     o_rtn_val = HE5_SWwritegrpattr(i_swathid, i_attrname, i_numbertype, i_count, i_datbuf);
+     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
+     hdfeos5_freecunsint64ary(i_count);
+@@ -1882,7 +1837,6 @@
+     herr_t o_rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1910,7 +1864,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1938,7 +1891,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -1974,7 +1926,6 @@
+     herr_t o_rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2002,14 +1953,13 @@
+     VALUE strbufsize;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+     o_nattr = HE5_SWinqgeogrpattrs(i_swathid, NULL, &o_strbufsize);
+     if(o_nattr < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     o_attrnames = ALLOCA_N(char, (o_strbufsize + 1));
+-    
++
+     o_nattr = HE5_SWinqgeogrpattrs(i_swathid, o_attrnames, &o_strbufsize);
+     if(o_nattr < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     nattr = LONG2NUM(o_nattr);
+@@ -2032,7 +1982,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fieldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -2048,7 +1997,7 @@
+     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
+     i_count = hdfeos5_obj2cunsint64ary(count);
+ 
+-    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf); 
++    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
+     o_rtn_val = HE5_SWwritelocattr(i_swathid, i_fieldname, i_attrname, i_numbertype, i_count, i_datbuf);
+     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
+     hdfeos5_freecintary((int*)i_count);
+@@ -2068,7 +2017,6 @@
+     unsigned long long o_count;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fieldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -2076,7 +2024,7 @@
+     SafeStringValue(attrname);
+     i_attrname = RSTRING_PTR(attrname);
+ 
+-    o_rtn_val = HE5_SWlocattrinfo(i_swathid, i_fieldname, i_attrname, 
++    o_rtn_val = HE5_SWlocattrinfo(i_swathid, i_fieldname, i_attrname,
+ 				  &o_ntype, &o_count);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",
+ 				   __FILE__,__LINE__);
+@@ -2101,14 +2049,13 @@
+     VALUE strbufsize;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fieldname=he5field->name;
+     i_swathid=he5field->swid;
+ 
+     o_nattr = HE5_SWinqlocattrs(i_swathid, i_fieldname, NULL, &o_strbufsize);
+     if(o_nattr < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+- 
++
+     o_attrnames = ALLOCA_N(char, (o_strbufsize + 1));
+     o_nattr = HE5_SWinqlocattrs(i_swathid, i_fieldname, o_attrnames, &o_strbufsize);
+     if(o_nattr < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+@@ -2130,7 +2077,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2168,7 +2114,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2210,7 +2155,6 @@
+     VALUE buffer;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2245,7 +2189,6 @@
+     VALUE buffer;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2274,7 +2217,6 @@
+     VALUE classid;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2284,7 +2226,7 @@
+     profnames = rb_str_new2(o_profnames);
+     rank = INT2NUM(o_rank);
+     classid = (o_classid == FAIL) ? Qfalse : Qtrue;
+-   
++
+     return rb_ary_new3(4, rtn_val, profnames, rank, classid);
+ }
+ 
+@@ -2306,7 +2248,6 @@
+     VALUE dimlist;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2336,7 +2277,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2372,7 +2312,6 @@
+     herr_t o_rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2400,7 +2339,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2426,7 +2364,6 @@
+     VALUE aliaslist;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2450,7 +2387,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2479,7 +2415,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2504,7 +2439,6 @@
+     VALUE buffer;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2536,7 +2470,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2561,7 +2494,6 @@
+     herr_t o_rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2589,7 +2521,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2616,7 +2547,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2643,7 +2573,6 @@
+     VALUE buffer;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2672,7 +2601,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2712,7 +2640,6 @@
+     VALUE size;
+ 
+     struct HE5Sw *he5swath;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+@@ -2723,7 +2650,7 @@
+ 
+     o_rtn_val = HE5_SWgetextdata(i_swathid, i_fieldname, o_namelength, o_filelist, o_offset, o_size);
+     rtn_val = INT2NUM(o_rtn_val);
+-    
++
+     namelength = hdfeos5_cintary2obj((int*)o_namelength,o_rtn_val,1,&o_rtn_val);
+     filelist = hdfeos5_ccharary2obj(o_filelist,o_rtn_val,o_rtn_val);
+     offset = hdfeos5_cunsint64ary2obj(o_offset,o_rtn_val,1,&o_rtn_val);
+@@ -2768,7 +2695,6 @@
+     long o_rtn_val;
+ 
+     struct HE5 *he5file;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_filename=he5file->name;
+ 
+@@ -2787,14 +2713,13 @@
+     VALUE rstr;
+ 
+     struct HE5 *he5file;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_filename=he5file->name;
+ 
+     o_rtn_val = HE5_SWinqswath(i_filename, NULL, &o_strbufsize);
+     if( o_rtn_val <= 0) return Qfalse;
+     o_swathlist = ALLOCA_N(char, (o_strbufsize + 1));
+-    
++
+     o_rtn_val = HE5_SWinqswath(i_filename, o_swathlist, &o_strbufsize);
+     if( o_rtn_val <= 0) return Qfalse;
+     rstr = rb_str_new(o_swathlist, o_strbufsize);
+@@ -2809,14 +2734,13 @@
+     struct HE5Sw *he5swath;
+     struct HE5SwField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Sw, he5swath);
+     i_swathid=he5swath->swid;
+ 
+     Check_Type(fieldname,T_STRING);
+     SafeStringValue(fieldname);
+     i_fieldname = RSTRING_PTR(fieldname);
+-    
++
+     he5field = HE5SwField_init(i_fieldname, i_swathid, mod);
+     return(Data_Wrap_Struct(cHE5SwField, he5swfield_mark_obj, HE5SwField_free, he5field));
+ }
+@@ -2827,14 +2751,13 @@
+     char *i_fieldname;
+     struct HE5SwField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fieldname=he5field->name;
+ 
+     return rb_str_new2(i_fieldname);
+ }
+ 
+-VALUE 
++VALUE
+ hdfeos5_sw_whether_in_define_mode(VALUE sw)
+ {
+     int fid;
+@@ -2843,7 +2766,7 @@
+     uintn access = 0;
+     int status;
+     struct HE5Sw *he5swath;
+-  
++
+     Data_Get_Struct(sw, struct HE5Sw, he5swath);
+     fid=he5swath->fid;
+ 
+@@ -2877,7 +2800,7 @@
+ {
+     char *i_name;
+     struct HE5Sw *he5swath;
+-  
++
+     Data_Get_Struct(sw, struct HE5Sw, he5swath);
+ 
+     i_name=he5swath->name;
+@@ -2888,8 +2811,7 @@
+ hdfeos5_sw_file(VALUE sw)
+ {
+     struct HE5Sw *he5swath;
+-  
+-    rb_secure(4);
++
+     Data_Get_Struct(sw, struct HE5Sw, he5swath);
+     return(he5swath->file);
+ }
+@@ -2899,7 +2821,6 @@
+ {
+     struct HE5SwField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(field, struct HE5SwField, he5field);
+     return(he5field->swath);
+ }
+@@ -2910,7 +2831,6 @@
+     char *i_name;
+     struct HE5SwField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(field, struct HE5SwField, he5field);
+ 
+     i_name=he5field->name;
+@@ -2938,7 +2858,6 @@
+     unsigned char  scalar,*i_data;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -2951,7 +2870,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -3004,7 +2923,7 @@
+ 	i_data = ALLOCA_N(unsigned char,(c_edge_all +1));
+ 	for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
+       } else if(len != c_edge_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -3034,7 +2953,6 @@
+     short scalar,*i_data;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -3047,7 +2965,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -3100,7 +3018,7 @@
+ 	i_data = ALLOCA_N(short,c_edge_all);
+ 	for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
+       } else if(len != c_edge_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -3130,7 +3048,6 @@
+     int scalar,*i_data;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -3143,7 +3060,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -3196,7 +3113,7 @@
+ 	i_data = ALLOCA_N(int,c_edge_all);
+ 	for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
+       } else if(len != c_edge_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -3226,7 +3143,6 @@
+     long scalar,*i_data;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -3292,7 +3208,7 @@
+ 	i_data = ALLOCA_N(long,c_edge_all);
+ 	for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
+       } else if(len != c_edge_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -3322,7 +3238,6 @@
+     float scalar,*i_data;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -3335,7 +3250,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -3388,7 +3303,7 @@
+ 	i_data = ALLOCA_N(float,c_edge_all);
+ 	for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
+       } else if(len != c_edge_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -3418,7 +3333,6 @@
+     double scalar,*i_data;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -3431,7 +3345,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -3484,7 +3398,7 @@
+ 	i_data = ALLOCA_N(double,c_edge_all);
+ 	for(i=0;i<c_edge_all;i++){i_data[i]=scalar;}
+       } else if(len != c_edge_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -3513,7 +3427,6 @@
+     VALUE NArray;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -3527,7 +3440,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -3627,7 +3540,6 @@
+     VALUE NArray;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -3641,7 +3553,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -3741,7 +3653,6 @@
+     VALUE NArray;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -3755,7 +3666,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -3855,7 +3766,6 @@
+     VALUE NArray;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -3869,7 +3779,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -3969,7 +3879,6 @@
+     VALUE NArray;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -3983,7 +3892,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -4083,7 +3992,6 @@
+     VALUE NArray;
+ 
+     struct HE5SwField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5SwField, he5field);
+     i_fldname=he5field->name;
+     i_swathid=he5field->swid;
+@@ -4097,7 +4005,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i_rank-1-i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -4283,7 +4191,7 @@
+     rb_define_method(cHE5SwField, "put_vars_float", hdfeos5_swwritefield_float, 4);
+     rb_define_method(cHE5SwField, "put_vars_double", hdfeos5_swwritefield_double, 4);
+     rb_define_method(cHE5SwField, "put_vars_short", hdfeos5_swwritefield_short, 4);
+-    
++
+     rb_define_method(cHE5SwField, "get_vars_char", hdfeos5_swreadfield_char, 3);
+     rb_define_method(cHE5SwField, "get_vars_int", hdfeos5_swreadfield_int, 3);
+     rb_define_method(cHE5SwField, "get_vars_long", hdfeos5_swreadfield_long, 3);
+@@ -4297,4 +4205,3 @@
+     rb_define_method(cHE5SwField, "setfield", hdfeos5_swsetfield, 1);
+     rb_define_method(cHE5SwField, "getfield", hdfeos5_swgetfield, 0);
+ }
+-
+--- a/hdfeos5za_wrap.c
++++ b/hdfeos5za_wrap.c
+@@ -313,7 +313,6 @@
+     char*  file;
+     VALUE ZA;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_fid=he5file->fid;
+     file=he5file->name;
+@@ -339,7 +338,6 @@
+     struct HE5Za *he5za;
+     VALUE ZA;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_fid=he5file->fid;
+     i_fname=he5file->name;
+@@ -366,7 +364,6 @@
+     VALUE rtn_val;
+     struct HE5Za *he5za;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+     Check_Type(dimname,T_STRING);
+@@ -388,7 +385,6 @@
+     VALUE ndim;
+     struct HE5Za *he5za;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -416,12 +412,11 @@
+     VALUE rtn_val;
+     struct HE5ZaField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fldname=he5field->name;
+     i_zaid=he5field->zaid;
+ 
+-    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_INT, ncomplevel, &compparm, &o_compparm); 
++    HE5Wrap_make_NArray1D_or_str(HE5T_NATIVE_INT, ncomplevel, &compparm, &o_compparm);
+     o_rtn_val = HE5_ZAcompinfo(i_zaid, i_fldname, &o_compcode, o_compparm);
+     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
+     change_comptype(o_compcode,str);
+@@ -446,7 +441,6 @@
+     VALUE dimlist;
+     struct HE5ZaField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fldname=he5field->name;
+     i_zaid=he5field->zaid;
+@@ -472,7 +466,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -499,7 +492,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -529,7 +521,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -568,7 +559,6 @@
+ 
+     struct HE5ZaField *he5field;
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(file, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -605,7 +595,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fieldname=he5field->name;
+     i_zaid=he5field->zaid;
+@@ -636,7 +625,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -651,7 +639,7 @@
+     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
+     i_count = hdfeos5_obj2cunsint64ary(count);
+ 
+-    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf); 
++    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
+     o_rtn_val = HE5_ZAwriteattr(i_zaid, i_attrname, i_numbertype, i_count, i_datbuf);
+     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
+     hdfeos5_freecunsint64ary(i_count);
+@@ -670,7 +658,6 @@
+     herr_t o_rtn_val;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -680,7 +667,7 @@
+ 
+     o_rtn_val = HE5_ZAattrinfo(i_zaid, i_attrname, &o_ntype, &o_count);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+-    HE5Wrap_make_NArray1D_or_str(o_ntype, o_count, &result, &o_datbuf); 
++    HE5Wrap_make_NArray1D_or_str(o_ntype, o_count, &result, &o_datbuf);
+     o_rtn_val = HE5_ZAreadattr(i_zaid, i_attrname, o_datbuf);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     return result;
+@@ -698,7 +685,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -729,7 +715,6 @@
+     VALUE dims;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -738,7 +723,7 @@
+ 
+     hs_dims = ALLOCA_N(unsigned long long,  i_count);
+     o_dimnames = ALLOCA_N(char, (i_strbufsize + 1));
+-    
++
+     o_ndims = HE5_ZAinqdims(i_zaid, o_dimnames, hs_dims);
+     if(o_ndims < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+     ndims = LONG2NUM(o_ndims);
+@@ -764,7 +749,6 @@
+     VALUE ntype;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -777,12 +761,12 @@
+     o_nflds = HE5_ZAinquire(i_zaid, o_fieldlist, NULL, NULL);
+     if (o_nflds < 0 ) return  Qfalse ;
+ 
+-    o_ntype = ALLOCA_N(hid_t, (o_nflds + 1)); 
++    o_ntype = ALLOCA_N(hid_t, (o_nflds + 1));
+     o_nflds = HE5_ZAinquire(i_zaid, o_fieldlist, o_rank, o_ntype);
+     if (o_nflds < 0 ) return  Qfalse ;
+     else              nflds = LONG2NUM(o_nflds);
+     fieldlist = rb_str_new(o_fieldlist,i_strbufsize);
+- 
++
+     i_count = (int)o_nflds;
+     rank = hdfeos5_cintary2obj(o_rank, i_count, 1, &i_count);
+     ntype = hdfeos5_cunsint64ary2obj(o_ntype, i_count, 1, &i_count);
+@@ -807,7 +791,6 @@
+     VALUE size;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -844,7 +827,6 @@
+     VALUE chunk_dims;
+     struct HE5Za *he5za;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+     Check_Type(fldname,T_STRING);
+@@ -874,7 +856,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -902,7 +883,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5 *he5file;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_filename=he5file->name;
+ 
+@@ -1038,7 +1018,6 @@
+     VALUE type_id;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_zaid=he5field->zaid;
+     i_fieldname=he5field->name;
+@@ -1066,7 +1045,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1086,7 +1064,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1124,7 +1101,6 @@
+     VALUE fillval;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1153,7 +1129,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1168,7 +1143,7 @@
+     i_numbertypechk = check_numbertype(RSTRING_PTR(numbertype));
+     i_count = hdfeos5_obj2cunsint64ary(count);
+ 
+-    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf); 
++    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
+     o_rtn_val = HE5_ZAwritegrpattr(i_zaid, i_attrname, i_numbertype, i_count, i_datbuf);
+     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
+     hdfeos5_freecunsint64ary(i_count);
+@@ -1187,7 +1162,6 @@
+     herr_t o_rtn_val;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1215,7 +1189,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1245,7 +1218,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fieldname=he5field->name;
+     i_zaid=he5field->zaid;
+@@ -1262,7 +1234,7 @@
+     i_count = hdfeos5_obj2cunsint64ary(count);
+     i_datbuf = hdfeos5_obj2cfloatary(datbuf);
+ 
+-    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf); 
++    HE5Wrap_store_NArray1D_or_str(i_numbertypechk, datbuf, &i_datbuf);
+     o_rtn_val = HE5_ZAwritelocattr(i_zaid, i_fieldname, i_attrname, i_numbertype, i_count, i_datbuf);
+     rtn_val = (o_rtn_val == FAIL) ? Qfalse : Qtrue;
+     hdfeos5_freecintary((int*)i_count);
+@@ -1282,7 +1254,6 @@
+     unsigned long long o_count;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fieldname=he5field->name;
+     i_zaid=he5field->zaid;
+@@ -1290,7 +1261,7 @@
+     SafeStringValue(attrname);
+     i_attrname = RSTRING_PTR(attrname);
+ 
+-    o_rtn_val = HE5_ZAlocattrinfo(i_zaid, i_fieldname, i_attrname, 
++    o_rtn_val = HE5_ZAlocattrinfo(i_zaid, i_fieldname, i_attrname,
+ 				  &o_ntype, &o_count);
+     if(o_rtn_val == FAIL) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",
+ 				   __FILE__,__LINE__);
+@@ -1315,14 +1286,13 @@
+     VALUE strbufsize;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fieldname=he5field->name;
+     i_zaid=he5field->zaid;
+ 
+     o_nattr = HE5_ZAinqlocattrs(i_zaid, i_fieldname, NULL, &o_strbufsize);
+     if(o_nattr < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+- 
++
+     o_attrnames = ALLOCA_N(char, (o_strbufsize + 1));
+     o_nattr = HE5_ZAinqlocattrs(i_zaid, i_fieldname, o_attrnames, &o_strbufsize);
+     if(o_nattr < 0 ) rb_raise(rb_eHE5Error, "ERROR [%s:%d]",__FILE__,__LINE__);
+@@ -1342,7 +1312,6 @@
+     VALUE aliaslist;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1366,7 +1335,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1395,7 +1363,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1421,7 +1388,6 @@
+     VALUE buffer;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1454,7 +1420,6 @@
+     VALUE strbufsize;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1479,7 +1444,6 @@
+     herr_t o_rtn_val;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1507,7 +1471,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1534,7 +1497,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1561,7 +1523,6 @@
+     VALUE buffer;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1590,7 +1551,6 @@
+     VALUE rtn_val;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1630,7 +1590,6 @@
+     VALUE size;
+ 
+     struct HE5Za *he5za;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+@@ -1641,7 +1600,7 @@
+ 
+     o_rtn_val = HE5_ZAgetextdata(i_zaid, i_fieldname, o_namelength, o_filelist, o_offset, o_size);
+     rtn_val = INT2NUM(o_rtn_val);
+-    
++
+     namelength = hdfeos5_cintary2obj((int*)o_namelength,o_rtn_val,1,&o_rtn_val);
+     filelist = hdfeos5_ccharary2obj(o_filelist,o_rtn_val,o_rtn_val);
+     offset = hdfeos5_cunsint64ary2obj(o_offset,o_rtn_val,1,&o_rtn_val);
+@@ -1658,7 +1617,6 @@
+     long o_rtn_val;
+ 
+     struct HE5 *he5file;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_filename=he5file->name;
+ 
+@@ -1677,7 +1635,6 @@
+     VALUE rstr;
+ 
+     struct HE5 *he5file;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5, he5file);
+     i_filename=he5file->name;
+ 
+@@ -1699,14 +1656,13 @@
+     struct HE5Za *he5za;
+     struct HE5ZaField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5Za, he5za);
+     i_zaid=he5za->zaid;
+ 
+     Check_Type(fieldname,T_STRING);
+     SafeStringValue(fieldname);
+     i_fieldname = RSTRING_PTR(fieldname);
+-    
++
+     he5field = HE5ZaField_init(i_fieldname, i_zaid, mod);
+     return(Data_Wrap_Struct(cHE5ZaField, he5zafield_mark_obj, HE5ZaField_free, he5field));
+ }
+@@ -1717,14 +1673,13 @@
+     char *i_fieldname;
+     struct HE5ZaField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fieldname=he5field->name;
+ 
+     return rb_str_new2(i_fieldname);
+ }
+ 
+-VALUE 
++VALUE
+ hdfeos5_za_whether_in_define_mode(VALUE za)
+ {
+     int fid;
+@@ -1733,7 +1688,7 @@
+     uintn access = 0;
+     int status;
+     struct HE5Za *he5za;
+-  
++
+     Data_Get_Struct(za, struct HE5Za, he5za);
+     fid=he5za->fid;
+ 
+@@ -1755,7 +1710,7 @@
+ {
+     char *i_name;
+     struct HE5Za *he5za;
+-  
++
+     Data_Get_Struct(za, struct HE5Za, he5za);
+ 
+     i_name=he5za->name;
+@@ -1767,7 +1722,7 @@
+ {
+     char *i_name;
+     struct HE5Za *he5za;
+-  
++
+     Data_Get_Struct(za, struct HE5Za, he5za);
+ 
+     i_name=he5za->name;
+@@ -1778,8 +1733,7 @@
+ hdfeos5_za_file(VALUE za)
+ {
+     struct HE5Za *he5za;
+-  
+-    rb_secure(4);
++
+     Data_Get_Struct(za, struct HE5Za, he5za);
+     return(he5za->file);
+ }
+@@ -1789,7 +1743,6 @@
+ {
+     struct HE5ZaField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(field, struct HE5ZaField, he5field);
+     return(he5field->za);
+ }
+@@ -1800,7 +1753,6 @@
+     char *i_name;
+     struct HE5ZaField *he5field;
+ 
+-    rb_secure(4);
+     Data_Get_Struct(field, struct HE5ZaField, he5field);
+ 
+     i_name=he5field->name;
+@@ -1828,7 +1780,6 @@
+     unsigned char  scalar,*i_data;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fldname=he5field->name;
+     i_zaid=he5field->zaid;
+@@ -1841,7 +1792,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -1894,7 +1845,7 @@
+ 	i_data = ALLOCA_N(unsigned char,c_count_all);
+ 	for(i=0;i<c_count_all;i++){i_data[i]=scalar;}
+       } else if(len != c_count_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -1924,7 +1875,6 @@
+     short scalar,*i_data;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fldname=he5field->name;
+     i_zaid=he5field->zaid;
+@@ -1937,7 +1887,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -1990,7 +1940,7 @@
+ 	i_data = ALLOCA_N(short,c_count_all);
+ 	for(i=0;i<c_count_all;i++){i_data[i]=scalar;}
+       } else if(len != c_count_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -2020,7 +1970,6 @@
+     int scalar,*i_data;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fldname=he5field->name;
+     i_zaid=he5field->zaid;
+@@ -2033,7 +1982,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -2086,7 +2035,7 @@
+ 	i_data = ALLOCA_N(int,c_count_all);
+ 	for(i=0;i<c_count_all;i++){i_data[i]=scalar;}
+       } else if(len != c_count_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -2116,7 +2065,6 @@
+     long scalar,*i_data;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fldname=he5field->name;
+     i_zaid=he5field->zaid;
+@@ -2182,7 +2130,7 @@
+ 	i_data = ALLOCA_N(long,c_count_all);
+ 	for(i=0;i<c_count_all;i++){i_data[i]=scalar;}
+       } else if(len != c_count_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -2212,7 +2160,6 @@
+     float scalar,*i_data;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fldname=he5field->name;
+     i_zaid=he5field->zaid;
+@@ -2225,7 +2172,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -2278,7 +2225,7 @@
+ 	i_data = ALLOCA_N(float,c_count_all);
+ 	for(i=0;i<c_count_all;i++){i_data[i]=scalar;}
+       } else if(len != c_count_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -2308,7 +2255,6 @@
+     double scalar,*i_data;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fldname=he5field->name;
+     i_zaid=he5field->zaid;
+@@ -2321,7 +2267,7 @@
+     }
+     c_start=ALLOCA_N(signed long long,i_rank);
+     for(i=0; i<i_rank; i++){
+-      l_start=NUM2INT(RARRAY_PTR(start)[i]);    
++      l_start=NUM2INT(RARRAY_PTR(start)[i]);
+       if(l_start < 0) {
+ 	l_start += hs_dims[i];
+       }
+@@ -2374,7 +2320,7 @@
+ 	i_data = ALLOCA_N(double,c_count_all);
+ 	for(i=0;i<c_count_all;i++){i_data[i]=scalar;}
+       } else if(len != c_count_all) {
+-          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__); 
++          rb_raise(rb_eHE5Error, "length of the array does not agree with that of the subset [%s:%d]",__FILE__,__LINE__);
+       }
+     }
+ 
+@@ -2403,7 +2349,6 @@
+     VALUE NArray;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fldname=he5field->name;
+     i_zaid=he5field->zaid;
+@@ -2517,7 +2462,6 @@
+     VALUE NArray;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fldname=he5field->name;
+     i_zaid=he5field->zaid;
+@@ -2631,7 +2575,6 @@
+     VALUE NArray;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fldname=he5field->name;
+     i_zaid=he5field->zaid;
+@@ -2745,7 +2688,6 @@
+     VALUE NArray;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fldname=he5field->name;
+     i_zaid=he5field->zaid;
+@@ -2859,7 +2801,6 @@
+     VALUE NArray;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fldname=he5field->name;
+     i_zaid=he5field->zaid;
+@@ -2973,7 +2914,6 @@
+     VALUE NArray;
+ 
+     struct HE5ZaField *he5field;
+-    rb_secure(4);
+     Data_Get_Struct(mod, struct HE5ZaField, he5field);
+     i_fldname=he5field->name;
+     i_zaid=he5field->zaid;
+@@ -3143,7 +3083,7 @@
+     rb_define_method(cHE5ZaField, "put_vars_float", hdfeos5_zawrite_float, 4);
+     rb_define_method(cHE5ZaField, "put_vars_double", hdfeos5_zawrite_double, 4);
+     rb_define_method(cHE5ZaField, "put_vars_short", hdfeos5_zawrite_short, 4);
+-    
++
+     rb_define_method(cHE5ZaField, "get_vars_char", hdfeos5_zaread_char, 3);
+     rb_define_method(cHE5ZaField, "get_vars_int", hdfeos5_zaread_int, 3);
+     rb_define_method(cHE5ZaField, "get_vars_long", hdfeos5_zaread_long, 3);


=====================================
debian/patches/series
=====================================
@@ -4,3 +4,4 @@
 0004-hdf5-dir.patch
 0005-length-typo.patch
 0006-hid_t.patch
+0007-Drop-obsolete-rb_secure-rb_safe_level.patch



View it on GitLab: https://salsa.debian.org/debian-gis-team/ruby-hdfeos5/-/compare/73219e08a033bc637efac74861502a6ca45b073b...2cbf13d84396d6470ebff5f08ab442beecfd384e

-- 
View it on GitLab: https://salsa.debian.org/debian-gis-team/ruby-hdfeos5/-/compare/73219e08a033bc637efac74861502a6ca45b073b...2cbf13d84396d6470ebff5f08ab442beecfd384e
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/20211020/7db7f0ef/attachment-0001.htm>


More information about the Pkg-grass-devel mailing list