* Re: master b1e9151: Enable the native display of BMP images on Haiku
@ 2022-03-26 12:29 Eli Zaretskii
2022-03-26 12:33 ` Po Lu
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2022-03-26 12:29 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
> --- a/src/image.c
> +++ b/src/image.c
> @@ -11555,12 +11555,16 @@ syms_of_image (void)
>
> #if HAVE_NATIVE_IMAGE_API
> DEFSYM (Qnative_image, "native-image");
> -# ifdef HAVE_NTGUI
> - DEFSYM (Qgdiplus, "gdiplus");
> - DEFSYM (Qshlwapi, "shlwapi");
> +
> +#if defined HAVE_NTGUI || defined HAVE_HAIKU
> DEFSYM (Qbmp, "bmp");
> add_image_type (Qbmp);
> -# endif
> +#endif
> +
> +#ifdef HAVE_NTGUI
> + DEFSYM (Qgdiplus, "gdiplus");
> + DEFSYM (Qshlwapi, "shlwapi");
> +#endif
> #endif
>
> defsubr (&Sinit_image_library);
Shouldn't you now remove SEFSYM for Qbmp from haikuimage.c?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master b1e9151: Enable the native display of BMP images on Haiku
2022-03-26 12:29 master b1e9151: Enable the native display of BMP images on Haiku Eli Zaretskii
@ 2022-03-26 12:33 ` Po Lu
2022-03-26 13:18 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Po Lu @ 2022-03-26 12:33 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> --- a/src/image.c
>> +++ b/src/image.c
>> @@ -11555,12 +11555,16 @@ syms_of_image (void)
>>
>> #if HAVE_NATIVE_IMAGE_API
>> DEFSYM (Qnative_image, "native-image");
>> -# ifdef HAVE_NTGUI
>> - DEFSYM (Qgdiplus, "gdiplus");
>> - DEFSYM (Qshlwapi, "shlwapi");
>> +
>> +#if defined HAVE_NTGUI || defined HAVE_HAIKU
>> DEFSYM (Qbmp, "bmp");
>> add_image_type (Qbmp);
>> -# endif
>> +#endif
>> +
>> +#ifdef HAVE_NTGUI
>> + DEFSYM (Qgdiplus, "gdiplus");
>> + DEFSYM (Qshlwapi, "shlwapi");
>> +#endif
>> #endif
>>
>> defsubr (&Sinit_image_library);
> Shouldn't you now remove SEFSYM for Qbmp from haikuimage.c?
Probably, but it doesn't hurt to keep multiple DEFSYMs around right?
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master b1e9151: Enable the native display of BMP images on Haiku
2022-03-26 12:33 ` Po Lu
@ 2022-03-26 13:18 ` Eli Zaretskii
2022-03-26 13:22 ` Po Lu
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2022-03-26 13:18 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Sat, 26 Mar 2022 20:33:36 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> --- a/src/image.c
> >> +++ b/src/image.c
> >> @@ -11555,12 +11555,16 @@ syms_of_image (void)
> >>
> >> #if HAVE_NATIVE_IMAGE_API
> >> DEFSYM (Qnative_image, "native-image");
> >> -# ifdef HAVE_NTGUI
> >> - DEFSYM (Qgdiplus, "gdiplus");
> >> - DEFSYM (Qshlwapi, "shlwapi");
> >> +
> >> +#if defined HAVE_NTGUI || defined HAVE_HAIKU
> >> DEFSYM (Qbmp, "bmp");
> >> add_image_type (Qbmp);
> >> -# endif
> >> +#endif
> >> +
> >> +#ifdef HAVE_NTGUI
> >> + DEFSYM (Qgdiplus, "gdiplus");
> >> + DEFSYM (Qshlwapi, "shlwapi");
> >> +#endif
> >> #endif
> >>
> >> defsubr (&Sinit_image_library);
>
> > Shouldn't you now remove SEFSYM for Qbmp from haikuimage.c?
>
> Probably, but it doesn't hurt to keep multiple DEFSYMs around right?
It's better not, I think. We don't do that elsewhere, do we?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master b1e9151: Enable the native display of BMP images on Haiku
2022-03-26 13:18 ` Eli Zaretskii
@ 2022-03-26 13:22 ` Po Lu
2022-03-26 13:29 ` Eli Zaretskii
2022-03-26 13:49 ` Andreas Schwab
0 siblings, 2 replies; 9+ messages in thread
From: Po Lu @ 2022-03-26 13:22 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> It's better not, I think. We don't do that elsewhere, do we?
I think there are a few cases, though probably not deliberate. If you
insist on removing the definition in haikuimage.c, I don't see why not.
Thanks.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master b1e9151: Enable the native display of BMP images on Haiku
2022-03-26 13:22 ` Po Lu
@ 2022-03-26 13:29 ` Eli Zaretskii
2022-03-26 13:47 ` Po Lu
2022-03-26 13:49 ` Andreas Schwab
1 sibling, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2022-03-26 13:29 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Sat, 26 Mar 2022 21:22:41 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> > It's better not, I think. We don't do that elsewhere, do we?
>
> I think there are a few cases, though probably not deliberate. If you
> insist on removing the definition in haikuimage.c, I don't see why not.
What are the arguments for leaving it in haikuimage.c?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master b1e9151: Enable the native display of BMP images on Haiku
2022-03-26 13:29 ` Eli Zaretskii
@ 2022-03-26 13:47 ` Po Lu
2022-03-26 13:58 ` Eli Zaretskii
0 siblings, 1 reply; 9+ messages in thread
From: Po Lu @ 2022-03-26 13:47 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
>> From: Po Lu <luangruo@yahoo.com>
>> Cc: emacs-devel@gnu.org
>> Date: Sat, 26 Mar 2022 21:22:41 +0800
>>
>> Eli Zaretskii <eliz@gnu.org> writes:
>>
>> > It's better not, I think. We don't do that elsewhere, do we?
>>
>> I think there are a few cases, though probably not deliberate. If you
>> insist on removing the definition in haikuimage.c, I don't see why not.
>
> What are the arguments for leaving it in haikuimage.c?
Mainly so that if the DEFSYM in image.c is moved under some different
conditionals (or removed entirely), haikuimage.c will continue to work.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master b1e9151: Enable the native display of BMP images on Haiku
2022-03-26 13:22 ` Po Lu
2022-03-26 13:29 ` Eli Zaretskii
@ 2022-03-26 13:49 ` Andreas Schwab
1 sibling, 0 replies; 9+ messages in thread
From: Andreas Schwab @ 2022-03-26 13:49 UTC (permalink / raw)
To: Po Lu; +Cc: Eli Zaretskii, emacs-devel
On Mär 26 2022, Po Lu wrote:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>> It's better not, I think. We don't do that elsewhere, do we?
>
> I think there are a few cases, though probably not deliberate. If you
> insist on removing the definition in haikuimage.c, I don't see why not.
DEFSYM by itself does nothing. It's just a marker for make-docfile,
which removes duplicates anyway.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1
"And now for something completely different."
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master b1e9151: Enable the native display of BMP images on Haiku
2022-03-26 13:47 ` Po Lu
@ 2022-03-26 13:58 ` Eli Zaretskii
2022-03-27 0:33 ` Po Lu
0 siblings, 1 reply; 9+ messages in thread
From: Eli Zaretskii @ 2022-03-26 13:58 UTC (permalink / raw)
To: Po Lu; +Cc: emacs-devel
> From: Po Lu <luangruo@yahoo.com>
> Cc: emacs-devel@gnu.org
> Date: Sat, 26 Mar 2022 21:47:50 +0800
>
> Eli Zaretskii <eliz@gnu.org> writes:
>
> >> From: Po Lu <luangruo@yahoo.com>
> >> Cc: emacs-devel@gnu.org
> >> Date: Sat, 26 Mar 2022 21:22:41 +0800
> >>
> >> Eli Zaretskii <eliz@gnu.org> writes:
> >>
> >> > It's better not, I think. We don't do that elsewhere, do we?
> >>
> >> I think there are a few cases, though probably not deliberate. If you
> >> insist on removing the definition in haikuimage.c, I don't see why not.
> >
> > What are the arguments for leaving it in haikuimage.c?
>
> Mainly so that if the DEFSYM in image.c is moved under some different
> conditionals (or removed entirely), haikuimage.c will continue to work.
Then I don't think we should keep it in haikuimage.c. If it is ever
removed, haikuimage.c will fail to compile, and the error message will
tell exactly what's wrong. We have similar issues with symbols used
in w32font.c that are declared elsewhere, for example. Why would
haikuimage.c be treated differently?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: master b1e9151: Enable the native display of BMP images on Haiku
2022-03-26 13:58 ` Eli Zaretskii
@ 2022-03-27 0:33 ` Po Lu
0 siblings, 0 replies; 9+ messages in thread
From: Po Lu @ 2022-03-27 0:33 UTC (permalink / raw)
To: Eli Zaretskii; +Cc: emacs-devel
Eli Zaretskii <eliz@gnu.org> writes:
> Then I don't think we should keep it in haikuimage.c. If it is ever
> removed, haikuimage.c will fail to compile, and the error message will
> tell exactly what's wrong. We have similar issues with symbols used
> in w32font.c that are declared elsewhere, for example. Why would
> haikuimage.c be treated differently?
No idea, I'll remove the duplicate definition.
Thanks for explaining.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-03-27 0:33 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-03-26 12:29 master b1e9151: Enable the native display of BMP images on Haiku Eli Zaretskii
2022-03-26 12:33 ` Po Lu
2022-03-26 13:18 ` Eli Zaretskii
2022-03-26 13:22 ` Po Lu
2022-03-26 13:29 ` Eli Zaretskii
2022-03-26 13:47 ` Po Lu
2022-03-26 13:58 ` Eli Zaretskii
2022-03-27 0:33 ` Po Lu
2022-03-26 13:49 ` Andreas Schwab
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.