Re: Breaking the 10-limit : Problems/Questions for Windows build
Mart Kelder <[email protected]>
| Newsgroups | gmane.games.torcs.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Jean-Philippe. Op Wednesday 09 April 2008 19:48:18 schreef Annick et Jean-Philippe: > Hi, Mart, and all. > > I undersand that it could be big issue to break the pure-C interface, > so, I gave up the "std::vector" solution, and I'm currently working > on a pure-C one : > - the tModInfo array would be allocated on the heap by the module itself, > at DLL load-time, in its "Module entry point" function > (whose signature would become : extern "C" int xxx(tModInfo**)) > - it would be freed by the module unloading functions in tgf lib. I see a (small) problem with this. It is not given that the robot is compiled with the same compiler as the rest of the code. If a piece of code is allocated with the _tgf_win_malloc function in tgf.cpp, you can't free it with the normal free function. So, in my opinion, it must be forced to use the malloc function matching with the free function. I think that is best done if the reallocation is done in a function. > I will propose you the patch when I'm ready (and sure it runs OK on > Windows). > > About the Delphi robots, I would appreciate more info on the way > they are done, in order to make any modification as simplest as possible > for them. Wolf-Dieter, if you read me ... Or anyone else knowing it. > > Cheers, > > Jean-Philippe. Regards, Mart ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone