From: Po Lu Date: Fri, 28 Mar 2025 08:10:12 +0000 (+0800) Subject: Miscellaneous corrections X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e4ddd063a8475934b884db6a0913264fb567f485;p=emacs.git Miscellaneous corrections * src/buffer.h (BUF_PTR_BYTE_POS): Fix comment. * src/profiler.c (add_sample): Use BASE_EQ. (cherry picked from commit ed3d8bb298bf4c7ef39a08392ace3271686cd5c0) --- diff --git a/src/buffer.h b/src/buffer.h index 5c0a6ab3118..d19ff22babd 100644 --- a/src/buffer.h +++ b/src/buffer.h @@ -1351,8 +1351,8 @@ BUF_CHAR_ADDRESS (struct buffer *buf, ptrdiff_t pos) + (pos < buf->text->gpt ? 0 : buf->text->gap_size)); } -/* Convert PTR, the address of a char in buffer BUF, - into a character position. */ +/* Convert PTR, the address of a char in buffer BUF, into a byte + position. */ INLINE ptrdiff_t BUF_PTR_BYTE_POS (struct buffer *buf, unsigned char *ptr) diff --git a/src/profiler.c b/src/profiler.c index 43409688a93..12d75012c79 100644 --- a/src/profiler.c +++ b/src/profiler.c @@ -325,7 +325,7 @@ record_backtrace (struct profiler_log *plog, EMACS_INT count) static void add_sample (struct profiler_log *plog, EMACS_INT count) { - if (EQ (backtrace_top_function (), QAutomatic_GC)) /* bug#60237 */ + if (BASE_EQ (backtrace_top_function (), QAutomatic_GC)) /* bug#60237 */ /* Special case the time-count inside GC because the hash-table code is not prepared to be used while the GC is running. More specifically it uses ASIZE at many places where it does