emacs-devel
[Top][All Lists]
Advanced

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

Re: Interest in nt_load_image?


From: Eli Zaretskii
Subject: Re: Interest in nt_load_image?
Date: Tue, 31 Mar 2020 17:19:44 +0300

> From: Stefan Monnier <address@hidden>
> Cc: address@hidden,  address@hidden
> Date: Mon, 30 Mar 2020 15:39:11 -0400
> 
> I suggest we write the code under the assumption that GDI+ is available
> and that's it.

I'd like to have a Lisp knob to select whether GDI+ or the various
image libraries are used for image handling, so the for systems
without GDI+ comes at almost no cost: just determine at startup what
is/are the value(s) of those variable(s).

> > There are no consequences.  The paradigm of loading a shared library
> > dynamically and testing whether doing that succeeded is so boilerplate
> > in the w32 code that it never takes more than a simple copy/pasta to
> > add one more.
> 
> But what do we do if the loading fails?  If we simply fail to display
> the image, then that's fine by me.  If OTOH we go through the trouble of
> falling back on some other code which otherwise wouldn't be needed in
> the build (and would hence never be tested, BTW), then it sounds like
> "waste precious resources".

If the library cannot be loaded, or doesn't have all the required
functions, the corresponding feature becomes unavailable, and we will
generally display an error message.  This is clearly visible in the
code: that's what those FOO-available-p functions are there for.  In
some rare cases, where we already have a fallback, we use it instead.
But those cases are a small minority.

> >> > One day it will die of natural causes, no need to invest even
> >> > a minimal effort in that.
> >> I'm not sure how that would happen
> > It will happen when 32-bit builds will die.  2038 at the latest.
> 
> Are we sure sure 32bit Windows installations will have all disappeared
> by 2038 ?  ;-)  

Yes, I'm sure.  In any case, Emacs will not be able to run on them, as
we use time functions all over the place.



reply via email to

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