ruby-oci8 2.1.4 → 2.1.5

This diff has not been reviewed by any users.
Sign up to get free protection for your applications and to get access to all the features.
data/.yardopts CHANGED
@@ -5,6 +5,7 @@
5
5
  --exclude lib/oci8/compat.rb
6
6
  --exclude lib/dbd
7
7
  --hide-void-return
8
+ --charset UTF-8
8
9
  -
9
10
  NEWS
10
11
  COPYING
data/ChangeLog CHANGED
@@ -1,3 +1,70 @@
1
+ 2013-03-09 KUBO Takehiro <kubo@jiubao.org>
2
+ * ruby-oci8.gemspec: revert the previous commit because old
3
+ rubygems doesn't support:
4
+ required_ruby_version = ['>= 1.8.0', '<= 2.0.0']
5
+
6
+ 2013-03-09 KUBO Takehiro <kubo@jiubao.org>
7
+ * NEWS: add changes between 2.1.5 and 2.1.4
8
+ * VERSION: change the version to 2.1.5.
9
+ * docs/platform-specific-issues.md: remove obsolete description.
10
+ * ext/oci8/extconf.rb, ext/oci8/oraconf.rb: fix to compile for
11
+ Windows x64 client.
12
+ * ruby-oci8.gemspec: change required_ruby_version range
13
+ when a binary gem includes more than one compiled object.
14
+ * test/test_connection_pool.rb: fix to pass tests on slow
15
+ machines.
16
+
17
+ 2013-03-05 KUBO Takehiro <kubo@jiubao.org>
18
+ * ext/oci8/oci8.c, lib/oci8/oci8.rb, lib/oci8/oracle_version.rb:
19
+ refactoring.
20
+
21
+ 2013-03-03 KUBO Takehiro <kubo@jiubao.org>
22
+ * lib/oci8/oci8.rb, test/test_oci8.rb: set 'rubyoci8' as
23
+ the driver name, which is displayed in
24
+ V$SESSION_CONNECT_INFO.CLIENT_DRIVER.
25
+ (require Oracle 11g or upper)
26
+
27
+ 2013-03-03 KUBO Takehiro <kubo@jiubao.org>
28
+ * lib/oci8.rb.in: use RbConfig::CONFIG instead of obsolete
29
+ constant Config::CONFIG.
30
+ * lib/oci8/object.rb, test/test_bind_time.rb, test/test_metadata.rb
31
+ test/test_object.rb, test/test_oci8.rb:
32
+ suppress warning: assigned but unused variable
33
+
34
+ 2013-03-03 KUBO Takehiro <kubo@jiubao.org>
35
+ * ext/oci8/lob.c, ext/oci8/oci8.c, ext/oci8/oci8.h:
36
+ refactor oci8_lob_t.
37
+
38
+ 2013-03-03 KUBO Takehiro <kubo@jiubao.org>
39
+ * ext/oci8/oci8.c: fix segmentation fault when the process
40
+ exits on rubinius.
41
+
42
+ 2013-03-02 KUBO Takehiro <kubo@jiubao.org>
43
+ * .yardopts, ext/oci8/object.c, lib/oci8/metadata.rb,
44
+ lib/oci8/oracle_version.rb: update comments for rdoc/yard.
45
+
46
+ 2013-03-02 KUBO Takehiro <kubo@jiubao.org>
47
+ * ext/oci8/ocihandle.c: change arguments of internal methods
48
+ OCIHandle#attr_get_*() to ignore "ORA-24328: illegal
49
+ attribute value".
50
+ * lib/oci8/metadata.rb: change OCI8::Metadata::Base#obj_id,
51
+ #obj_name and #obj_schema not to raise "ORA-24328:
52
+ illegal attribute value".
53
+
54
+ 2013-03-02 KUBO Takehiro <kubo@jiubao.org>
55
+ * ruby-oci8.gemspec: fix for ruby 2.0.0 to make binary gems.
56
+
57
+ 2013-03-02 KUBO Takehiro <kubo@jiubao.org>
58
+ * ext/oci8/oraconf.rb: fix for compilation on Windows x64 by mingw64.
59
+
60
+ 2013-01-12 KUBO Takehiro <kubo@jiubao.org>
61
+ * ext/oci8/oci8lib.c: export a main function for Solaris x86 (32-bit).
62
+ When a main function is invisible from Oracle instant client
63
+ 11.2.0.3 for Solaris x86 (32-bit), OCIEnvCreate() fails by
64
+ unknown reasons.
65
+ * docs/platform-specific-issues.md: change the workaround for
66
+ Solaris x86 (32-bit) instant client.
67
+
1
68
  2013-01-06 KUBO Takehiro <kubo@jiubao.org>
