[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/sqlite3 71d35506ec 07/62: minor adjustment to Makefile
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/sqlite3 71d35506ec 07/62: minor adjustment to Makefile |
Date: |
Tue, 14 Mar 2023 11:01:44 -0400 (EDT) |
branch: elpa/sqlite3
commit 71d35506ec5c334ebdfcdeae906a2987959d5889
Author: Y. N. Lo <gordonynlo@yahoo.com>
Commit: Y. N. Lo <gordonynlo@yahoo.com>
minor adjustment to Makefile
---
Makefile | 4 ++--
sqlite3-api-module.c | 33 +++++++++++++++++++++++++++++++++
2 files changed, 35 insertions(+), 2 deletions(-)
diff --git a/Makefile b/Makefile
index d3c714837f..645be9cbf0 100644
--- a/Makefile
+++ b/Makefile
@@ -4,12 +4,12 @@ EMACS252=$(HOME)/test-emacs/bin/emacs
EMACS251=$(HOME)/test-emacs-251/bin/emacs
MODULE=sqlite3-api-module.so
-all: $(MODULE) misc
+all: $(MODULE)
clean:
rm -f *.so *.o
-misc:
+consts:
(cd tools; ./run.sh)
%.so: %.o
diff --git a/sqlite3-api-module.c b/sqlite3-api-module.c
index 15c3c54922..28ec06320d 100644
--- a/sqlite3-api-module.c
+++ b/sqlite3-api-module.c
@@ -820,6 +820,34 @@ static emacs_value sqlite3_api_last_insert_rowid(
return env->make_integer(env, (intmax_t)sqlite3_last_insert_rowid(dbh));
}
+
+#if 0
+/* sqlite version >= 3.18 only */
+static emacs_value sqlite3_api_set_last_insert_rowid(
+ emacs_env *env,
+ ptrdiff_t n,
+ emacs_value *args,
+ void *ptr) {
+ (void)ptr;
+ (void)n;
+
+ if (!env->is_not_nil(env, args[0])) {
+ WARN(env, "%s: database handle is nil", __func__);
+ return SYM(env, "nil");
+ }
+
+ sqlite3 *dbh = (sqlite3 *)env->get_user_ptr(env, args[0]);
+ NON_LOCAL_EXIT_CHECK(env);
+
+ sqlite3_int64 rowid = env->extract_integer(env, args[1]);
+ NON_LOCAL_EXIT_CHECK(env);
+
+ sqlite3_set_last_insert_rowid(dbh, rowid);
+
+ return SYM(env, "nil");
+}
+#endif
+
static emacs_value sqlite3_api_set_log_level(
emacs_env *env,
ptrdiff_t n,
@@ -917,6 +945,11 @@ int emacs_module_init(struct emacs_runtime *ert) {
"Reset a prepared SQL statement." },
{ "sqlite3-last-insert-rowid", 1, 1, sqlite3_api_last_insert_rowid,
"Return last insert rowid." },
+#if 0
+ { "sqlite3-set-last-insert-rowid", 2, 2,
+ sqlite3_api_set_last_insert_rowid,
+ "Set last insert rowid." },
+#endif
{ "sqlite3-get-autocommit", 1, 1, sqlite3_api_get_autocommit,
"Test for auto-commit mode." },
{ "sqlite3-exec", 2, 3, sqlite3_api_exec,
- [nongnu] elpa/sqlite3 04fc60e2cf 01/62: Initial commit, (continued)
- [nongnu] elpa/sqlite3 04fc60e2cf 01/62: Initial commit, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 48c913559f 03/62: -std=c99 to Makefile, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 94f0c69538 06/62: improved doc, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 ce41ac18bc 02/62: first commit, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 8ad45baacf 05/62: fixed memory leak; used sqlite3_close_v2, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 ed7ea9c919 18/62: removed sqlite3-api-constants.el from repo, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 0bae137c63 26/62: LIB and INC added to Makefile, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 9e6dbe5d37 15/62: fixed typo, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 0131cc617d 19/62: python3 -> python, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 7abb3c6f70 28/62: fixed callback example; added Homebrew linkage, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 71d35506ec 07/62: minor adjustment to Makefile,
ELPA Syncer <=
- [nongnu] elpa/sqlite3 a2d5e39133 43/62: Removed unused codes from consts.c, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 b72c2c40d9 44/62: Better handling of SQLite codes in consts.c, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 a51467b031 04/62: added test for Emacs 25.1, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 1f1f7ab2db 09/62: added package creation section, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 1b7b1fc03f 10/62: fixed module installation bug, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 a69ff5a456 11/62: github installation function added, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 47391311a9 12/62: edited sqlite3-api.el to adhere to melpa guidelines, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 723787e6d9 21/62: added 'make install', ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 77e719fb88 24/62: better comments, ELPA Syncer, 2023/03/14
- [nongnu] elpa/sqlite3 0dfe8e07df 30/62: 26.1 test added, ELPA Syncer, 2023/03/14