Author: timbo
Date: Wed May 28 06:01:15 2008
New Revision: 11337
Modified:
dbi/trunk/DBI.xs
dbi/trunk/DBIXS.h
dbi/trunk/dbixs_rev.h
Log:
Rework lvalue DBIS to ensure binary compatibility with existing drivers.
Modified: dbi/trunk/DBI.xs
==============================================================================
--- dbi/trunk/DBI.xs (original)
+++ dbi/trunk/DBI.xs Wed May 28 06:01:15 2008
@@ -389,7 +389,8 @@
* http://rt.cpan.org/Public/Bug/Display.html?id=32309
*/
sv_setiv(perl_get_sv(DBISTATE_PERLNAME, GV_ADDMULTI), 0); /* force SvIOK */
- DBISTATE_ASSIGN(DBISx);
+ DBIS = DBISx;
+ DBIS_PUBLISHED_LVALUE = DBISx;
/* store version and size so we can spot DBI/DBD version mismatch */
DBIS->check_version = check_version;
Modified: dbi/trunk/DBIXS.h
==============================================================================
--- dbi/trunk/DBIXS.h (original)
+++ dbi/trunk/DBIXS.h Wed May 28 06:01:15 2008
@@ -449,23 +449,21 @@
/* --- perl object (ActiveState) / multiplicity hooks and hoops --- */
/* note that USE_ITHREADS implies MULTIPLICITY */
+#define DBIS_PUBLISHED_LVALUE (*(INT2PTR(dbistate_t**,
&SvIVX(DBISTATE_ADDRSV))))
#if defined(MULTIPLICITY) || defined(PERL_OBJECT) || defined(PERL_CAPI)
-# define DBISTATE_DECLARE typedef int dummy_dbistate1 /* keep semicolon
from feeling lonely */
-# undef DBIS
-# define DBIS (*(INT2PTR(dbistate_t**, &SvIVX(DBISTATE_ADDRSV))))
-/* 'dbis' is temp for bad drivers using 'dbis' instead of 'DBIS' */
-# define dbis (*(INT2PTR(dbistate_t**, &SvIVX(DBISTATE_ADDRSV))))
-# define DBISTATE_INIT_DBIS typedef int dummy_dbistate2 /* keep semicolon
from feeling lonely */
+# define DBISTATE_DECLARE typedef int dummy_dbistate /* keep semicolon from
feeling lonely */
+# define DBISTATE_INIT_DBIS typedef int dummy_dbistate2; /* keep semicolon
from feeling lonely */
+# undef DBIS
+# define DBIS DBIS_PUBLISHED_LVALUE
+# define dbis DBIS_PUBLISHED_LVALUE /* temp for old drivers using 'dbis'
instead of 'DBIS' */
#else /* plain and simple non perl object / multiplicity case */
# define DBISTATE_DECLARE static dbistate_t *DBIS
-# define DBISTATE_INIT_DBIS DBISTATE_ASSIGN(INT2PTR(dbistate_t*,
SvIV(DBISTATE_ADDRSV)))
-
+# define DBISTATE_INIT_DBIS (DBIS = DBIS_PUBLISHED_LVALUE)
#endif
-# define DBISTATE_ASSIGN(st) (DBIS = (st))
# define DBISTATE_INIT { /* typically use in BOOT: of XS file */ \
DBISTATE_INIT_DBIS; \
if (DBIS == NULL) \
Modified: dbi/trunk/dbixs_rev.h
==============================================================================
--- dbi/trunk/dbixs_rev.h (original)
+++ dbi/trunk/dbixs_rev.h Wed May 28 06:01:15 2008
@@ -1,3 +1,4 @@
-/* Tue May 27 13:21:53 2008 */
-/* Mixed revision working copy (11328:11329) */
-#define DBIXS_REVISION 11328
+/* Wed May 28 05:58:17 2008 */
+/* Mixed revision working copy (11334M:11336) */
+/* Code modified since last checkin */
+#define DBIXS_REVISION 11334