[PyQt] Wrapping "const char * const *" in sip
Phil Thompson
phil at riverbankcomputing.com
Sat May 8 10:06:12 BST 2010
On Fri, 7 May 2010 17:21:04 -0400, <dcassidy36 at mass.rr.com> wrote:
> This is valid C++ syntax, but SIP does not seem to like it. How do I wrap
> the code mentioned below?
>
> sip: sip/ptlib/PInternetProtocol.sip:63: syntax error
> Error: Unable to create the C++ code.
>
> class PInternetProtocol
> {
> protected:
> PInternetProtocol(
> const char * defaultServiceName, ///< Service name for the
protocol.
> int cmdCount, ///< Number of command strings.
> const char * const * cmdNames ///< Strings for each command.
> );
> // Create an unopened TCP/IP protocol socket channel.
> };
Irrespective of the syntax you need to decide on how you want to represent
and access the array as a Python object. Replacing cmdCount and cmdNames
with a tuple of Python strings would seem to be the obvious choice and
provide %MethodCode to do the conversion.
Phil
More information about the PyQt
mailing list