From: Paul Eggert Date: Thu, 14 Jun 2018 22:59:09 +0000 (-0700) Subject: Just use cons in macfont_descriptor_entity X-Git-Tag: emacs-27.0.90~4857 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6c04c848e677e458e39811b10335cd6aeece6e2a;p=emacs.git Just use cons in macfont_descriptor_entity * src/macfont.m (macfont_descriptor_entity): Use cons instead of make_save_ptr_int, as this avoids the need for a special type and function for this one-off. --- diff --git a/src/macfont.m b/src/macfont.m index 3b14a89c5cc..8abe203644b 100644 --- a/src/macfont.m +++ b/src/macfont.m @@ -908,7 +908,7 @@ macfont_descriptor_entity (CTFontDescriptorRef desc, Lisp_Object extra, ASET (entity, FONT_EXTRA_INDEX, Fcopy_sequence (extra)); name = CTFontDescriptorCopyAttribute (desc, kCTFontNameAttribute); font_put_extra (entity, QCfont_entity, - make_save_ptr_int ((void *) name, sym_traits)); + Fcons (make_mint_ptr (name), make_number (traits))); if (synth_sym_traits & kCTFontTraitItalic) FONT_SET_STYLE (entity, FONT_SLANT_INDEX, make_number (FONT_SLANT_SYNTHETIC_ITALIC)); @@ -2505,7 +2505,7 @@ macfont_free_entity (Lisp_Object entity) { Lisp_Object val = assq_no_quit (QCfont_entity, AREF (entity, FONT_EXTRA_INDEX)); - CFStringRef name = XSAVE_POINTER (XCDR (val), 0); + CFStringRef name = xmint_pointer (XCAR (XCDR (val))); block_input (); CFRelease (name); @@ -2528,11 +2528,10 @@ macfont_open (struct frame * f, Lisp_Object entity, int pixel_size) val = assq_no_quit (QCfont_entity, AREF (entity, FONT_EXTRA_INDEX)); if (! CONSP (val) - || XTYPE (XCDR (val)) != Lisp_Misc - || XMISCTYPE (XCDR (val)) != Lisp_Misc_Save_Value) + || ! CONSP (XCDR (val))) return Qnil; - font_name = XSAVE_POINTER (XCDR (val), 0); - sym_traits = XSAVE_INTEGER (XCDR (val), 1); + font_name = xmint_pointer (XCAR (XCDR (val))); + sym_traits = XINT (XCDR (XCDR (val))); size = XINT (AREF (entity, FONT_SIZE_INDEX)); if (size == 0) @@ -2711,7 +2710,7 @@ macfont_has_char (Lisp_Object font, int c) val = assq_no_quit (QCfont_entity, AREF (font, FONT_EXTRA_INDEX)); val = XCDR (val); - name = XSAVE_POINTER (val, 0); + name = xmint_pointer (XCAR (val)); charset = macfont_get_cf_charset_for_name (name); } else