2
69
  * NEWS: add changes between 2.1.4 and 2.1.3
3
70
  * VERSION: change the version to 2.1.4.
data/NEWS CHANGED
@@ -1,5 +1,26 @@
1
1
  # @markup markdown
2
2
 
3
+ 2.1.5
4
+ =====
5
+
6
+ New Features
7
+ ------------
8
+
9
+ ### V$SESSION_CONNECT_INFO.CLIENT_DRIVER.
10
+
11
+ 'rubyoci8' is set as the driver name, which is displayed in
12
+ V$SESSION_CONNECT_INFO.CLIENT_DRIVER when both the client and
13
+ the server are Oracle 11g or upper.
14
+
15
+ Fixed Issues
16
+ ------------
17
+
18
+ - fix segmentation fault when the process exits on rubinius.
19
+
20
+ - fix "OCI Library Initialization Error" only when the Oracle
21
+ instant client is 11.2.0.3 for Solaris x86 32-bit, the ruby
22
+ version is 1.9.3 or upper and the ruby is compiled by gcc.
23
+
3
24
  2.1.4
4
25
  =====
5
26
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.1.4
1
+ 2.1.5
@@ -34,15 +34,10 @@ Note: "`" is a back quote.
34
34
  Mac OS X
35
35
  ========
36
36
 
37
- OS X 10.7 Lion
38
- --------------
39
-
40
- 64-bit instant client doesn't work. Use 32-bit ruby and instant client or jruby.
37
+ OS X 10.7+
38
+ ----------
41
39
 
