aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrea Corallo2019-12-27 17:02:23 +0100
committerAndrea Corallo2020-01-01 11:38:17 +0100
commit1c08dc82121d50e80bd2dcb0d1f39654cc6762dd (patch)
tree496bbf41061981375a32c9691b20ac4737f8f92e /src
parentf4cb9cc9034c09a8798df3d98f6fa9313a777a96 (diff)
downloademacs-1c08dc82121d50e80bd2dcb0d1f39654cc6762dd.tar.gz
emacs-1c08dc82121d50e80bd2dcb0d1f39654cc6762dd.zip
some rework to please --enable-check-lisp-object-type
Diffstat (limited to 'src')
-rw-r--r--src/comp.c2
-rw-r--r--src/data.c2
-rw-r--r--src/lisp.h2
-rw-r--r--src/pdumper.c6
4 files changed, 6 insertions, 6 deletions
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)
866 emit_comment (format_string ("const lisp obj: %s", 866 emit_comment (format_string ("const lisp obj: %s",
867 SSDATA (Fprin1_to_string (obj, Qnil)))); 867 SSDATA (Fprin1_to_string (obj, Qnil))));
868 868
869 if (Qnil == NULL && EQ (obj, Qnil)) 869 if (NIL_IS_ZERO && EQ (obj, Qnil))
870 return emit_cast (comp.lisp_obj_type, 870 return emit_cast (comp.lisp_obj_type,
871 gcc_jit_context_new_rvalue_from_ptr (comp.ctxt, 871 gcc_jit_context_new_rvalue_from_ptr (comp.ctxt,
872 comp.void_ptr_type, 872 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). */)
919 919
920 if (SUBRP (fun)) 920 if (SUBRP (fun))
921 { 921 {
922 if (SUBR_NATIVE_COMPILEDP (fun) && XSUBR (fun)->native_intspec) 922 if (SUBR_NATIVE_COMPILEDP (fun) && !NILP (XSUBR (fun)->native_intspec))
923 return XSUBR (fun)->native_intspec; 923 return XSUBR (fun)->native_intspec;
924 924
925 const char *spec = XSUBR (fun)->intspec; 925 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);
4761INLINE bool 4761INLINE bool
4762SUBR_NATIVE_COMPILEDP (Lisp_Object a) 4762SUBR_NATIVE_COMPILEDP (Lisp_Object a)
4763{ 4763{
4764 return SUBRP (a) && XSUBR (a)->native_comp_u[0]; 4764 return SUBRP (a) && !NILP (XSUBR (a)->native_comp_u[0]);
4765} 4765}
4766 4766
4767INLINE struct Lisp_Native_Comp_Unit * 4767INLINE 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)
2948 struct Lisp_Subr out; 2948 struct Lisp_Subr out;
2949 dump_object_start (ctx, &out, sizeof (out)); 2949 dump_object_start (ctx, &out, sizeof (out));
2950 DUMP_FIELD_COPY (&out, subr, header.size); 2950 DUMP_FIELD_COPY (&out, subr, header.size);
2951 if (NATIVE_COMP_FLAG && subr->native_comp_u[0]) 2951 if (NATIVE_COMP_FLAG && !NILP (subr->native_comp_u[0]))
2952 out.function.a0 = NULL; 2952 out.function.a0 = NULL;
2953 else 2953 else
2954 dump_field_emacs_ptr (ctx, &out, subr, &subr->function.a0); 2954 dump_field_emacs_ptr (ctx, &out, subr, &subr->function.a0);
2955 DUMP_FIELD_COPY (&out, subr, min_args); 2955 DUMP_FIELD_COPY (&out, subr, min_args);
2956 DUMP_FIELD_COPY (&out, subr, max_args); 2956 DUMP_FIELD_COPY (&out, subr, max_args);
2957 if (NATIVE_COMP_FLAG && subr->native_comp_u[0]) 2957 if (NATIVE_COMP_FLAG && !NILP (subr->native_comp_u[0]))
2958 { 2958 {
2959 dump_field_fixup_later (ctx, &out, subr, &subr->symbol_name); 2959 dump_field_fixup_later (ctx, &out, subr, &subr->symbol_name);
2960 dump_remember_cold_op (ctx, 2960 dump_remember_cold_op (ctx,
@@ -2973,7 +2973,7 @@ dump_subr (struct dump_context *ctx, const struct Lisp_Subr *subr)
2973 dump_field_lv (ctx, &out, subr, &subr->native_comp_u[0], WEIGHT_NORMAL); 2973 dump_field_lv (ctx, &out, subr, &subr->native_comp_u[0], WEIGHT_NORMAL);
2974 2974
2975 dump_off subr_off = dump_object_finish (ctx, &out, sizeof (out)); 2975 dump_off subr_off = dump_object_finish (ctx, &out, sizeof (out));
2976 if (ctx->flags.dump_object_contents && subr->native_comp_u[0]) 2976 if (ctx->flags.dump_object_contents && !NILP (subr->native_comp_u[0]))
2977 /* We'll do the final addr relocation during VERY_LATE_RELOCS time 2977 /* We'll do the final addr relocation during VERY_LATE_RELOCS time
2978 after the compilation units has been loaded. */ 2978 after the compilation units has been loaded. */
2979 dump_push (&ctx->dump_relocs[VERY_LATE_RELOCS], 2979 dump_push (&ctx->dump_relocs[VERY_LATE_RELOCS],