Questions about smalltalk/x and its class library

Using C++ Libraries from Smalltalk

Postby jan_vrany » 16. Dec 2008, 14:25

We are creating Smalltalk/X binding to Xerces C++ validating parser.
After we solved all the gcc vs g++ compilation, extern "C" wrapping etc,
we run into following problem:

in SAX content handler & input stream class we need to send a message to
smalltalk and manipulate with return values and create new smalltalk objects.
In C++ header file, we includes stc.h wrapped in extern "C" block to avoid
C++ name mangling. However, several functions uses K&C style (i.e. there
are not formal parameter declarations so C compilers allows one to pass
any number of arguments implictly typed int). This is not valid in C++.
Affected functions are for instance __ADD_REFCELL, __REMOVE_REFCELL,

Is there any reason for using K&R style for those functions? If not, I suggest
to add formal argument declaration in next release, this will ease using C++ libraries.

We workarounded this issue by wrapping all those function into our own ones,
declaring all variables properly and compiling these function by gcc.
For details, look at:
Posts: 28
Joined: 10. Dec 2008, 12:37

Return to Programming Help

Users browsing this forum: No registered users and 2 guests

Design by GB