DLLCC type question

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

DLLCC type question

Travis Griggs
I have a large library. It passes and returns a bunch of structure pointers. For example:

void someFunc(structType* anArg)

and

structType* someFunc()

For my purposes, I don't need all of the CCompositePointer overhead. I'm willing to work with the datum (address) directly by just using an integer. I can change any argument of structType* to unsigned int. But it doesn't seem I need to. It's happy being handed either an Integer OR a CCompositePointer. Is there any performance gain for redeclaring it as an unsigned int? The return types, I have to change all of those to be unsigned int declarations, so that the marshalling engine just hands back an integer (I don't want to have to change each call site, to suck the datum address out of the CCompositePointer created).

I can see a couple of options:

1) change them all by hand. Which I'll have to do each time I reparse the header files for updates
2) sweep the source code and do some source of regex recompile thing
3) sweep the methods and just fiddle with their state without changing the source
4) do something tricky with typedefs (I'm not sure what)
5) ....

Anyone have any good thoughts on how to tackle the problem. I'm torn between 2 and 3, unless someone has a better idea.

--
Travis Griggs
Objologist
"Only one thing is impossible for God: to find any sense in any copyright law on the planet." - Mark Twain



DISCLAIMER: This email is bound by the terms and conditions described at http://www.key.net/disclaimer.htm