[Kde-bindings] A sample of our subset of QtC

Adam Treat manyoso at yahoo.com
Sat Jan 11 15:36:33 UTC 2003


On Saturday 11 January 2003 02:48 pm, Ashley Winters wrote:
> Well, extern "C" only defines the linkage. It's hardly a legal C
> header, which would be a requirement for a real version of QtC. Without
> C headers to go along with the library, it's only half functional.

Well, our glue lib isn't meant as a C binding library.  QtC is still the place 
for that.  We are only going todo a subset like i said and then call Qt 
directly after that.

> Also, it's rather unpleasant to have the possibility of function "ids"
> changing between versions. If you're gonna tack an effectively random
> number on the end of every function, why not go all the way like smoke
> does? f1, f2, ..., f4897.
>
> I'd propose using a standard name-mangling scheme for the arguments.
>
> QApplication(const char **, int)
> QApplication_cCPP_i  (char CONST POINTER POINTER, int)
>
> It would be possible to document a mapping from "mangled" names to
> "easy" names that way. qtc_QApplication() would always call
> QApplication_cCPP_i or something

That is a good idea.  Although it isn't a big deal to us (since all of that is 
hidden and is automatically generated from Qt releases anyway AND we are 
going to have a tight coupling with our glue) it is a good idea for the real 
QtC.  I would suggest using the GCC 3.2 name mangling scheme.  We are 
currently mangling our stuff with nm and cppfilt which allows us to call 
directly into Qt.

Cheers,

Adam



More information about the Kde-bindings mailing list