Re: [AD] got rid of END_OF_MAIN()

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Aug 9, 2004, at 3:11 AM, Chris wrote:

Hm, ok. I think, when you do a change like this, it's best to just do what's necesarry to make the patch work. Having all that extra stuff in the patch (doc changes, example changes, etc), IMO, is unnecessary until you get conformation that the change will be accepted.. it saves you time from having to do all the changes prematurely, and it save us time from having to look through the patch to find where the actual/important changes are. Most people look at the .diff itself to see what you're changing so having a lot of extra stuff in it makes it harder to find the real changes.

OK that's what I'll do in the future. I figured the more that was done the more likely it would get accepted but that makes sense.


That said, I think your idea has some merit. Although I would probably change the implemtation some. The big question I need to ask is: what would happen if you forcibly pass arguments to a function that takes (void)? Like this:


This actually seems to work under gcc at least. Although I think you have to cast the fp to the correct type:
void (*main2)(int, char **) = (void (*) (int, char**) &_mangled_main;

I didn't really think about this. I guess that means it can be changed such that the user can define his main using void or int, char **.

Mike Benfield





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/