diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-03-14 12:49:08 -0400 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2024-03-18 09:32:53 -0400 |
commit | 63e67916b01569da5bb24f6d9a354dc72897c468 (patch) | |
tree | bb192d43d3e87a0945f0f05967da310aae29030a /src | |
parent | e624bc62752ceb2e60940c5fd9cb6e70611df71c (diff) | |
download | emacs-63e67916b01569da5bb24f6d9a354dc72897c468.tar.gz |
Followup changes to `cl-type-of`
These changes came up while working on `cl-type-of` but are not
directly related to the new `cl-type-of`.
The BASE_PURESIZE bump was needed at some point on one of my
machine, not sure why.
* src/puresize.h (BASE_PURESIZE): Bump up.
* src/sqlite.c (bind_value): Don't use `Ftype_of`.
* lisp/emacs-lisp/seq.el (seq-remove-at-position): Simplify.
* lisp/emacs-lisp/cl-preloaded.el (finalizer):
New (previously missing) type.
* doc/lispref/objects.texi (Type Predicates): Minor tweaks.
Diffstat (limited to 'src')
-rw-r--r-- | src/lisp.h | 6 | ||||
-rw-r--r-- | src/puresize.h | 2 | ||||
-rw-r--r-- | src/sqlite.c | 17 |
3 files changed, 9 insertions, 16 deletions
diff --git a/src/lisp.h b/src/lisp.h index f353e4956eb..f86758c88fb 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -569,10 +569,8 @@ enum Lisp_Fwd_Type your object -- this way, the same object could be used to represent several disparate C structures. - In addition, you need to add switch branches in data.c for Ftype_of. - - You also need to add the new type to the constant - `cl--typeof-types' in lisp/emacs-lisp/cl-preloaded.el. */ + In addition, you need to add switch branches in data.c for Fcl_type_of + and `cl--define-builtin-type` in lisp/emacs-lisp/cl-preloaded.el. */ /* A Lisp_Object is a tagged pointer or integer. Ordinarily it is a diff --git a/src/puresize.h b/src/puresize.h index ac5d2da30dc..2a716872832 100644 --- a/src/puresize.h +++ b/src/puresize.h @@ -47,7 +47,7 @@ INLINE_HEADER_BEGIN #endif #ifndef BASE_PURESIZE -#define BASE_PURESIZE (2750000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) +#define BASE_PURESIZE (3000000 + SYSTEM_PURESIZE_EXTRA + SITELOAD_PURESIZE_EXTRA) #endif /* Increase BASE_PURESIZE by a ratio depending on the machine's word size. */ diff --git a/src/sqlite.c b/src/sqlite.c index 7a018b28aa4..261080da673 100644 --- a/src/sqlite.c +++ b/src/sqlite.c @@ -349,9 +349,7 @@ bind_values (sqlite3 *db, sqlite3_stmt *stmt, Lisp_Object values) value = XCAR (values); values = XCDR (values); } - Lisp_Object type = Ftype_of (value); - - if (EQ (type, Qstring)) + if (STRINGP (value)) { Lisp_Object encoded; bool blob = false; @@ -385,14 +383,11 @@ bind_values (sqlite3 *db, sqlite3_stmt *stmt, Lisp_Object values) SSDATA (encoded), SBYTES (encoded), NULL); } - else if (EQ (type, Qinteger)) - { - if (BIGNUMP (value)) - ret = sqlite3_bind_int64 (stmt, i + 1, bignum_to_intmax (value)); - else - ret = sqlite3_bind_int64 (stmt, i + 1, XFIXNUM (value)); - } - else if (EQ (type, Qfloat)) + else if (FIXNUMP (value)) + ret = sqlite3_bind_int64 (stmt, i + 1, XFIXNUM (value)); + else if (BIGNUMP (value)) + ret = sqlite3_bind_int64 (stmt, i + 1, bignum_to_intmax (value)); + else if (FLOATP (value)) ret = sqlite3_bind_double (stmt, i + 1, XFLOAT_DATA (value)); else if (NILP (value)) ret = sqlite3_bind_null (stmt, i + 1); |