emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Preview: portable dumper


From: Alan Third
Subject: Re: Preview: portable dumper
Date: Thu, 15 Feb 2018 20:35:25 +0000
User-agent: Mutt/1.9.3 (2018-01-21)

On Thu, Feb 15, 2018 at 11:49:30AM -0800, Daniel Colascione wrote:
> Thanks for checking. If you disable Wconversion at the top of the
> file, you should be able to unblock yourself. The warning helps make
> the code robust, but it's annoying to account for compiler
> differences.

Thanks, I’ve got it to build and it seems to work fine.

Here are the changes I had to make:

3 files changed, 15 insertions(+), 15 deletions(-)
src/dispnew.c |  2 +-
src/macfont.m | 26 +++++++++++++-------------
src/pdumper.c |  2 +-

modified   src/dispnew.c
@@ -6066,7 +6066,7 @@ init_display (void)
 #endif /* HAVE_NTGUI */
 
 #ifdef HAVE_NS
-  if (!inhibit_window_system && !will_dump)
+  if (!inhibit_window_system && !will_dump_p ())
     {
       Vinitial_window_system = Qns;
       Vwindow_system_version = make_number (10);
modified   src/macfont.m
@@ -1646,7 +1646,7 @@ static int macfont_variation_glyphs (struct font *, int c,
                                      unsigned variations[256]);
 static void macfont_filter_properties (Lisp_Object, Lisp_Object);
 
-static struct font_driver const macfont_driver =
+static struct font_driver macfont_driver =
   {
   .type = LISPSYM_INITIALLY (Qmac_ct),
   .get_cache = macfont_get_cache,
@@ -4034,6 +4034,18 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor 
(no
 
 
 
+static void
+syms_of_macfont_for_pdumper (void)
+{
+  // if (RESTORING_FROM_DUMP)
+  //   macfont_family_cache = Qnil;
+  // else
+  //   eassert (NILP (macfont_family_cache));
+
+  macfont_driver.type = Qmac_ct;
+  register_font_driver (&macfont_driver, NULL);
+}
+
 void
 syms_of_macfont (void)
 {
@@ -4056,15 +4068,3 @@ So we use CTFontDescriptorCreateMatchingFontDescriptor 
(no
 
   pdumper_do_now_and_after_load (syms_of_macfont_for_pdumper);
 }
-
-static void
-syms_of_macfont_for_pdumper (void)
-{
-  if (RESTORING_FROM_DUMP)
-    macfont_family_cache = Qnil;
-  else
-    eassert (NILP (macfont_family_cache));
-
-  macfont_driver.type = Qmac_ct;
-  register_font_driver (&macfont_driver, NULL);
-}
modified   src/pdumper.c
@@ -55,7 +55,7 @@
 #ifdef HAVE_PDUMPER
 
 #ifdef __GNUC__
-# pragma GCC diagnostic error "-Wconversion"
+/* # pragma GCC diagnostic error "-Wconversion"  */
 # pragma GCC diagnostic error "-Wshadow"
 # define ALLOW_IMPLICIT_CONVERSION                       \
   _Pragma ("GCC diagnostic push")                        \


Presumably RESTORING_FROM_DUMP is a left‐over from previous code? I
couldn’t see at a glance what to replace it with.

Oddly whenever I had a problem with macfont.m I had to do ‘make clean’
before make would work again. I’m not sure what was going on or if
it’s specific to this branch.
-- 
Alan Third



reply via email to

[Prev in Thread] Current Thread [Next in Thread]