From: David Pirotte <david@altosw.be>
To: guile-devel@gnu.org
Subject: guile-sqlite3 - patch
Date: Fri, 20 Jan 2012 14:57:49 -0200 [thread overview]
Message-ID: <20120120145749.73121594@altosw.be> (raw)
[-- Attachment #1: Type: text/plain, Size: 97 bytes --]
Hello,
Attached is a patch which defines and export sqlite3_enable_load_extension
Cheers,
David
[-- Attachment #2: 0001-sqlite3_enable_load_extension-added.patch --]
[-- Type: text/x-patch, Size: 1147 bytes --]
From 866e578beaf1eb89b1bb80b9c6347f62e8ee5c60 Mon Sep 17 00:00:00 2001
From: David Pirotte <david@altosw.be>
Date: Fri, 20 Jan 2012 14:38:13 -0200
Subject: [PATCH] sqlite3_enable_load_extension, added
Extension loading while evaluating user-entered SQL is disabled per default.
This API can be used to turn the sqlite3_load_extension() mechanism on and off.
---
sqlite3.scm | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/sqlite3.scm b/sqlite3.scm
index 2ac2f4b..f3c16ae 100644
--- a/sqlite3.scm
+++ b/sqlite3.scm
@@ -31,6 +31,7 @@
#:export (sqlite-open
sqlite-close
+ sqlite-enable-load-extension
sqlite-prepare
sqlite-bind
sqlite-column-names
@@ -180,6 +181,14 @@
db)
(sqlite-error #f 'sqlite-open ret (static-errcode->errmsg ret)))))))
+(define sqlite-enable-load-extension
+ (let ((ele (pointer->procedure
+ int
+ (dynamic-func "sqlite3_enable_load_extension" libsqlite3)
+ (list '* int))))
+ (lambda (db onoff)
+ (ele (db-pointer db) onoff))))
+
;;;
;;; SQL statements
;;;
--
1.7.8.3
next reply other threads:[~2012-01-20 16:57 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-20 16:57 David Pirotte [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-01-20 18:11 guile-sqlite3 - patch David Pirotte
2012-01-23 15:22 ` Andy Wingo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120120145749.73121594@altosw.be \
--to=david@altosw.be \
--cc=guile-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).