[svn:dbd-oracle] r14589 - dbd-oracle/trunk

[email protected] Fri, 17 Dec 2010 09:10:57 -0800 (PST)
Newsgroups perl.dbd.oracle.changes
Message-ID <[email protected]>
Author: byterock
Date: Fri Dec 17 09:10:57 2010
New Revision: 14589

Modified:
   dbd-oracle/trunk/Oracle.h
   dbd-oracle/trunk/dbdimp.c
   dbd-oracle/trunk/dbdimp.h
   dbd-oracle/trunk/oci8.c

Log:
 Fix for  rt.cpan.org Ticket #=42842 Test 31lob fails with 64-bit Instant Client by John Scoles
 
Mostly changes some long, int and UV to ub2 to account for 64 bit boxes

Does not break anything in 32bit and will fix tthe lob length problem in 64 bit


Modified: dbd-oracle/trunk/Oracle.h
==============================================================================
--- dbd-oracle/trunk/Oracle.h	(original)
+++ dbd-oracle/trunk/Oracle.h	Fri Dec 17 09:10:57 2010
@@ -92,7 +92,7 @@
 ub4	 ora_blob_read_piece _((SV *sth, imp_sth_t *imp_sth, imp_fbh_t *fbh, SV *dest_sv,
                    long offset, UV len, long destoffset));
 ub4	 ora_blob_read_mb_piece _((SV *sth, imp_sth_t *imp_sth, imp_fbh_t *fbh, SV *dest_sv,
-		   long offset, UV len, long destoffset));
+		   long offset, ub4 len, long destoffset));
 
 /* Oracle types */
 #define ORA_VARCHAR2		1

Modified: dbd-oracle/trunk/dbdimp.c
==============================================================================
--- dbd-oracle/trunk/dbdimp.c	(original)
+++ dbd-oracle/trunk/dbdimp.c	Fri Dec 17 09:10:57 2010
@@ -296,7 +296,7 @@
 	/* and setup the pointers in the head fb_ary struct	*/
 	Newz(42, fb_ary, sizeof(fb_ary_t), fb_ary_t);
 	Newz(42, fb_ary->abuf,		size * piece_size, ub1);
-	Newz(42, fb_ary->cb_abuf,	size * max_len, ub1);
+	Newz(42, fb_ary->cb_abuf,	size * max_len, ub2);
 	Newz(42, fb_ary->aindp,(unsigned)size,sb2);
 	Newz(42, fb_ary->arlen,(unsigned)size,ub2);
 	Newz(42, fb_ary->arcode,(unsigned)size,ub2);

Modified: dbd-oracle/trunk/dbdimp.h
==============================================================================
--- dbd-oracle/trunk/dbdimp.h	(original)
+++ dbd-oracle/trunk/dbdimp.h	Fri Dec 17 09:10:57 2010
@@ -147,7 +147,7 @@
 	ub4				piece_count;/*# of pieces retrieved*/
 	sb2				*aindp;	/* null/trunc indicator variable	*/
 	ub1				*abuf;		/* data buffer (points to sv data)	*/
-	ub1				*cb_abuf;	/*yet another buffer for picewise callbacks this means I only need to allocate memory once a prepare rather than at each fetch*/
+	ub2				*cb_abuf;	/*yet another buffer for picewise callbacks this means I only need to allocate memory once a prepare rather than at each fetch*/
 	ub2				*arlen;	/* length of returned data		*/
 	ub2				*arcode;	/* field level error status		*/
 };

Modified: dbd-oracle/trunk/oci8.c
==============================================================================
--- dbd-oracle/trunk/oci8.c	(original)
+++ dbd-oracle/trunk/oci8.c	Fri Dec 17 09:10:57 2010
@@ -19,7 +19,7 @@
 
 DBISTATE_DECLARE;
 
-int describe_obj_by_tdo(SV *sth,imp_sth_t *imp_sth,fbh_obj_t *obj,int level );
+int describe_obj_by_tdo(SV *sth,imp_sth_t *imp_sth,fbh_obj_t *obj,ub2 level );
 int dump_struct(imp_sth_t *imp_sth,fbh_obj_t *obj,int level);
 
 
@@ -1553,7 +1553,7 @@
 #ifdef UTF8_SUPPORT
 ub4
 ora_blob_read_mb_piece(SV *sth, imp_sth_t *imp_sth, imp_fbh_t *fbh,
-  SV *dest_sv, long offset, UV len, long destoffset)
+  SV *dest_sv, long offset, ub4 len, long destoffset)
 {
 	dTHX;
 	ub4 loblen = 0;
@@ -2851,7 +2851,7 @@
 	}
 
 int
-describe_obj_by_tdo(SV *sth,imp_sth_t *imp_sth,fbh_obj_t *obj,int level ) {
+describe_obj_by_tdo(SV *sth,imp_sth_t *imp_sth,fbh_obj_t *obj,ub2 level ) {
 	dTHX;
 	sword status;
 	text *type_name, *schema_name;