diff options
author | Po Lu <luangruo@yahoo.com> | 2023-05-18 09:04:57 +0800 |
---|---|---|
committer | Po Lu <luangruo@yahoo.com> | 2023-05-18 09:04:57 +0800 |
commit | 074c0268fd32d6527e124cff386bb6b15cf90017 (patch) | |
tree | 62111c3c70d46a738f15514e988a707409ca45f4 /src/emacs-module.c | |
parent | db48eff8cf4a88393c0209f663ca194ee37fa747 (diff) | |
parent | 5ef169ed701fa4f850fdca5563cdd468207d5d4f (diff) | |
download | emacs-feature/android.tar.gz |
Merge remote-tracking branch 'origin/master' into feature/androidfeature/android
Diffstat (limited to 'src/emacs-module.c')
-rw-r--r-- | src/emacs-module.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/emacs-module.c b/src/emacs-module.c index 3d06ef0020a..86360a0f225 100644 --- a/src/emacs-module.c +++ b/src/emacs-module.c @@ -418,7 +418,7 @@ module_global_reference_p (emacs_value v, ptrdiff_t *n) } /* Only used for debugging, so we don't care about overflow, just make sure the operation is defined. */ - INT_ADD_WRAPV (*n, h->count, n); + ckd_add (n, *n, h->count); return false; } @@ -437,7 +437,7 @@ module_make_global_ref (emacs_env *env, emacs_value value) { Lisp_Object value = HASH_VALUE (h, i); struct module_global_reference *ref = XMODULE_GLOBAL_REFERENCE (value); - bool overflow = INT_ADD_WRAPV (ref->refcount, 1, &ref->refcount); + bool overflow = ckd_add (&ref->refcount, ref->refcount, 1); if (overflow) overflow_error (); MODULE_INTERNAL_CLEANUP (); @@ -675,7 +675,7 @@ module_funcall (emacs_env *env, emacs_value func, ptrdiff_t nargs, Lisp_Object *newargs; USE_SAFE_ALLOCA; ptrdiff_t nargs1; - if (INT_ADD_WRAPV (nargs, 1, &nargs1)) + if (ckd_add (&nargs1, nargs, 1)) overflow_error (); SAFE_ALLOCA_LISP (newargs, nargs1); newargs[0] = value_to_lisp (func); |