[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: Registering function
- From: "Josh Jensen" <joshj@...>
- Date: Tue, 9 Oct 2001 18:32:00 -0700
> The short answer is FuBi, or Function Binding Interface. I
> first found out about it in an article in Game Programming
> Gems by Scott Bilas. He presented it at GDC 2001 and he has
> information on it on his website as well. It parses export
> information from the binary file (EXE or DLL), demangles the
> function names, and parses the function definition in to a
> database along with the pointer to the location of the
> function in memory. The lookup is a simple search of the
> database for a matching function name. (Database is a bit of
> an exaggeration, it is just a std::set<> of function
> definitions). My callback function hand builds the call
> stack, then I jump to the right location in memory. There
> are a lot of little issues involved with this, if anyone
> wants more information, feel free to contact me offline.
So, basically, Lua does a hashed lookup to get to your callback function
and then you do another lookup to get to the right function (by querying
the Lua call stack for the name?). Sounds time intensive, although the
verification of arguments sounds like a very good thing.
Do you have any speed measurements?