From 64c58011b7a626dabbb2bc302cd25769f039e3ed Mon Sep 17 00:00:00 2001 From: Po Lu Date: Sat, 30 Sep 2023 08:30:59 +0800 Subject: [PATCH] Fix last change * src/search.c (Fre__describe_compiled): Correct typos and pointer signedness missmatch. --- src/search.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/search.c b/src/search.c index 014fd97d423..e9b29bb7179 100644 --- a/src/search.c +++ b/src/search.c @@ -3391,13 +3391,13 @@ If RAW is non-nil, just return the actual bytecode. */) !NILP (BVAR (current_buffer, enable_multibyte_characters))); if (!NILP (raw)) - return make_unibyte_string (cache_entry->buf.buffer, + return make_unibyte_string ((char *) cache_entry->buf.buffer, cache_entry->buf.used); else { /* FIXME: Why ENABLE_CHECKING? */ -#if !ENABLE_CHECKING +#if !defined ENABLE_CHECKING error ("Not available: rebuild with --enable-checking"); -#elsif HAVE_OPEN_MEMSTREAM +#elif HAVE_OPEN_MEMSTREAM char *buffer = NULL; size_t size = 0; FILE* f = open_memstream (&buffer, &size); @@ -3410,10 +3410,10 @@ If RAW is non-nil, just return the actual bytecode. */) Lisp_Object description = make_unibyte_string (buffer, size); free (buffer); return description; -#else +#else /* ENABLE_CHECKING && !HAVE_OPEN_MEMSTREAM */ print_compiled_pattern (stderr, &cache_entry->buf); return build_string ("Description was sent to standard error"); -#endif +#endif /* !ENABLE_CHECKING */ } } -- 2.39.5