Skip Menu |

This queue is for tickets about the SQLite-VirtualTable CPAN distribution.

Report information
The Basics
Id: 48977
Status: resolved
Worked: 20 min
Priority: 0/
Queue: SQLite-VirtualTable

People
Owner: Nobody in particular
Requestors: markkidwell [...] comcast.net
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.03
Fixed in: (no value)



Subject: Support for older perl and newer SQLite
Hi, 2 things: In Perl 5.8.4, the module doesn't seem to compile due to its use of "Newxz" in perlvtab.c. Using "Newz" lets it compile on that version. The module doesn't find the sqlite3ext.h file with newer SQLite distros, which do away with the src directory. Looking in the top level dir as well as src resolves this. See the attached patch for suggested fixes for both issues. After getting this working, the module worked great and is very useful! Thanks and regards, Mark
Subject: sqlite-vt.patch
diff -u -r SQLite-VirtualTable-0.03/Makefile.PL SQLite-VirtualTable-0.03-patched/Makefile.PL --- SQLite-VirtualTable-0.03/Makefile.PL 2006-07-13 02:53:16.000000000 -0700 +++ SQLite-VirtualTable-0.03-patched/Makefile.PL 2009-08-24 14:59:07.000000000 -0700 @@ -17,7 +17,7 @@ defined $sqlite_source or die "Usage: perl Makefile.PL SQLITE_SOURCE=/path/to/sqlite/source ...\n"; --f $sqlite_source . "/src/sqlite3ext.h" +(-f $sqlite_source . "/src/sqlite3ext.h" || -f $sqlite_source . "/sqlite3ext.h") or die "SQLite source not found on the path given\n"; WriteMakefile( NAME => 'SQLite::VirtualTable', Only in SQLite-VirtualTable-0.03-patched: Makefile.bak diff -u -r SQLite-VirtualTable-0.03/perlvtab.c SQLite-VirtualTable-0.03-patched/perlvtab.c --- SQLite-VirtualTable-0.03/perlvtab.c 2006-07-13 03:27:57.000000000 -0700 +++ SQLite-VirtualTable-0.03-patched/perlvtab.c 2009-08-24 13:44:38.000000000 -0700 @@ -117,7 +117,7 @@ if (rc != SQLITE_OK) goto cleanup; - Newxz(vtab, 1, perl_vtab); + Newz(0, vtab, 1, perl_vtab); vtab->sv = SvREFCNT_inc(vtabsv); vtab->db = db; #ifdef MULTIPLICITY @@ -287,7 +287,7 @@ goto cleanup; } - Newxz(cursor, 1, perl_vtab_cursor); + Newz(0, cursor, 1, perl_vtab_cursor); cursor->sv = SvREFCNT_inc(cursv); SvREFCNT_inc(vtabsv);
Subject: Re: [rt.cpan.org #48977] AutoReply: Support for older perl and newer SQLite
Date: Mon, 24 Aug 2009 23:09:57 +0000 (UTC)
To: bug-SQLite-VirtualTable [...] rt.cpan.org
From: markkidwell [...] comcast.net
Hi, After sending this I realized my patch was way off - it's easier / better to use ppport.h. It's included in the distro, but not ref'd by the perlvtab.c file. This patch (produced by the ppport.h file in the distro) lets it compile on 5.8.4: --- SQLite-VirtualTable-0.03/perlvtab.c +++ SQLite-VirtualTable-0.03/perlvtab.c.patched @@ -3,6 +3,9 @@ #include "EXTERN.h" #include "perl.h" #include "XSUB.h" +#define NEED_newRV_noinc +#define NEED_sv_2pv_nolen +#include "ppport.h" #include <sqlite3ext.h> SQLITE_EXTENSION_INIT1 Thanks and regards, Mark Show quoted text
----- Original Message ----- From: "Bugs in SQLite-VirtualTable via RT" <bug-SQLite-VirtualTable@rt.cpan.org> To: markkidwell@comcast.net Sent: Monday, August 24, 2009 3:32:16 PM GMT -08:00 US/Canada Pacific Subject: [rt.cpan.org #48977] AutoReply: Support for older perl and newer SQLite Greetings, This message has been automatically generated in response to the creation of a trouble ticket regarding: "Support for older perl and newer SQLite", a summary of which appears below. There is no need to reply to this message right now. Your ticket has been assigned an ID of [rt.cpan.org #48977]. Your ticket is accessible on the web at: https://rt.cpan.org/Ticket/Display.html?id=48977 Please include the string: [rt.cpan.org #48977] in the subject line of all future correspondence about this issue. To do so, you may reply to this message. Thank you, bug-SQLite-VirtualTable@rt.cpan.org ------------------------------------------------------------------------- Hi, 2 things: In Perl 5.8.4, the module doesn't seem to compile due to its use of "Newxz" in perlvtab.c. Using "Newz" lets it compile on that version. The module doesn't find the sqlite3ext.h file with newer SQLite distros, which do away with the src directory. Looking in the top level dir as well as src resolves this. See the attached patch for suggested fixes for both issues. After getting this working, the module worked great and is very useful! Thanks and regards, Mark
Opps, sorry for being so late! A new version of the module has been released. Thanks for the report.