[ruby-oci8-commit] [279] branches/ruby-oci8-1.0: * ext/oci8/lob.c: fix OCILobLocator#getLength for a lob over 1GB,
nobody at rubyforge.org
nobody at rubyforge.org
Fri Aug 8 22:42:32 EDT 2008
Revision: 279
Author: kubo
Date: 2008-08-08 22:42:31 -0400 (Fri, 08 Aug 2008)
Log Message:
-----------
* ext/oci8/lob.c: fix OCILobLocator#getLength for a lob over 1GB,
which affect OCI8::LOB#size and OCI8::LOB#read. fix
OCILobLocator#read and OCILobLocator#write to set offset over 2BG,
which affect OCI8::LOB#read and OCI8::LOB#write.
Modified Paths:
--------------
branches/ruby-oci8-1.0/ChangeLog
branches/ruby-oci8-1.0/ext/oci8/lob.c
Modified: branches/ruby-oci8-1.0/ChangeLog
===================================================================
--- branches/ruby-oci8-1.0/ChangeLog 2008-08-09 02:03:33 UTC (rev 278)
+++ branches/ruby-oci8-1.0/ChangeLog 2008-08-09 02:42:31 UTC (rev 279)
@@ -1,3 +1,9 @@
+2008-08-09 KUBO Takehiro <kubo at jiubao.org>
+ * ext/oci8/lob.c: fix OCILobLocator#getLength for a lob over 1GB,
+ which affect OCI8::LOB#size and OCI8::LOB#read. fix
+ OCILobLocator#read and OCILobLocator#write to set offset over 2BG,
+ which affect OCI8::LOB#read and OCI8::LOB#write.
+
2008-07-12 KUBO Takehiro <kubo at jiubao.org>
* lib/oci8.rb.in: (1) add #to_json to OraDate too.
(2) fix a bug when using Oracle 8i and dbd. OCI_ATTR_FSPRECISION
Modified: branches/ruby-oci8-1.0/ext/oci8/lob.c
===================================================================
--- branches/ruby-oci8-1.0/ext/oci8/lob.c 2008-08-09 02:03:33 UTC (rev 278)
+++ branches/ruby-oci8-1.0/ext/oci8/lob.c 2008-08-09 02:42:31 UTC (rev 279)
@@ -55,7 +55,7 @@
rv = OCILobGetLength(svch->hp, h->errhp, h->hp, &len);
if (rv != OCI_SUCCESS)
oci8_raise(h->errhp, rv, NULL);
- return INT2FIX(len);
+ return UINT2NUM(len);
}
#ifdef HAVE_OCILOBGETCHUNKSIZE
@@ -72,7 +72,7 @@
rv = OCILobGetChunkSize(svch->hp, h->errhp, h->hp, &len);
if (rv != OCI_SUCCESS)
oci8_raise(h->errhp, rv, NULL);
- return INT2FIX(len);
+ return UINT2NUM(len);
}
#endif
@@ -110,8 +110,8 @@
rb_scan_args(argc, argv, "32", &vsvc, &voffset, &vamt, &vcsid, &vcsfrm);
Get_Handle(self, h); /* 0 */
Check_Handle(vsvc, OCISvcCtx, svch); /* 1 */
- offset = NUM2INT(voffset); /* 2 */
- amt = NUM2INT(vamt); /* 3 */
+ offset = NUM2UINT(voffset); /* 2 */
+ amt = NUM2UINT(vamt); /* 3 */
csid = NIL_P(vcsid) ? 0 : NUM2INT(vcsid); /* 4 */
csfrm = NIL_P(vcsfrm) ? SQLCS_IMPLICIT : NUM2INT(vcsfrm); /* 5 */
@@ -170,7 +170,7 @@
rb_scan_args(argc, argv, "32", &vsvc, &voffset, &vbuf, &vcsid, &vcsfrm);
Get_Handle(self, h); /* 0 */
Check_Handle(vsvc, OCISvcCtx, svch); /* 1 */
- offset = NUM2INT(voffset); /* 2 */
+ offset = NUM2UINT(voffset); /* 2 */
Get_String(vbuf, buf); /* 3 */
csid = NIL_P(vcsid) ? 0 : NUM2INT(vcsid); /* 4 */
csfrm = NIL_P(vcsfrm) ? SQLCS_IMPLICIT : NUM2INT(vcsfrm); /* 5 */
More information about the ruby-oci8-commit
mailing list