summaryrefslogtreecommitdiff
path: root/src/systime.h
diff options
context:
space:
mode:
authorPhilipp Stephani <phst@google.com>2019-04-24 13:17:53 +0200
committerPhilipp Stephani <phst@google.com>2019-04-24 13:17:53 +0200
commit534c33cf375182c97291d2dd242f936df5953321 (patch)
treea36d85bbc81ad93397bd9f81e962274ccb08f7ef /src/systime.h
parente290a7d1730c99010272bbff7f497c3041cef46d (diff)
downloademacs-534c33cf375182c97291d2dd242f936df5953321.tar.gz
emacs-534c33cf375182c97291d2dd242f936df5953321.tar.bz2
emacs-534c33cf375182c97291d2dd242f936df5953321.zip
Fix return type of make_time.
make_time is documented to return a (TICKS . HZ) pair, so we can’t use make_lisp_time. Introduce a new conversion function instead. * src/emacs-module.c (module_make_time): Use timespec_to_lisp to correct return type. * src/timefns.c (timespec_to_lisp): New function. (make_lisp_time): Use it. * test/src/emacs-module-tests.el (mod-test-add-nanosecond/valid): Check return type.
Diffstat (limited to 'src/systime.h')
-rw-r--r--src/systime.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/systime.h b/src/systime.h
index 89af0c5e3df..125b2f1385e 100644
--- a/src/systime.h
+++ b/src/systime.h
@@ -89,6 +89,7 @@ struct lisp_time
/* defined in timefns.c */
extern struct timeval make_timeval (struct timespec) ATTRIBUTE_CONST;
extern Lisp_Object make_lisp_time (struct timespec);
+extern Lisp_Object timespec_to_lisp (struct timespec);
extern bool list4_to_timespec (Lisp_Object, Lisp_Object, Lisp_Object,
Lisp_Object, struct timespec *);
extern struct timespec lisp_time_argument (Lisp_Object);