diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2019-01-31 15:31:41 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2019-01-31 15:33:21 -0800 |
commit | 47679e63230da94cffed568a4d5167ffc1baea96 (patch) | |
tree | 45a1f8a1ed3fe07174d509205a4ba1d393435758 /src/pdumper.h | |
parent | 05d2fc7170fb66a87601b1c76ddae2c1b7b4b934 (diff) | |
download | emacs-47679e63230da94cffed568a4d5167ffc1baea96.tar.gz emacs-47679e63230da94cffed568a4d5167ffc1baea96.tar.bz2 emacs-47679e63230da94cffed568a4d5167ffc1baea96.zip |
Prefer static to extern where either will do
* src/charset.c (charset_table_size):
* src/pdumper.c (dump_private):
* src/sysdep.c (init_sigsegv):
* src/window.c (old_selected_window):
Now static.
* src/charset.c (charset_table_size):
Now int, since the value always fits in int.
* src/gtkutil.c (xg_gtk_initialized): Now present only if
HAVE_XWIDGETS, to make it clearer that this is an xwidgets
hack. All uses changed.
* src/lread.c (ndefsubr): Remove; unused.
* src/pdumper.h: Use usual GNU indenting style for functions,
since my static-vs-extern checking hack relies on it.
(dump_public): Always declare; simpler and doesn’t hurt.
(pdumper_handle_page_fault): Remove unused decl.
Diffstat (limited to 'src/pdumper.h')
-rw-r--r-- | src/pdumper.h | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/src/pdumper.h b/src/pdumper.h index 90c744f0a4e..7be8a8f8775 100644 --- a/src/pdumper.h +++ b/src/pdumper.h @@ -52,8 +52,7 @@ INLINE_HEADER_BEGIN extern void pdumper_remember_scalar_impl (void *data, ptrdiff_t nbytes); -INLINE -void +INLINE void pdumper_remember_scalar (void *data, ptrdiff_t nbytes) { #ifdef HAVE_PDUMPER @@ -70,8 +69,7 @@ extern void pdumper_remember_lv_ptr_raw_impl ( /* Remember the pointer at *PTR. *PTR must be null or point to a Lisp object. TYPE is the rough type of Lisp object to which *PTR points. */ -INLINE -void +INLINE void pdumper_remember_lv_ptr_raw (void* ptr, enum Lisp_Type type) { #ifdef HAVE_PDUMPER @@ -137,15 +135,12 @@ struct pdumper_loaded_dump { uintptr_t end; }; -#ifdef HAVE_PDUMPER extern struct pdumper_loaded_dump dump_public; -#endif /* Return whether the OBJ points somewhere into the loaded dump image. Works even when we have no dump loaded --- in this case, it just returns false. */ -INLINE _GL_ATTRIBUTE_CONST -bool +INLINE _GL_ATTRIBUTE_CONST bool pdumper_object_p (const void *obj) { #ifdef HAVE_PDUMPER @@ -163,8 +158,7 @@ extern bool pdumper_cold_object_p_impl (const void *obj); Only bool-vectors and floats should end up there. pdumper_object_p() and pdumper_object_p_precise() must have returned true for OBJ before calling this function. */ -INLINE _GL_ATTRIBUTE_CONST -bool +INLINE _GL_ATTRIBUTE_CONST bool pdumper_cold_object_p (const void *obj) { #ifdef HAVE_PDUMPER @@ -181,8 +175,7 @@ extern enum Lisp_Type pdumper_find_object_type_impl (const void *obj); /* Return the type of the dumped object that starts at OBJ. It is a programming error to call this routine for an OBJ for which pdumper_object_p would return false. */ -INLINE _GL_ATTRIBUTE_CONST -enum Lisp_Type +INLINE _GL_ATTRIBUTE_CONST enum Lisp_Type pdumper_find_object_type (const void *obj) { #ifdef HAVE_PDUMPER @@ -197,8 +190,7 @@ pdumper_find_object_type (const void *obj) the loaded dump image. It is a programming error to call this routine for an OBJ for which pdumper_object_p would return false. */ -INLINE _GL_ATTRIBUTE_CONST -bool +INLINE _GL_ATTRIBUTE_CONST bool pdumper_object_p_precise (const void *obj) { #ifdef HAVE_PDUMPER @@ -214,8 +206,7 @@ extern bool pdumper_marked_p_impl (const void *obj); /* Return whether OBJ is marked according to the portable dumper. It is an error to call this routine for an OBJ for which pdumper_object_p_precise would return false. */ -INLINE -bool +INLINE bool pdumper_marked_p (const void *obj) { #ifdef HAVE_PDUMPER @@ -231,8 +222,7 @@ extern void pdumper_set_marked_impl (const void *obj); /* Set the pdumper mark bit for OBJ. It is a programming error to call this function with an OBJ for which pdumper_object_p_precise would return false. */ -INLINE -void +INLINE void pdumper_set_marked (const void *obj) { #ifdef HAVE_PDUMPER @@ -246,8 +236,7 @@ pdumper_set_marked (const void *obj) extern void pdumper_clear_marks_impl (void); /* Clear all the mark bits for pdumper objects. */ -INLINE -void +INLINE void pdumper_clear_marks (void) { #ifdef HAVE_PDUMPER @@ -255,11 +244,6 @@ pdumper_clear_marks (void) #endif } -/* Handle a page fault that occurs when we access the portable dumper - mapping. Return true iff the fault should be considered handled - and execution should resume. */ -bool pdumper_handle_page_fault (void *fault_addr_ptr); - /* Record the Emacs startup directory, relative to which the pdump file was loaded. */ extern void pdumper_record_wd (const char *); |