Merge lp://staging/~stewart/dbd-drizzle/fixup-for-modern-perl into lp://staging/dbd-drizzle

Proposed by Stewart Smith
Status: Needs review
Proposed branch: lp://staging/~stewart/dbd-drizzle/fixup-for-modern-perl
Merge into: lp://staging/dbd-drizzle
Diff against target: 128 lines (+23/-10)
4 files modified
ChangeLog (+4/-0)
constants.h (+1/-1)
dbdimp.c (+17/-8)
drizzle.xs (+1/-1)
To merge this branch: bzr merge lp://staging/~stewart/dbd-drizzle/fixup-for-modern-perl
Reviewer Review Type Date Requested Status
CaptTofu (community) approval Approve
Drizzle Trunk Pending
Review via email: mp+154577@code.staging.launchpad.net

Description of the change

now builds for me with this

To post a comment you must log in.
Revision history for this message
CaptTofu (capttofu) wrote :

Looks good to me!

review: Approve (approval)
Revision history for this message
Brian Aker (brianaker) wrote :
Download full text (4.3 KiB)

Go for it.

On Mar 20, 2013, at 7:47 PM, Stewart Smith <email address hidden> wrote:

> Stewart Smith has proposed merging lp:~stewart/dbd-drizzle/fixup-for-modern-perl into lp:dbd-drizzle.
>
> Requested reviews:
> Drizzle Trunk (drizzle-trunk)
>
> For more details, see:
> https://code.launchpad.net/~stewart/dbd-drizzle/fixup-for-modern-perl/+merge/154577
>
> now builds for me with this
> --
> https://code.launchpad.net/~stewart/dbd-drizzle/fixup-for-modern-perl/+merge/154577
> Your team Drizzle Trunk is requested to review the proposed merge of lp:~stewart/dbd-drizzle/fixup-for-modern-perl into lp:dbd-drizzle.
> === modified file 'ChangeLog'
> --- ChangeLog 2012-05-02 09:53:07 +0000
> +++ ChangeLog 2013-03-21 02:46:22 +0000
> @@ -1,3 +1,7 @@
> +2013-03-20 Stewart Smith <email address hidden> (0.305)
> +* Fixed up code to build with more modern perl (sv_yes now PL_sv_yes etc)
> +* Fixed up some #include to point to libdrizzle-1.0 (modern libdrizzle)
> +
> 2011-12-01 Patrick Galbraith <email address hidden> (0.305)
> * Fixed Makefile.PL to conform to changes in libdrizzle directory structure
> * Fixed Makefile.PL to assume 'root' user if not defined
>
> === modified file 'constants.h'
> --- constants.h 2012-05-02 09:53:07 +0000
> +++ constants.h 2013-03-21 02:46:22 +0000
> @@ -2,7 +2,7 @@
> #include "perl.h"
> #include "XSUB.h"
>
> -#include <libdrizzle/drizzle_client.h>
> +#include <libdrizzle-1.0/drizzle_client.h>
>
> static double drizzle_constant(char* name, char* arg) {
> errno = 0;
>
> === modified file 'dbdimp.c'
> --- dbdimp.c 2012-05-02 09:53:07 +0000
> +++ dbdimp.c 2013-03-21 02:46:22 +0000
> @@ -19,6 +19,15 @@
> typedef short WORD;
> #endif
>
> +/* Keep compatibility with older perl */
> +#ifndef PL_sv_yes
> +#define PL_sv_yes sv_yes
> +#endif
> +#ifndef PL_sv_undef
> +#define PL_sv_undef sv_undef
> +#endif
> +
> +
> DBISTATE_DECLARE;
>
> typedef struct sql_type_info_s
> @@ -896,7 +905,7 @@
> {
> SV* sv = DBIc_IMP_DATA(imp_dbh);
>
> - DBIc_set(imp_dbh, DBIcf_AutoCommit, &sv_yes);
> + DBIc_set(imp_dbh, DBIcf_AutoCommit, &PL_sv_yes);
> if (sv && SvROK(sv))
> {
> HV* hv = (HV*) SvRV(sv);
> @@ -1333,7 +1342,7 @@
> D_imp_xxh(drh);
>
> /* The disconnect_all concept is flawed and needs more work */
> - if (!dirty && !SvTRUE(perl_get_sv("DBI::PERL_ENDING",0))) {
> + if (!PL_dirty && !SvTRUE(perl_get_sv("DBI::PERL_ENDING",0))) {
> sv_setiv(DBIc_ERR(imp_drh), (IV)1);
> sv_setpv(DBIc_ERRSTR(imp_drh),
> (char*)"disconnect_all not implemented");
> @@ -1341,7 +1350,7 @@
> DBIc_ERR(imp_drh), DBIc_ERRSTR(imp_drh)); */
> return FALSE;
> }
> - perl_destruct_level = 0;
> + PL_perl_destruct_level = 0;
> return FALSE;
> }
>
> @@ -1576,7 +1585,7 @@
> {
> const char* version = drizzle_con_server_version(imp_dbh->con);
> result= version ?
> - sv_2mortal(newSVpv(version, strlen(version))) : &sv_undef;
> + sv_2mortal(newSVpv(version, strlen(version))) : &PL_sv_undef;
> }
> else if (strEQ(key, "sock"))
> result= sv_2mortal(newSViv((IV) imp_dbh->con));
> @@ -2562,7 +2571,7 @@
> break;
>
> default:
> - sv= &sv...

Read more...

Unmerged revisions

44. By Stewart Smith

fix up building with more modern perl

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches

to all changes: