Author: timbo
Date: Mon Mar 10 05:00:51 2008
New Revision: 10899
Modified:
dbi/trunk/Changes
dbi/trunk/DBI.xs
dbi/trunk/DBIXS.h
dbi/trunk/dbixs_rev.h
Log:
Fix printf format vs argument type mismatches.
Add XS prototype for XS_DBI_dispatch
Modified: dbi/trunk/Changes
==============================================================================
--- dbi/trunk/Changes (original)
+++ dbi/trunk/Changes Mon Mar 10 05:00:51 2008
@@ -42,7 +42,7 @@
=head2 Changes in DBI 1.603
- Fixed fetchall_arrayref with $max_rows argument to pure-perl
+ Fixed pure-perl fetchall_arrayref with $max_rows argument
to not error when fetching after all rows already fetched.
(Was fixed for compiled drivers back in DBI 1.31.)
Thanks to Mark Overmeer.
Modified: dbi/trunk/DBI.xs
==============================================================================
--- dbi/trunk/DBI.xs (original)
+++ dbi/trunk/DBI.xs Mon Mar 10 05:00:51 2008
@@ -227,13 +227,13 @@
static const char msg[] = "you probably need to rebuild the DBD driver (or
possibly the DBI)";
(void)need_dbixs_cv;
if (dbis_cv != DBISTATE_VERSION || dbis_cs != sizeof(*DBIS))
- croak("DBI/DBD internal version mismatch (DBI is v%d/s%d, DBD %s
expected v%d/s%d) %s.\n",
+ croak("DBI/DBD internal version mismatch (DBI is v%d/s%lu, DBD %s
expected v%d/s%d) %s.\n",
DBISTATE_VERSION, sizeof(*DBIS), name, dbis_cv, dbis_cs, msg);
/* Catch structure size changes - We should probably force a recompile if
the DBI */
/* runtime version is different from the build time. That would be harsh
but safe. */
if (drc_s != sizeof(dbih_drc_t) || dbc_s != sizeof(dbih_dbc_t) ||
stc_s != sizeof(dbih_stc_t) || fdc_s != sizeof(dbih_fdc_t) )
- croak("%s (dr:%d/%d, db:%d/%d, st:%d/%d, fd:%d/%d), %s.\n",
+ croak("%s (dr:%d/%lu, db:%d/%lu, st:%d/%lu, fd:%d/%lu), %s.\n",
"DBI/DBD internal structure mismatch",
drc_s, sizeof(dbih_drc_t), dbc_s, sizeof(dbih_dbc_t),
stc_s, sizeof(dbih_stc_t), fdc_s, sizeof(dbih_fdc_t), msg);
@@ -906,8 +906,8 @@
imp_fdh_t *imp_fdh;
SV *fdsv;
if (imp_size < sizeof(imp_fdh_t) || cn_len<10 ||
strNE("::fd",&col_name[cn_len-4]))
- croak("panic: dbih_makefdsv %s '%s' imp_size %d invalid",
- imp_class, col_name, imp_size);
+ croak("panic: dbih_makefdsv %s '%s' imp_size %ld invalid",
+ imp_class, col_name, (long)imp_size);
if (DBIS_TRACE_LEVEL >= 3)
PerlIO_printf(DBILOGFP," dbih_make_fdsv(%s, %s, %ld, '%s')\n",
neatsvpv(sth,0), imp_class, (long)imp_size, col_name);
@@ -949,14 +949,14 @@
if (DBIS_TRACE_LEVEL >= 3)
PerlIO_printf(DBILOGFP," dbih_make_com(%s, %p, %s, %ld, %p)
thr#%p\n",
- neatsvpv(p_h,0), p_imp_xxh, imp_class, (long)imp_size, imp_templ,
PERL_GET_THX);
+ neatsvpv(p_h,0), (void*)p_imp_xxh, imp_class, (long)imp_size,
(void*)imp_templ, PERL_GET_THX);
if (imp_templ && SvOK(imp_templ)) {
U32 imp_templ_flags;
/* validate the supplied dbi_imp_data looks reasonable, */
if (SvCUR(imp_templ) != imp_size)
- croak("Can't use dbi_imp_data of wrong size (%d not %d)",
- SvCUR(imp_templ), imp_size);
+ croak("Can't use dbi_imp_data of wrong size (%ld not %ld)",
+ (long)SvCUR(imp_templ), (long)imp_size);
/* copy the whole template */
dbih_imp_sv = newSVsv(imp_templ);
@@ -2630,7 +2630,8 @@
/* ----------------------------------------------------------------- */
/* --- The DBI dispatcher. The heart of the perl DBI. --- */
-XS(XS_DBI_dispatch) /* prototype must match XS produced code */
+XS(XS_DBI_dispatch); /* prototype to pass -Wmissing-prototypes */
+XS(XS_DBI_dispatch)
{
dXSARGS;
dPERINTERP;
@@ -2812,8 +2813,8 @@
}
if (trace_level >= 3) {
PerlIO *logfp = DBILOGFP;
- PerlIO_printf(logfp," <- %s(%s) = %p (%s %p)\n",
meth_name, can_meth, dbi_msv,
- (imp_msv && isGV(imp_msv)) ?
HvNAME(GvSTASH(imp_msv)) : "?", imp_msv);
+ PerlIO_printf(logfp," <- %s(%s) = %p (%s %p)\n",
meth_name, can_meth, (void*)dbi_msv,
+ (imp_msv && isGV(imp_msv)) ?
HvNAME(GvSTASH(imp_msv)) : "?", (void*)imp_msv);
}
ST(0) = (dbi_msv) ? sv_2mortal(newRV(dbi_msv)) :
&PL_sv_undef;
XSRETURN(1);
@@ -3204,7 +3205,7 @@
if (is_DESTROY) /* show handle as first arg to DESTROY */
/* want to show outer handle so trace makes sense */
/* but outer handle has been destroyed so we fake it */
- PerlIO_printf(logfp,"(%s=HASH(%p)",
HvNAME(SvSTASH(SvRV(orig_h))), DBIc_MY_H(imp_xxh));
+ PerlIO_printf(logfp,"(%s=HASH(%p)",
HvNAME(SvSTASH(SvRV(orig_h))), (void*)DBIc_MY_H(imp_xxh));
else
PerlIO_printf(logfp,"(%s", neatsvpv(st1,0));
if (items >= 3)
Modified: dbi/trunk/DBIXS.h
==============================================================================
--- dbi/trunk/DBIXS.h (original)
+++ dbi/trunk/DBIXS.h Mon Mar 10 05:00:51 2008
@@ -467,7 +467,7 @@
# define DBISTATE_INIT { /* typically use in BOOT: of XS file */ \
DBISTATE_INIT_DBIS; \
if (DBIS == NULL) \
- croak("Unable to get DBI state from %s at %p. DBI not loaded.",
DBISTATE_PERLNAME, DBISTATE_ADDRSV); \
+ croak("Unable to get DBI state from %s at %p. DBI not loaded.",
DBISTATE_PERLNAME, (void*)DBISTATE_ADDRSV); \
DBIS->check_version(__FILE__, DBISTATE_VERSION, sizeof(*DBIS),
NEED_DBIXS_VERSION, \
sizeof(dbih_drc_t), sizeof(dbih_dbc_t), sizeof(dbih_stc_t),
sizeof(dbih_fdc_t) \
); \
Modified: dbi/trunk/dbixs_rev.h
==============================================================================
--- dbi/trunk/dbixs_rev.h (original)
+++ dbi/trunk/dbixs_rev.h Mon Mar 10 05:00:51 2008
@@ -1,3 +1,4 @@
-/* Fri Jan 4 15:10:17 2008 */
+/* Mon Mar 10 11:57:28 2008 */
+/* Mixed revision working copy (10706M:10720) */
/* Code modified since last checkin */
-#define DBIXS_REVISION 10429
+#define DBIXS_REVISION 10706