Re: [AD] got rid of END_OF_MAIN() |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Ok, I just got back from vacation, and I only skimmed the topic very
quickly, so it's possible I'm repeating what others already said.
First off, thanks for looking into this. Getting rid of magic main name
mangling is one of the things I'd really like to see.
> This, however, necessitates that the user's main function must be
> declared (int, char **). (void) declarations will no longer work.
Personally, I don't really like this approach... although SDL does require
the same thing. It violates Allegro's source-backward compatibility
policy. I know some will say that this can be relaxed, but I'm not sure
this is a case where that would be true.
> I have always felt that the less silly preprocessor stuff going
> on, the better.
Agreed.
> I changed all the example code and documentation to reflect the change.
When changing the library, it's not nescessary to change all the examples
and documentation at the same time. Chances are some things will need to
be changed between the patch being submitted and it being accepted and
keeping track of the docs and examples at the same time will ultimately be
more work if you do it at the same time. Otherwise, it's probably a good
idea to split the diff into several different files, for library, examples
and docs if you do want to change all of them at the same time.
> I have to note also that I only have access to a Mac OS X system right
> now. This certainly works on my system and it's really trivial enough
> that I don't see why it wouldn't work elsewhere but who knows...
Let's focus on one system at the same time :)
I haven't looked in detail at your patch yet, nor do I really know MacOS X.
As I understand it, the problem was that Allegro needs to be initialized
from the main thread. Does your patch handle all circumstances where that
could be a problem?
For Windows, I'm very eager to have it tested as the END_OF_MAIN() seems to
be the most elaborate there.
For UNIX, END_OF_MAIN() is not actually needed if procfs is available for
getting the executable name, which seems to be the case for all systems
I've tested it on. I'll probably make a patch to remove main mangling on
UNIX systems later today or tomorrow.
> This is actually the first time I've used diff and distributed a patch
> so I may have done something stupid there too.
Don't worry, we've all worked our way up from there :)
Evert