"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "DBI.xs" between
DBI-1.642.tar.gz and DBI-1.643.tar.gz

About: DBI - The Perl Database Interface (requires one or more "driver" modules DBD::* to talk to databases).

DBI.xs  (DBI-1.642):DBI.xs  (DBI-1.643)
skipping to change at line 58 skipping to change at line 58
#ifndef PerlIO_setlinebuf #ifndef PerlIO_setlinebuf
#ifdef HAS_SETLINEBUF #ifdef HAS_SETLINEBUF
#define PerlIO_setlinebuf(f) setlinebuf(f) #define PerlIO_setlinebuf(f) setlinebuf(f)
#else #else
#ifndef USE_PERLIO #ifndef USE_PERLIO
#define PerlIO_setlinebuf(f) setvbuf(f, Nullch, _IOLBF, 0) #define PerlIO_setlinebuf(f) setvbuf(f, Nullch, _IOLBF, 0)
#endif #endif
#endif #endif
#endif #endif
#ifndef CopFILEGV
# define CopFILEGV(cop) cop->cop_filegv
# define CopLINE(cop) cop->cop_line
# define CopSTASH(cop) cop->cop_stash
# define CopSTASHPV(cop) (CopSTASH(cop) ? HvNAME(CopSTASH(cop)) : Nul
lch)
#endif
#ifndef PERL_GET_THX
#define PERL_GET_THX ((void*)0)
#endif
#ifndef PerlProc_getpid
#define PerlProc_getpid() getpid()
extern Pid_t getpid (void);
#endif
#ifndef aTHXo_
#define aTHXo_
#endif
#if (PERL_VERSION < 8) || ((PERL_VERSION == 8) && (PERL_SUBVERSION == 0)) #if (PERL_VERSION < 8) || ((PERL_VERSION == 8) && (PERL_SUBVERSION == 0))
#define DBI_save_hv_fetch_ent #define DBI_save_hv_fetch_ent
#endif #endif
/* prior to 5.8.9: when a CV is duped, the mg dup method is called, /* prior to 5.8.9: when a CV is duped, the mg dup method is called,
* then *afterwards*, any_ptr is copied from the old CV to the new CV. * then *afterwards*, any_ptr is copied from the old CV to the new CV.
* This wipes out anything which the dup method did to any_ptr. * This wipes out anything which the dup method did to any_ptr.
* This needs working around */ * This needs working around */
#if defined(USE_ITHREADS) && (PERL_VERSION == 8) && (PERL_SUBVERSION < 9) #if defined(USE_ITHREADS) && (PERL_VERSION == 8) && (PERL_SUBVERSION < 9)
# define BROKEN_DUP_ANY_PTR # define BROKEN_DUP_ANY_PTR
#endif #endif
#ifndef warn_sv
static void warn_sv(SV *sv) { dTHX; warn("%" SVf, SVfARG(sv)); }
#endif
#ifndef croak_sv
static void croak_sv(SV *sv) { dTHX; sv_setsv(ERRSV, sv); croak(NULL); }
#endif
/* types of method name */ /* types of method name */
typedef enum { typedef enum {
methtype_ordinary, /* nothing special about this method name */ methtype_ordinary, /* nothing special about this method name */
methtype_DESTROY, methtype_DESTROY,
methtype_FETCH, methtype_FETCH,
methtype_can, methtype_can,
methtype_fetch_star, /* fetch*, i.e. fetch() or fetch_...() */ methtype_fetch_star, /* fetch*, i.e. fetch() or fetch_...() */
methtype_set_err methtype_set_err
} meth_types; } meth_types;
skipping to change at line 329 skipping to change at line 305
dMY_CXT; dMY_CXT;
return &(MY_CXT.dbi_state); return &(MY_CXT.dbi_state);
} }
/* --- */ /* --- */
static void * static void *
malloc_using_sv(STRLEN len) malloc_using_sv(STRLEN len)
{ {
dTHX; dTHX;
SV *sv = newSV(len); SV *sv = newSV(len ? len : 1);
void *p = SvPVX(sv); void *p = SvPVX(sv);
memzero(p, len); memzero(p, len);
return p; return p;
} }
static char * static char *
savepv_using_sv(char *str) savepv_using_sv(char *str)
{ {
char *buf = malloc_using_sv(strlen(str)); char *buf = malloc_using_sv(strlen(str));
strcpy(buf, str); strcpy(buf, str);
skipping to change at line 1396 skipping to change at line 1372
static void static void
dbih_setup_handle(pTHX_ SV *orv, char *imp_class, SV *parent, SV *imp_datasv) dbih_setup_handle(pTHX_ SV *orv, char *imp_class, SV *parent, SV *imp_datasv)
{ {
SV *h; SV *h;
char *errmsg = "Can't setup DBI handle of %s to %s: %s"; char *errmsg = "Can't setup DBI handle of %s to %s: %s";
SV *dbih_imp_sv; SV *dbih_imp_sv;
SV *dbih_imp_rv; SV *dbih_imp_rv;
SV *dbi_imp_data = Nullsv; SV *dbi_imp_data = Nullsv;
SV **svp; SV **svp;
char imp_mem_name[300]; SV *imp_mem_name;
HV *imp_mem_stash; HV *imp_mem_stash;
imp_xxh_t *imp; imp_xxh_t *imp;
imp_xxh_t *parent_imp; imp_xxh_t *parent_imp;
int trace_level; int trace_level;
h = dbih_inner(aTHX_ orv, "dbih_setup_handle"); h = dbih_inner(aTHX_ orv, "dbih_setup_handle");
parent = dbih_inner(aTHX_ parent, NULL); /* check parent valid (& inner) */ parent = dbih_inner(aTHX_ parent, NULL); /* check parent valid (& inner) */
if (parent) { if (parent) {
parent_imp = DBIh_COM(parent); parent_imp = DBIh_COM(parent);
trace_level = DBIc_TRACE_LEVEL(parent_imp); trace_level = DBIc_TRACE_LEVEL(parent_imp);
skipping to change at line 1423 skipping to change at line 1399
if (trace_level >= 5) { if (trace_level >= 5) {
dMY_CXT; dMY_CXT;
PerlIO_printf(DBILOGFP," dbih_setup_handle(%s=>%s, %s, %lx, %s)\n", PerlIO_printf(DBILOGFP," dbih_setup_handle(%s=>%s, %s, %lx, %s)\n",
neatsvpv(orv,0), neatsvpv(h,0), imp_class, (long)parent, neatsvpv(im p_datasv,0)); neatsvpv(orv,0), neatsvpv(h,0), imp_class, (long)parent, neatsvpv(im p_datasv,0));
} }
if (mg_find(SvRV(h), DBI_MAGIC) != NULL) if (mg_find(SvRV(h), DBI_MAGIC) != NULL)
croak(errmsg, neatsvpv(orv,0), imp_class, "already a DBI (or ~magic) han dle"); croak(errmsg, neatsvpv(orv,0), imp_class, "already a DBI (or ~magic) han dle");
strcpy(imp_mem_name, imp_class); imp_mem_name = sv_2mortal(newSVpvf("%s_mem", imp_class));
strcat(imp_mem_name, "_mem"); if ( (imp_mem_stash = gv_stashsv(imp_mem_name, FALSE)) == NULL)
if ( (imp_mem_stash = gv_stashpv(imp_mem_name, FALSE)) == NULL) croak(errmsg, neatsvpv(orv,0), SvPVbyte_nolen(imp_mem_name), "unknown _m
croak(errmsg, neatsvpv(orv,0), imp_mem_name, "unknown _mem package"); em package");
if ((svp = hv_fetch((HV*)SvRV(h), "dbi_imp_data", 12, 0))) { if ((svp = hv_fetch((HV*)SvRV(h), "dbi_imp_data", 12, 0))) {
dbi_imp_data = *svp; dbi_imp_data = *svp;
if (SvGMAGICAL(dbi_imp_data)) /* call FETCH via magic */ if (SvGMAGICAL(dbi_imp_data)) /* call FETCH via magic */
mg_get(dbi_imp_data); mg_get(dbi_imp_data);
} }
DBI_LOCK; DBI_LOCK;
dbih_imp_sv = dbih_make_com(parent, parent_imp, imp_class, 0, 0, dbi_imp_dat a); dbih_imp_sv = dbih_make_com(parent, parent_imp, imp_class, 0, 0, dbi_imp_dat a);
skipping to change at line 1595 skipping to change at line 1570
if (DBIc_COMSET(imp_xxh)) sv_catpv(flags,"COMSET "); if (DBIc_COMSET(imp_xxh)) sv_catpv(flags,"COMSET ");
if (DBIc_IMPSET(imp_xxh)) sv_catpv(flags,"IMPSET "); if (DBIc_IMPSET(imp_xxh)) sv_catpv(flags,"IMPSET ");
if (DBIc_ACTIVE(imp_xxh)) sv_catpv(flags,"Active "); if (DBIc_ACTIVE(imp_xxh)) sv_catpv(flags,"Active ");
if (DBIc_WARN(imp_xxh)) sv_catpv(flags,"Warn "); if (DBIc_WARN(imp_xxh)) sv_catpv(flags,"Warn ");
if (DBIc_COMPAT(imp_xxh)) sv_catpv(flags,"CompatMode "); if (DBIc_COMPAT(imp_xxh)) sv_catpv(flags,"CompatMode ");
if (DBIc_is(imp_xxh, DBIcf_ChopBlanks)) sv_catpv(flags,"ChopBlanks "); if (DBIc_is(imp_xxh, DBIcf_ChopBlanks)) sv_catpv(flags,"ChopBlanks ");
if (DBIc_is(imp_xxh, DBIcf_HandleSetErr)) sv_catpv(flags,"HandleSetErr "); if (DBIc_is(imp_xxh, DBIcf_HandleSetErr)) sv_catpv(flags,"HandleSetErr ");
if (DBIc_is(imp_xxh, DBIcf_HandleError)) sv_catpv(flags,"HandleError "); if (DBIc_is(imp_xxh, DBIcf_HandleError)) sv_catpv(flags,"HandleError ");
if (DBIc_is(imp_xxh, DBIcf_RaiseError)) sv_catpv(flags,"RaiseError "); if (DBIc_is(imp_xxh, DBIcf_RaiseError)) sv_catpv(flags,"RaiseError ");
if (DBIc_is(imp_xxh, DBIcf_PrintError)) sv_catpv(flags,"PrintError "); if (DBIc_is(imp_xxh, DBIcf_PrintError)) sv_catpv(flags,"PrintError ");
if (DBIc_is(imp_xxh, DBIcf_RaiseWarn)) sv_catpv(flags,"RaiseWarn ");
if (DBIc_is(imp_xxh, DBIcf_PrintWarn)) sv_catpv(flags,"PrintWarn "); if (DBIc_is(imp_xxh, DBIcf_PrintWarn)) sv_catpv(flags,"PrintWarn ");
if (DBIc_is(imp_xxh, DBIcf_ShowErrorStatement)) sv_catpv(flags,"ShowErro rStatement "); if (DBIc_is(imp_xxh, DBIcf_ShowErrorStatement)) sv_catpv(flags,"ShowErro rStatement ");
if (DBIc_is(imp_xxh, DBIcf_AutoCommit)) sv_catpv(flags,"AutoCommit "); if (DBIc_is(imp_xxh, DBIcf_AutoCommit)) sv_catpv(flags,"AutoCommit ");
if (DBIc_is(imp_xxh, DBIcf_BegunWork)) sv_catpv(flags,"BegunWork "); if (DBIc_is(imp_xxh, DBIcf_BegunWork)) sv_catpv(flags,"BegunWork ");
if (DBIc_is(imp_xxh, DBIcf_LongTruncOk)) sv_catpv(flags,"LongTruncOk "); if (DBIc_is(imp_xxh, DBIcf_LongTruncOk)) sv_catpv(flags,"LongTruncOk ");
if (DBIc_is(imp_xxh, DBIcf_MultiThread)) sv_catpv(flags,"MultiThread "); if (DBIc_is(imp_xxh, DBIcf_MultiThread)) sv_catpv(flags,"MultiThread ");
if (DBIc_is(imp_xxh, DBIcf_TaintIn)) sv_catpv(flags,"TaintIn "); if (DBIc_is(imp_xxh, DBIcf_TaintIn)) sv_catpv(flags,"TaintIn ");
if (DBIc_is(imp_xxh, DBIcf_TaintOut)) sv_catpv(flags,"TaintOut "); if (DBIc_is(imp_xxh, DBIcf_TaintOut)) sv_catpv(flags,"TaintOut ");
if (DBIc_is(imp_xxh, DBIcf_Profile)) sv_catpv(flags,"Profile "); if (DBIc_is(imp_xxh, DBIcf_Profile)) sv_catpv(flags,"Profile ");
if (DBIc_is(imp_xxh, DBIcf_Callbacks)) sv_catpv(flags,"Callbacks "); if (DBIc_is(imp_xxh, DBIcf_Callbacks)) sv_catpv(flags,"Callbacks ");
skipping to change at line 2097 skipping to change at line 2073
} }
else if (strEQ(key, "LongTruncOk")) { else if (strEQ(key, "LongTruncOk")) {
DBIc_set(imp_xxh,DBIcf_LongTruncOk, on); DBIc_set(imp_xxh,DBIcf_LongTruncOk, on);
} }
else if (strEQ(key, "RaiseError")) { else if (strEQ(key, "RaiseError")) {
DBIc_set(imp_xxh,DBIcf_RaiseError, on); DBIc_set(imp_xxh,DBIcf_RaiseError, on);
} }
else if (strEQ(key, "PrintError")) { else if (strEQ(key, "PrintError")) {
DBIc_set(imp_xxh,DBIcf_PrintError, on); DBIc_set(imp_xxh,DBIcf_PrintError, on);
} }
else if (strEQ(key, "RaiseWarn")) {
DBIc_set(imp_xxh,DBIcf_RaiseWarn, on);
}
else if (strEQ(key, "PrintWarn")) { else if (strEQ(key, "PrintWarn")) {
DBIc_set(imp_xxh,DBIcf_PrintWarn, on); DBIc_set(imp_xxh,DBIcf_PrintWarn, on);
} }
else if (strEQ(key, "HandleError")) { else if (strEQ(key, "HandleError")) {
if ( on && (!SvROK(valuesv) || (SvTYPE(SvRV(valuesv)) != SVt_PVCV)) ) { if ( on && (!SvROK(valuesv) || (SvTYPE(SvRV(valuesv)) != SVt_PVCV)) ) {
croak("Can't set %s to '%s'", "HandleError", neatsvpv(valuesv,0)); croak("Can't set %s to '%s'", "HandleError", neatsvpv(valuesv,0));
} }
DBIc_set(imp_xxh,DBIcf_HandleError, on); DBIc_set(imp_xxh,DBIcf_HandleError, on);
cacheit = 1; /* child copy setup by dbih_setup_handle() */ cacheit = 1; /* child copy setup by dbih_setup_handle() */
} }
skipping to change at line 2539 skipping to change at line 2518
} }
else if (keylen==9 && strEQ(key, "PrintWarn")) { else if (keylen==9 && strEQ(key, "PrintWarn")) {
valuesv = boolSV(DBIc_has(imp_xxh,DBIcf_PrintWarn)); valuesv = boolSV(DBIc_has(imp_xxh,DBIcf_PrintWarn));
} }
break; break;
case 'R': case 'R':
if (keylen==10 && strEQ(key, "RaiseError")) { if (keylen==10 && strEQ(key, "RaiseError")) {
valuesv = boolSV(DBIc_has(imp_xxh,DBIcf_RaiseError)); valuesv = boolSV(DBIc_has(imp_xxh,DBIcf_RaiseError));
} }
else if (keylen==9 && strEQ(key, "RaiseWarn")) {
valuesv = boolSV(DBIc_has(imp_xxh,DBIcf_RaiseWarn));
}
else if (keylen==12 && strEQ(key, "RowCacheSize")) { else if (keylen==12 && strEQ(key, "RowCacheSize")) {
valuesv = &PL_sv_undef; valuesv = &PL_sv_undef;
} }
break; break;
case 'S': case 'S':
if (keylen==18 && strEQ(key, "ShowErrorStatement")) { if (keylen==18 && strEQ(key, "ShowErrorStatement")) {
valuesv = boolSV(DBIc_has(imp_xxh,DBIcf_ShowErrorStatement)); valuesv = boolSV(DBIc_has(imp_xxh,DBIcf_ShowErrorStatement));
} }
break; break;
skipping to change at line 2858 skipping to change at line 2840
if (PL_dirty && instr(method_pv, "DESTROY")) if (PL_dirty && instr(method_pv, "DESTROY"))
return &PL_sv_undef; return &PL_sv_undef;
h_hv = (HV*)SvRV(dbih_inner(aTHX_ h, "dbi_profile")); h_hv = (HV*)SvRV(dbih_inner(aTHX_ h, "dbi_profile"));
profile = *hv_fetch(h_hv, "Profile", 7, 1); profile = *hv_fetch(h_hv, "Profile", 7, 1);
if (profile && SvMAGICAL(profile)) if (profile && SvMAGICAL(profile))
mg_get(profile); /* FETCH */ mg_get(profile); /* FETCH */
if (!profile || !SvROK(profile)) { if (!profile || !SvROK(profile)) {
DBIc_set(imp_xxh, DBIcf_Profile, 0); /* disable */ DBIc_set(imp_xxh, DBIcf_Profile, 0); /* disable */
if (SvOK(profile) && !PL_dirty) if (!PL_dirty) {
warn("Profile attribute isn't a hash ref (%s,%ld)", neatsvpv(profile if (!profile)
,0), (long)SvTYPE(profile)); warn("Profile attribute does not exist");
else if (SvOK(profile))
warn("Profile attribute isn't a hash ref (%s,%ld)", neatsvpv(pro
file,0), (long)SvTYPE(profile));
}
return &PL_sv_undef; return &PL_sv_undef;
} }
/* statement_sv: undef = use $h->{Statement}, "" (&sv_no) = use empty string */ /* statement_sv: undef = use $h->{Statement}, "" (&sv_no) = use empty string */
if (!SvOK(statement_sv)) { if (!SvOK(statement_sv)) {
SV **psv = hv_fetch(h_hv, "Statement", 9, 0); SV **psv = hv_fetch(h_hv, "Statement", 9, 0);
statement_sv = (psv && SvOK(*psv)) ? *psv : &PL_sv_no; statement_sv = (psv && SvOK(*psv)) ? *psv : &PL_sv_no;
} }
statement_pv = SvPV_nolen(statement_sv); statement_pv = SvPV_nolen(statement_sv);
skipping to change at line 3952 skipping to change at line 3938
if (SvOK(DBIc_ERR(imp_xxh_new))) { if (SvOK(DBIc_ERR(imp_xxh_new))) {
set_err_sv(h, imp_xxh, DBIc_ERR(imp_xxh_new), DBIc_ERRSTR(imp_xxh_ne w), DBIc_STATE(imp_xxh_new), &PL_sv_no); set_err_sv(h, imp_xxh, DBIc_ERR(imp_xxh_new), DBIc_ERRSTR(imp_xxh_ne w), DBIc_STATE(imp_xxh_new), &PL_sv_no);
} }
} }
if ( !keep_error /* is a new err/warn/info */ if ( !keep_error /* is a new err/warn/info */
&& !is_nested_call /* skip nested (internal) calls */ && !is_nested_call /* skip nested (internal) calls */
&& ( && (
/* is an error and has RaiseError|PrintError|HandleError set */ /* is an error and has RaiseError|PrintError|HandleError set */
(SvTRUE(err_sv) && DBIc_has(imp_xxh, DBIcf_RaiseError|DBIcf_PrintErro r|DBIcf_HandleError)) (SvTRUE(err_sv) && DBIc_has(imp_xxh, DBIcf_RaiseError|DBIcf_PrintErro r|DBIcf_HandleError))
/* is a warn (not info) and has PrintWarn set */ /* is a warn (not info) and has RaiseWarn|PrintWarn set
|| ( SvOK(err_sv) && strlen(SvPV_nolen(err_sv)) && DBIc_has(imp_xxh, DB */
Icf_PrintWarn)) || ( SvOK(err_sv) && strlen(SvPV_nolen(err_sv)) && DBIc_has(imp_xxh, DB
Icf_RaiseWarn|DBIcf_PrintWarn))
) )
) { ) {
SV *msg; SV *msg;
SV **statement_svp = NULL; SV **statement_svp = NULL;
const int is_warning = (!SvTRUE(err_sv) && strlen(SvPV_nolen(err_sv))==1 ); const int is_warning = (!SvTRUE(err_sv) && strlen(SvPV_nolen(err_sv))==1 );
const char *err_meth_name = meth_name; const char *err_meth_name = meth_name;
char intro[200]; char intro[200];
if (meth_type == methtype_set_err) { if (meth_type == methtype_set_err) {
SV **sem_svp = hv_fetch((HV*)SvRV(h), "dbi_set_err_method", 18, GV_A DDWARN); SV **sem_svp = hv_fetch((HV*)SvRV(h), "dbi_set_err_method", 18, GV_A DDWARN);
skipping to change at line 4014 skipping to change at line 4000
} }
if (0) { if (0) {
COP *cop = dbi_caller_cop(); COP *cop = dbi_caller_cop();
if (cop && (CopLINE(cop) != CopLINE(PL_curcop) || CopFILEGV(cop) != CopFILEGV(PL_curcop))) { if (cop && (CopLINE(cop) != CopLINE(PL_curcop) || CopFILEGV(cop) != CopFILEGV(PL_curcop))) {
dbi_caller_string(msg, cop, " called via ", 1, 0); dbi_caller_string(msg, cop, " called via ", 1, 0);
} }
} }
hook_svp = NULL; hook_svp = NULL;
if ( SvTRUE(err_sv) if ( (SvTRUE(err_sv) || (is_warning && DBIc_has(imp_xxh, DBIcf_RaiseWa rn)))
&& DBIc_has(imp_xxh, DBIcf_HandleError) && DBIc_has(imp_xxh, DBIcf_HandleError)
&& (hook_svp = hv_fetch((HV*)SvRV(h),"HandleError",11,0)) && (hook_svp = hv_fetch((HV*)SvRV(h),"HandleError",11,0))
&& hook_svp && SvOK(*hook_svp) && hook_svp && SvOK(*hook_svp)
) { ) {
dSP; dSP;
PerlIO *logfp = DBILOGFP; PerlIO *logfp = DBILOGFP;
IV items; IV items;
SV *status; SV *status;
SV *result; /* point to result SV that's pointed to by the stack */ SV *result; /* point to result SV that's pointed to by the stack */
if (outitems) { if (outitems) {
skipping to change at line 4065 skipping to change at line 4051
); );
if (!SvTRUE(status)) /* handler says it didn't handle it, so... */ if (!SvTRUE(status)) /* handler says it didn't handle it, so... */
hook_svp = 0; /* pretend we didn't have a handler... */ hook_svp = 0; /* pretend we didn't have a handler... */
} }
if (profile_t1) { /* see also dbi_profile() call a few lines below */ if (profile_t1) { /* see also dbi_profile() call a few lines below */
SV *statement_sv = (is_unrelated_to_Statement) ? &PL_sv_no : &PL_sv_ undef; SV *statement_sv = (is_unrelated_to_Statement) ? &PL_sv_no : &PL_sv_ undef;
dbi_profile(h, imp_xxh, statement_sv, imp_msv ? imp_msv : (SV*)cv, dbi_profile(h, imp_xxh, statement_sv, imp_msv ? imp_msv : (SV*)cv,
profile_t1, dbi_time()); profile_t1, dbi_time());
} }
if (is_warning) { if (!hook_svp && is_warning) {
if (DBIc_has(imp_xxh, DBIcf_PrintWarn)) if (DBIc_has(imp_xxh, DBIcf_PrintWarn))
warn_sv(msg); warn_sv(msg);
if (DBIc_has(imp_xxh, DBIcf_RaiseWarn))
croak_sv(msg);
} }
else if (!hook_svp && SvTRUE(err_sv)) { else if (!hook_svp && SvTRUE(err_sv)) {
if (DBIc_has(imp_xxh, DBIcf_PrintError)) if (DBIc_has(imp_xxh, DBIcf_PrintError))
warn_sv(msg); warn_sv(msg);
if (DBIc_has(imp_xxh, DBIcf_RaiseError)) if (DBIc_has(imp_xxh, DBIcf_RaiseError))
croak_sv(msg); croak_sv(msg);
} }
} }
else if (profile_t1) { /* see also dbi_profile() call a few lines above */ else if (profile_t1) { /* see also dbi_profile() call a few lines above */
SV *statement_sv = (is_unrelated_to_Statement) ? &PL_sv_no : &PL_sv_unde f; SV *statement_sv = (is_unrelated_to_Statement) ? &PL_sv_no : &PL_sv_unde f;
skipping to change at line 4989 skipping to change at line 4977
void void
connected(...) connected(...)
CODE: CODE:
/* defined here just to avoid AUTOLOAD */ /* defined here just to avoid AUTOLOAD */
(void)cv; (void)cv;
(void)items; (void)items;
ST(0) = &PL_sv_undef; ST(0) = &PL_sv_undef;
SV * SV *
preparse(dbh, statement, ps_accept, ps_return, foo=Nullch) preparse(dbh, statement, ps_return, ps_accept, foo=Nullch)
SV * dbh SV * dbh
char * statement char * statement
IV ps_accept
IV ps_return IV ps_return
IV ps_accept
void *foo void *foo
void void
take_imp_data(h) take_imp_data(h)
SV * h SV * h
PREINIT: PREINIT:
/* take_imp_data currently in DBD::_::db not DBD::_::common, so for dbh's on ly */ /* take_imp_data currently in DBD::_::db not DBD::_::common, so for dbh's on ly */
D_imp_xxh(h); D_imp_xxh(h);
MAGIC *mg; MAGIC *mg;
SV *imp_xxh_sv; SV *imp_xxh_sv;
skipping to change at line 5167 skipping to change at line 5155
sv_setsv(AvARRAY(dst_av)[i], AvARRAY(src_av)[i]); sv_setsv(AvARRAY(dst_av)[i], AvARRAY(src_av)[i]);
} }
ST(0) = sv_2mortal(newRV_inc((SV*)dst_av)); ST(0) = sv_2mortal(newRV_inc((SV*)dst_av));
void void
bind_col(sth, col, ref, attribs=Nullsv) bind_col(sth, col, ref, attribs=Nullsv)
SV * sth SV * sth
SV * col SV * col
SV * ref SV * ref
SV * attribs SV * attribs
PREINIT:
SV *ret;
CODE: CODE:
DBD_ATTRIBS_CHECK("bind_col", sth, attribs); DBD_ATTRIBS_CHECK("bind_col", sth, attribs);
ST(0) = boolSV(dbih_sth_bind_col(sth, col, ref, attribs)); ret = boolSV(dbih_sth_bind_col(sth, col, ref, attribs));
ST(0) = ret;
(void)cv; (void)cv;
void void
fetchrow_array(sth) fetchrow_array(sth)
SV * sth SV * sth
ALIAS: ALIAS:
fetchrow = 1 fetchrow = 1
PPCODE: PPCODE:
SV *retsv; SV *retsv;
if (CvDEPTH(cv) == 99) { if (CvDEPTH(cv) == 99) {
skipping to change at line 5397 skipping to change at line 5388
CODE: CODE:
ST(0) = &PL_sv_yes; ST(0) = &PL_sv_yes;
if (!dbih_set_attr_k(h, keysv, 0, valuesv)) if (!dbih_set_attr_k(h, keysv, 0, valuesv))
ST(0) = &PL_sv_no; ST(0) = &PL_sv_no;
(void)cv; (void)cv;
void void
FETCH(h, keysv) FETCH(h, keysv)
SV * h SV * h
SV * keysv SV * keysv
PREINIT:
SV *ret;
CODE: CODE:
ST(0) = dbih_get_attr_k(h, keysv, 0); ret = dbih_get_attr_k(h, keysv, 0);
ST(0) = ret;
(void)cv; (void)cv;
void void
DELETE(h, keysv) DELETE(h, keysv)
SV * h SV * h
SV * keysv SV * keysv
PREINIT:
SV *ret;
CODE: CODE:
/* only private_* keys can be deleted, for others DELETE acts like FETCH */ /* only private_* keys can be deleted, for others DELETE acts like FETCH */
/* because the DBI internals rely on certain handle attributes existing */ /* because the DBI internals rely on certain handle attributes existing */
if (strnEQ(SvPV_nolen(keysv),"private_",8)) if (strnEQ(SvPV_nolen(keysv),"private_",8))
ST(0) = hv_delete_ent((HV*)SvRV(h), keysv, 0, 0); ret = hv_delete_ent((HV*)SvRV(h), keysv, 0, 0);
else else
ST(0) = dbih_get_attr_k(h, keysv, 0); ret = dbih_get_attr_k(h, keysv, 0);
ST(0) = ret;
(void)cv; (void)cv;
void void
private_data(h) private_data(h)
SV * h SV * h
CODE: CODE:
D_imp_xxh(h); D_imp_xxh(h);
(void)cv; (void)cv;
ST(0) = sv_mortalcopy(DBIc_IMP_DATA(imp_xxh)); ST(0) = sv_mortalcopy(DBIc_IMP_DATA(imp_xxh));
 End of changes. 23 change blocks. 
45 lines changed or deleted 43 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)