Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove redefinition of static keyword #14816

Closed
wants to merge 1 commit into from

Conversation

dvogel
Copy link

@dvogel dvogel commented May 21, 2024

Problem: Ancient preprocessor hack could lead to very confusing build errors.
Solution: Use simpler XPM that reflects current source control approach.

My primary concern here is removing the redefinition of static. This was seemingly originally used as a workaround to GTKv1 vs GTKv2 API difference. When GTKv1 support was dropped, this redefinition should have also been abandoned in favor of declaring the XPM data static const. Those XPM files have been in version control, unchanged since 2004. Beyond being unnecessary, if one misplaces an #if or an #end this can result in very confusing "invalid storage class for function" errors because some functions will effectively be declared static const.

I've also removed this magick define/undef sequence because AFAICT it serves no purpose. If anyone knows a good reason this should remain, I'm open to keeping it but if we keep it then it's purpose should be documented. My best guess is that either at some point prior to the XPM files being put under version control they included code that interacted with that magick symbol. I consulted the v6.4 source code on the FTP archive and that version does not include any of this code so there seems to be a gap between v6.4 and the v7 sources in the git repo.

… errors.

Solution: Use simpler XPM that reflects current source control approach.
@dvogel dvogel marked this pull request as ready for review May 21, 2024 02:30
@chrisbra
Copy link
Member

Thanks. I have no idea if this breaks for anybody. Best to include and see if anybody complains, but I doubt anybody will notice.

@chrisbra chrisbra closed this in 5090f83 May 22, 2024
@chrisbra
Copy link
Member

This change seems to cause some warnings: https://groups.google.com/g/vim_dev/c/1QH6AEZxqRw/m/awOu4EjeDgAJ

@dvogel can you please have a look?

@dvogel
Copy link
Author

dvogel commented May 23, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants