diff --git a/src/comp.c b/src/comp.c index 85b0983a6df..eacda5de550 100644 --- a/src/comp.c +++ b/src/comp.c @@ -866,7 +866,7 @@ emit_const_lisp_obj (Lisp_Object obj) emit_comment (format_string ("const lisp obj: %s", SSDATA (Fprin1_to_string (obj, Qnil)))); - if (Qnil == NULL && EQ (obj, Qnil)) + if (NIL_IS_ZERO && EQ (obj, Qnil)) return emit_cast (comp.lisp_obj_type, gcc_jit_context_new_rvalue_from_ptr (comp.ctxt, comp.void_ptr_type, diff --git a/src/data.c b/src/data.c index 191fb313687..8901ffbb2c3 100644 --- a/src/data.c +++ b/src/data.c @@ -919,7 +919,7 @@ Value, if non-nil, is a list (interactive SPEC). */) if (SUBRP (fun)) { - if (SUBR_NATIVE_COMPILEDP (fun) && XSUBR (fun)->native_intspec) + if (SUBR_NATIVE_COMPILEDP (fun) && !NILP (XSUBR (fun)->native_intspec)) return XSUBR (fun)->native_intspec; const char *spec = XSUBR (fun)->intspec; diff --git a/src/lisp.h b/src/lisp.h index 69db8cdef10..2d083dc4582 100644 --- a/src/lisp.h +++ b/src/lisp.h @@ -4761,7 +4761,7 @@ extern char *emacs_root_dir (void); INLINE bool SUBR_NATIVE_COMPILEDP (Lisp_Object a) { - return SUBRP (a) && XSUBR (a)->native_comp_u[0]; + return SUBRP (a) && !NILP (XSUBR (a)->native_comp_u[0]); } INLINE struct Lisp_Native_Comp_Unit * diff --git a/src/pdumper.c b/src/pdumper.c index 81d48496be2..a35cc7ffcd6 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -2948,13 +2948,13 @@ dump_subr (struct dump_context *ctx, const struct Lisp_Subr *subr) struct Lisp_Subr out; dump_object_start (ctx, &out, sizeof (out)); DUMP_FIELD_COPY (&out, subr, header.size); - if (NATIVE_COMP_FLAG && subr->native_comp_u[0]) + if (NATIVE_COMP_FLAG && !NILP (subr->native_comp_u[0])) out.function.a0 = NULL; else dump_field_emacs_ptr (ctx, &out, subr, &subr->function.a0); DUMP_FIELD_COPY (&out, subr, min_args); DUMP_FIELD_COPY (&out, subr, max_args); - if (NATIVE_COMP_FLAG && subr->native_comp_u[0]) + if (NATIVE_COMP_FLAG && !NILP (subr->native_comp_u[0])) { dump_field_fixup_later (ctx, &out, subr, &subr->symbol_name); dump_remember_cold_op (ctx, @@ -2973,7 +2973,7 @@ dump_subr (struct dump_context *ctx, const struct Lisp_Subr *subr) dump_field_lv (ctx, &out, subr, &subr->native_comp_u[0], WEIGHT_NORMAL); dump_off subr_off = dump_object_finish (ctx, &out, sizeof (out)); - if (ctx->flags.dump_object_contents && subr->native_comp_u[0]) + if (ctx->flags.dump_object_contents && !NILP (subr->native_comp_u[0])) /* We'll do the final addr relocation during VERY_LATE_RELOCS time after the compilation units has been loaded. */ dump_push (&ctx->dump_relocs[VERY_LATE_RELOCS],