|
Re: Overriding PyArg_ParseTuple arguments: msg#00155programming.swig
Tessa Lau writes: > On Wed, Nov 26, 2003 at 12:11:50AM -0600, David Beazley wrote: > > %typemap(in,parse="z") char * ""; > > Perfect. Now how about using the "s#" format character, which expands > a Python string into two C arguments, a char* and an int representing > the length of the string? It requires adding an additional argument to > the PyArg_ParseTuple call. > You can't use the above form for that. You'll have to write a normal typemap. Actually, there's already a typemap for it. %apply (char *STRING, int LENGTH) { (char *whatever, int size) }; -- Dave _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Re: Overriding PyArg_ParseTuple arguments: 00155, Tessa Lau |
|---|---|
| Next by Date: | vector problem with solaris compiler: 00155, Dmitri Kostioukov |
| Previous by Thread: | Re: Overriding PyArg_ParseTuple argumentsi: 00155, Tessa Lau |
| Next by Thread: | vector problem with solaris compiler: 00155, Dmitri Kostioukov |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |