[ruby-oci8-commit] [278] trunk/ruby-oci8: * ext/oci8/lob.c: fix OCI8::LOB#size= when using a lob over 2GB.
nobody at rubyforge.org
nobody at rubyforge.org
Fri Aug 8 22:03:34 EDT 2008
Revision: 278
Author: kubo
Date: 2008-08-08 22:03:33 -0400 (Fri, 08 Aug 2008)
Log Message:
-----------
* ext/oci8/lob.c: fix OCI8::LOB#size= when using a lob over 2GB.
fix the return value of OCI8::LOB#write when writing a string
over 2GB.
Modified Paths:
--------------
trunk/ruby-oci8/ChangeLog
trunk/ruby-oci8/ext/oci8/lob.c
Modified: trunk/ruby-oci8/ChangeLog
===================================================================
--- trunk/ruby-oci8/ChangeLog 2008-08-05 13:53:55 UTC (rev 277)
+++ trunk/ruby-oci8/ChangeLog 2008-08-09 02:03:33 UTC (rev 278)
@@ -1,3 +1,8 @@
+2008-08-09 KUBO Takehiro <kubo at jiubao.org>
+ * ext/oci8/lob.c: fix OCI8::LOB#size= when using a lob over 2GB.
+ fix the return value of OCI8::LOB#write when writing a string
+ over 2GB.
+
2008-08-05 KUBO Takehiro <kubo at jiubao.org>
* test/config.rb, test/test_all.rb, test/test_array_dml.rb,
test/test_bind_raw.rb, test/test_bind_time.rb, test/test_break.rb,
Modified: trunk/ruby-oci8/ext/oci8/lob.c
===================================================================
--- trunk/ruby-oci8/ext/oci8/lob.c 2008-08-05 13:53:55 UTC (rev 277)
+++ trunk/ruby-oci8/ext/oci8/lob.c 2008-08-09 02:03:33 UTC (rev 278)
@@ -261,7 +261,7 @@
oci8_svcctx_t *svcctx = oci8_get_svcctx(lob->svc);
lob_open(lob);
- oci_lc(OCILobTrim_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob, NUM2INT(len)));
+ oci_lc(OCILobTrim_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob, NUM2UINT(len)));
return self;
}
@@ -358,7 +358,7 @@
amt = RSTRING_LEN(data);
oci_lc(OCILobWrite_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob, &amt, lob->pos + 1, RSTRING_PTR(data), amt, OCI_ONE_PIECE, NULL, NULL, 0, lob->csfrm));
lob->pos += amt;
- return INT2FIX(amt);
+ return UINT2NUM(amt);
}
static VALUE oci8_lob_get_sync(VALUE self)
@@ -395,7 +395,7 @@
ub4 len;
oci_lc(OCILobGetChunkSize_nb(svcctx, svcctx->base.hp.svc, oci8_errhp, lob->base.hp.lob, &len));
- return INT2FIX(len);
+ return UINT2NUM(len);
} else {
rb_notimplement();
}
More information about the ruby-oci8-commit
mailing list