42
- See:
43
-
44
- * {http://rubyforge.org/forum/forum.php?thread\_id=49548&forum\_id=1078}
45
- * {https://forums.oracle.com/forums/thread.jspa?threadID=2187558}
40
+ Use the latest 64-bit instant client. The older 64-bit (10.2.0.4) instant client [doesn't work](https://forums.oracle.com/forums/thread.jspa?threadID=2187558). The older 32-bit instant client will work but only with 32-bit ruby or jruby (using JDBC).
46
41
 
47
42
  Intel Mac (64-bit)
48
43
  ------------------
@@ -59,7 +54,7 @@ The Intel Instant client is for Mac OS X 10.5 Leopard. If you are using 10.4 Tig
59
54
  use one of the following workarounds.
60
55
 
61
56
  * compile ruby as ppc. (look at [How to setup Ruby and Oracle client on Intel Mac](http://blog.rayapps.com/2007/08/27/how-to-setup-ruby-and-oracle-client-on-intel-mac/))
62
- * use [ruby-odbc|http://www.ch-werner.de/rubyodbc/] and a third party ODBC driver ([Actual Technologies](http://www.actualtechnologies.com) or [OpenLink Software](http://uda.openlinksw.com/)).
57
+ * use [ruby-odbc](http://www.ch-werner.de/rubyodbc/) and a third party ODBC driver ([Actual Technologies](http://www.actualtechnologies.com) or [OpenLink Software](http://uda.openlinksw.com/)).
63
58
  * use JRuby and Oracle JDBC driver.
64
59
 
65
60
  PowerPC Mac
@@ -74,21 +69,6 @@ You need a same compiler which is used to make ruby itself.
74
69
  For example, if the ruby is compiled by gcc, you need gcc. If it is compiled by Oracle Solaris Studio
75
70
  (formerly called as Sun Studio), you need Oracle Solaris Studio.
76
71
 
77
- If ruby is compiled by gcc and "require 'oci8'" raises "OCI Library Initialization Error",
78
- you may need to recompile ruby as follows:
79
-
80
- $ bzip2 -dc ruby-1.9.3-pxxx.tar.bz2 | tar xvf -
81
- $ cd ruby-1.9.3-pxxx
82
- $ vi main.c # <- Add RUBY_FUNC_EXPORTED just before "int main(..)" as follows:
83
- -------------
84
- RUBY_FUNC_EXPORTED /* Add this line */
85
- int
86
- main(int argc, char **argv)
87
- -------------
88
- $ ./configure
89
- $ make
90
- $ make install
91
-
92
72
  If you use Blastwave.org's ruby and want not to install Sun Studio,
93
73
  you can edit rbconfig.rb by your self. [(look at here)](http://forum.textdrive.com/viewtopic.php?id=12630)
94
74
 
@@ -225,11 +225,12 @@ when /mingw32/
225
225
  if RbConfig::MAKEFILE_CONFIG["LDSHARED"].gsub!(/-s\b/, '')
226
226
  alias :oci8_configuration_orig :configuration
227
227
  def configuration(*args)
228
+ prefix = [nil].pack('P').size == 4 ? '_' : ''
228
229
  oci8_configuration_orig(*args) << <<EOS
229
230
 
230
231
  # Dirty hack to get the map file.
231
232
  all__: all
232
- nm $(DLLIB) | grep ' [TtBb] _[A-Za-z]' > $(TARGET).map
233
+ nm $(DLLIB) | grep ' [TtBb] #{prefix}[A-Za-z]' > $(TARGET).map
233
234
  strip -s $(DLLIB)
234
235
  EOS
235
236
  end
@@ -1,4 +1,9 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
+ /*
3
+ * lob.c - part of ruby-oci8
4
+ *
5
+ * Copyright (C) 2002-2013 Kubo Takehiro <kubo@jiubao.org>
6
+ */
2
7
  #include "oci8.h"
3
8
 
4
9
  static ID id_plus;
@@ -22,8 +27,7 @@ enum state {
22
27
  };
23
28
  typedef struct {
24
29
  oci8_base_t base;
25
- VALUE svc;
26
- OCISvcCtx *svchp;
30
+ oci8_svcctx_t *svcctx;
27
31
  ub4 pos;
28
32
  int char_width;
29
33
  ub1 csfrm;
@@ -31,6 +35,15 @@ typedef struct {
31
35
  enum state state;
32
36
  } oci8_lob_t;
33
37
 
38
+ static oci8_svcctx_t *check_svcctx(oci8_lob_t *lob)
39
+ {
40
+ oci8_svcctx_t *svcctx = lob->svcctx;
41
+ if (svcctx == NULL || svcctx->base.type != OCI_HTYPE_SVCCTX) {
42
+ rb_raise(rb_eRuntimeError, "Invalid Svcctx");
43
+ }
44
+ return svcctx;
45
+ }
46
+
34
47
  static VALUE oci8_lob_write(VALUE self, VALUE data);
35
48
 
36
49
  static VALUE oci8_make_lob(VALUE klass, oci8_svcctx_t *svcctx, OCILobLocator *s)
@@ -101,20 +114,22 @@ void oci8_assign_bfile(oci8_svcctx_t *svcctx, VALUE lob, OCILobLocator **dest)
101
114
  static void oci8_lob_mark(oci8_base_t *base)
102
115
  {
103
116
  oci8_lob_t *lob = (oci8_lob_t *)base;
104
- rb_gc_mark(lob->svc);
117
+ if (lob->svcctx != NULL) {
118
+ rb_gc_mark(lob->svcctx->base.self);
119
+ }
105
120
  }
106
121
 
107
122
  static void oci8_lob_free(oci8_base_t *base)
108
123
  {
109
124
  oci8_lob_t *lob = (oci8_lob_t *)base;
110
125
  boolean is_temporary;
126
+ oci8_svcctx_t *svcctx = lob->svcctx;
111
127
 
112
- if (lob->svchp != NULL
128
+ if (svcctx != NULL
113
129
  && OCILobIsTemporary(oci8_envhp, oci8_errhp, lob->base.hp.lob, &is_temporary) == OCI_SUCCESS
114
130
  && is_temporary) {
115
131
 
116
132
  #ifdef HAVE_RB_THREAD_BLOCKING_REGION
117
- oci8_svcctx_t *svcctx = oci8_get_svcctx(lob->svc);
118
133
  oci8_temp_lob_t *temp_lob = ALLOC(oci8_temp_lob_t);
119
134
 
120
135
  temp_lob->next = svcctx->temp_lobs;
@@ -124,11 +139,10 @@ static void oci8_lob_free(oci8_base_t *base)
124
139
  lob->base.hp.ptr = NULL;
125
140
  #else
126
141
  /* FIXME: This may stall the GC. */
127
- OCILobFreeTemporary(lob->svchp, oci8_errhp, lob->base.hp.lob);
142
+ OCILobFreeTemporary(svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob);
128
143
  #endif
129
144
  }
130
- lob->svc = Qnil;
131
- lob->svchp = NULL;
145
+ lob->svcctx = NULL;
132
146
  }
133
147
 
134
148
  static oci8_base_vtable_t oci8_lob_vtable = {
@@ -139,7 +153,7 @@ static oci8_base_vtable_t oci8_lob_vtable = {
139
153
 
140
154
  static ub4 oci8_lob_get_length(oci8_lob_t *lob)
141
155
  {
142
- oci8_svcctx_t *svcctx = oci8_get_svcctx(lob->svc);
156
+ oci8_svcctx_t *svcctx = check_svcctx(lob);
143
157
  ub4 len;
144
158
 
145
159
  chker2(OCILobGetLength_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob, &len),
@@ -150,7 +164,7 @@ static ub4 oci8_lob_get_length(oci8_lob_t *lob)
150
164
  static void lob_open(oci8_lob_t *lob)
151
165
  {
152
166
  if (lob->state == S_CLOSE) {
153
- oci8_svcctx_t *svcctx = oci8_get_svcctx(lob->svc);
167
+ oci8_svcctx_t *svcctx = check_svcctx(lob);
154
168
 
155
169
  chker2(OCILobOpen_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob, OCI_DEFAULT),
156
170
  &svcctx->base);
@@ -161,7 +175,7 @@ static void lob_open(oci8_lob_t *lob)
161
175
  static void lob_close(oci8_lob_t *lob)
162
176
  {
163
177
  if (lob->state == S_OPEN) {
164
- oci8_svcctx_t *svcctx = oci8_get_svcctx(lob->svc);
178
+ oci8_svcctx_t *svcctx = check_svcctx(lob);
165
179
 
166
180
  chker2(OCILobClose_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob),
167
181
  &svcctx->base);
@@ -172,7 +186,7 @@ static void lob_close(oci8_lob_t *lob)
172
186
  static void bfile_close(oci8_lob_t *lob)
173
187
  {
174
188
  if (lob->state == S_BFILE_OPEN) {
175
- oci8_svcctx_t *svcctx = oci8_get_svcctx(lob->svc);
189
+ oci8_svcctx_t *svcctx = check_svcctx(lob);
176
190
 
177
191
  chker2(OCILobFileClose_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob),
178
192
  &svcctx->base);
@@ -228,28 +242,26 @@ static VALUE oci8_lob_do_initialize(int argc, VALUE *argv, VALUE self, ub1 csfrm
228
242
  oci8_lob_t *lob = DATA_PTR(self);
229
243
  VALUE svc;
230
244
  VALUE val;
245
+ oci8_svcctx_t *svcctx;
231
246
  sword rv;
232
247
 
233
248
  rb_scan_args(argc, argv, "11", &svc, &val);
234
- TO_SVCCTX(svc); /* check argument type */
249
+ svcctx = oci8_get_svcctx(svc);
235
250
  rv = OCIDescriptorAlloc(oci8_envhp, &lob->base.hp.ptr, OCI_DTYPE_LOB, 0, NULL);
236
251
  if (rv != OCI_SUCCESS)
237
252
  oci8_env_raise(oci8_envhp, rv);
238
253
  lob->base.type = OCI_DTYPE_LOB;
239
- lob->svc = svc;
240
- lob->svchp = NULL;
241
254
  lob->pos = 0;
242
255
  lob->char_width = 1;
243
256
  lob->csfrm = csfrm;
244
257
  lob->lobtype = lobtype;
245
258
  lob->state = S_NO_OPEN_CLOSE;
246
259
  oci8_link_to_parent((oci8_base_t*)lob, (oci8_base_t*)DATA_PTR(svc));
260
+ lob->svcctx = svcctx;
247
261
  if (!NIL_P(val)) {
248
- oci8_svcctx_t *svcctx = oci8_get_svcctx(svc);
249
262
  OCI8StringValue(val);
250
263
  chker2(OCILobCreateTemporary_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob, 0, csfrm, lobtype, TRUE, OCI_DURATION_SESSION),
251
264
  &svcctx->base);
252
- lob->svchp = oci8_get_oci_svcctx(svc);
253
265
  oci8_lob_write(self, val);
254
266
  lob->pos = 0; /* reset the position */
255
267
  }
@@ -461,7 +473,7 @@ static VALUE oci8_lob_rewind(VALUE self)
461
473
  static VALUE oci8_lob_truncate(VALUE self, VALUE len)
462
474
  {
463
475
  oci8_lob_t *lob = DATA_PTR(self);
464
- oci8_svcctx_t *svcctx = oci8_get_svcctx(lob->svc);
476
+ oci8_svcctx_t *svcctx = check_svcctx(lob);
465
477
 
466
478
  lob_open(lob);
467
479
  chker2(OCILobTrim_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob, NUM2UINT(len)),
@@ -502,7 +514,7 @@ static VALUE oci8_lob_set_size(VALUE self, VALUE len)
502
514
  static VALUE oci8_lob_read(int argc, VALUE *argv, VALUE self)
503
515
  {
504
516
  oci8_lob_t *lob = DATA_PTR(self);
505
- oci8_svcctx_t *svcctx = oci8_get_svcctx(lob->svc);
517
+ oci8_svcctx_t *svcctx = check_svcctx(lob);
506
518
  ub4 length;
507
519
  ub4 nchar;
508
520
  ub4 amt;
@@ -626,7 +638,7 @@ static VALUE oci8_lob_read(int argc, VALUE *argv, VALUE self)
626
638
  static VALUE oci8_lob_write(VALUE self, VALUE data)
627
639
  {
628
640
  oci8_lob_t *lob = DATA_PTR(self);
629
- oci8_svcctx_t *svcctx = oci8_get_svcctx(lob->svc);
641
+ oci8_svcctx_t *svcctx = check_svcctx(lob);
630
642
  ub4 amt;
631
643
 
632
644
  lob_open(lob);
@@ -695,7 +707,7 @@ static VALUE oci8_lob_flush(VALUE self)
695
707
  static VALUE oci8_lob_get_chunk_size(VALUE self)
696
708
  {
697
709
  oci8_lob_t *lob = DATA_PTR(self);
698
- oci8_svcctx_t *svcctx = oci8_get_svcctx(lob->svc);
710
+ oci8_svcctx_t *svcctx = check_svcctx(lob);
699
711
  ub4 len;
700
712
 
701
713
  chker2(OCILobGetChunkSize_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob, &len),
@@ -710,11 +722,11 @@ static VALUE oci8_lob_clone(VALUE self)
710
722
  VALUE newobj;
711
723
  boolean is_temporary;
712
724
 
713
- newobj = rb_funcall(CLASS_OF(self), oci8_id_new, 1, lob->svc);
725
+ newobj = rb_funcall(CLASS_OF(self), oci8_id_new, 1, lob->svcctx ? lob->svcctx->base.self : Qnil);
714
726
  newlob = DATA_PTR(newobj);
715
727
  if (OCILobIsTemporary(oci8_envhp, oci8_errhp, lob->base.hp.lob, &is_temporary) == OCI_SUCCESS
716
728
  && is_temporary) {
717
- oci8_svcctx_t *svcctx = oci8_get_svcctx(lob->svc);
729
+ oci8_svcctx_t *svcctx = check_svcctx(lob);
718
730
  chker2(OCILobLocatorAssign_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob, &newlob->base.hp.lob),
719
731
  &svcctx->base);
720
732
  } else {
@@ -796,16 +808,16 @@ static VALUE oci8_bfile_initialize(int argc, VALUE *argv, VALUE self)
796
808
  VALUE svc;
797
809
  VALUE dir_alias;
798
810
  VALUE filename;
811
+ oci8_svcctx_t *svcctx;
799
812
  int rv;
800
813
 
801
814
  rb_scan_args(argc, argv, "12", &svc, &dir_alias, &filename);
802
- TO_SVCCTX(svc); /* check argument type */
815
+ svcctx = oci8_get_svcctx(svc);
803
816
  rv = OCIDescriptorAlloc(oci8_envhp, &lob->base.hp.ptr, OCI_DTYPE_LOB, 0, NULL);
804
817
  if (rv != OCI_SUCCESS) {
805
818
  oci8_env_raise(oci8_envhp, rv);
806
819
  }
807
820
  lob->base.type = OCI_DTYPE_LOB;
808
- lob->svc = svc;
809
821
  lob->pos = 0;
810
822
  lob->char_width = 1;
811
823
  lob->csfrm = SQLCS_IMPLICIT;
@@ -817,6 +829,7 @@ static VALUE oci8_bfile_initialize(int argc, VALUE *argv, VALUE self)
817
829
  oci8_bfile_set_name(self, dir_alias, filename);
818
830
  }
819
831
  oci8_link_to_parent((oci8_base_t*)lob, (oci8_base_t*)DATA_PTR(svc));
832
+ lob->svcctx = svcctx;
820
833
  return Qnil;
821
834
  }
822
835
 
@@ -892,7 +905,7 @@ static VALUE oci8_bfile_set_filename(VALUE self, VALUE filename)
892
905
  static VALUE oci8_bfile_exists_p(VALUE self)
893
906
  {
894
907
  oci8_lob_t *lob = DATA_PTR(self);
895
- oci8_svcctx_t *svcctx = oci8_get_svcctx(lob->svc);
908
+ oci8_svcctx_t *svcctx = check_svcctx(lob);
896
909
  boolean flag;
897
910
 
898
911
  chker2(OCILobFileExists_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob, &flag),
@@ -1,6 +1,6 @@
1
1
  /* -*- c-file-style: "ruby"; indent-tabs-mode: nil -*- */
2
2
  /*
3
- * Copyright (C) 2002-2009 KUBO Takehiro <kubo@jiubao.org>
3
+ * Copyright (C) 2002-2013 Kubo Takehiro <kubo@jiubao.org>
4
4
  */
5
5
 
6
6
  /*
@@ -681,30 +681,54 @@ void Init_oci_object(VALUE cOCI8)
681
681
  /* OCI8::TDO */
682
682
  cOCI8TDO = oci8_define_class_under(cOCI8, "TDO", &oci8_tdo_vtable);
683
683
  rb_define_private_method(cOCI8TDO, "setup", oci8_tdo_setup, 2);
684
+ /* @private */
684
685
  rb_define_const(cOCI8TDO, "ATTR_STRING", INT2FIX(ATTR_STRING));
686
+ /* @private */
685
687
  rb_define_const(cOCI8TDO, "ATTR_RAW", INT2FIX(ATTR_RAW));
688
+ /* @private */
686
689
  rb_define_const(cOCI8TDO, "ATTR_OCINUMBER", INT2FIX(ATTR_OCINUMBER));
690
+ /* @private */
687
691
  rb_define_const(cOCI8TDO, "ATTR_FLOAT", INT2FIX(ATTR_FLOAT));
692
+ /* @private */
688
693
  rb_define_const(cOCI8TDO, "ATTR_INTEGER", INT2FIX(ATTR_INTEGER));
694
+ /* @private */
689
695
  rb_define_const(cOCI8TDO, "ATTR_OCIDATE", INT2FIX(ATTR_OCIDATE));
696
+ /* @private */
690
697
  rb_define_const(cOCI8TDO, "ATTR_BINARY_DOUBLE", INT2FIX(ATTR_BINARY_DOUBLE));
698
+ /* @private */
691
699
  rb_define_const(cOCI8TDO, "ATTR_BINARY_FLOAT", INT2FIX(ATTR_BINARY_FLOAT));
700
+ /* @private */
692
701
  rb_define_const(cOCI8TDO, "ATTR_NAMED_TYPE", INT2FIX(ATTR_NAMED_TYPE));
702
+ /* @private */
693
703
  rb_define_const(cOCI8TDO, "ATTR_NAMED_COLLECTION", INT2FIX(ATTR_NAMED_COLLECTION));
704
+ /* @private */
694
705
  rb_define_const(cOCI8TDO, "ATTR_CLOB", INT2FIX(ATTR_CLOB));
706
+ /* @private */
695
707
  rb_define_const(cOCI8TDO, "ATTR_NCLOB", INT2FIX(ATTR_NCLOB));
708
+ /* @private */
696
709
  rb_define_const(cOCI8TDO, "ATTR_BLOB", INT2FIX(ATTR_BLOB));
710
+ /* @private */
697
711
  rb_define_const(cOCI8TDO, "ATTR_BFILE", INT2FIX(ATTR_BFILE));
698
712
  #define ALIGNMENT_OF(type) (size_t)&(((struct {char c; type t;}*)0)->t)
713
+ /* @private */
699
714
  rb_define_const(cOCI8TDO, "SIZE_OF_POINTER", INT2FIX(sizeof(void *)));
715
+ /* @private */
700
716
  rb_define_const(cOCI8TDO, "ALIGNMENT_OF_POINTER", INT2FIX(ALIGNMENT_OF(void *)));
717
+ /* @private */
701
718
  rb_define_const(cOCI8TDO, "SIZE_OF_OCINUMBER", INT2FIX(sizeof(OCINumber)));
719
+ /* @private */
702
720
  rb_define_const(cOCI8TDO, "ALIGNMENT_OF_OCINUMBER", INT2FIX(ALIGNMENT_OF(OCINumber)));
721
+ /* @private */
703
722
  rb_define_const(cOCI8TDO, "SIZE_OF_OCIDATE", INT2FIX(sizeof(OCIDate)));
723
+ /* @private */
704
724
  rb_define_const(cOCI8TDO, "ALIGNMENT_OF_OCIDATE", INT2FIX(ALIGNMENT_OF(OCIDate)));
725
+ /* @private */
705
726
  rb_define_const(cOCI8TDO, "SIZE_OF_FLOAT", INT2FIX(sizeof(float)));
727
+ /* @private */
706
728
  rb_define_const(cOCI8TDO, "ALIGNMENT_OF_FLOAT", INT2FIX(ALIGNMENT_OF(float)));
729
+ /* @private */
707
730
  rb_define_const(cOCI8TDO, "SIZE_OF_DOUBLE", INT2FIX(sizeof(double)));
731
+ /* @private */
708
732
  rb_define_const(cOCI8TDO, "ALIGNMENT_OF_DOUBLE", INT2FIX(ALIGNMENT_OF(double)));
709
733
 
710
734
  /* OCI8::NamedType */