]> git.eshelyaron.com Git - emacs.git/commitdiff
Miscellaneous corrections
authorPo Lu <luangruo@yahoo.com>
Fri, 28 Mar 2025 08:10:12 +0000 (16:10 +0800)
committerEshel Yaron <me@eshelyaron.com>
Fri, 28 Mar 2025 16:57:12 +0000 (17:57 +0100)
* src/buffer.h (BUF_PTR_BYTE_POS): Fix comment.

* src/profiler.c (add_sample): Use BASE_EQ.

(cherry picked from commit ed3d8bb298bf4c7ef39a08392ace3271686cd5c0)

src/buffer.h
src/profiler.c

index 5c0a6ab3118d92af337ed6f875b414df16f80b4a..d19ff22babd1e6be488e38fa1c4611776826fc0c 100644 (file)
@@ -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)
index 43409688a9314feccbc53bdd4459bc654f881200..12d75012c7958c2511cb62a64eefefd3131dcdd4 100644 (file)
@@ -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