Re: [PyKDE] SIP: MappedType for pointers?

2006-03-22 Thread Jim Bublitz
On Wednesday 22 March 2006 06:28, Hans-Peter Jansen wrote: > Am Mittwoch, 22. März 2006 14:19 schrieb Giovanni Bajo: > > Jim Bublitz <[EMAIL PROTECTED]> wrote: > > > Same as the following, except "%MappedType wchar_t" and other > > > obvious changes. > > > > Many thanks Jim. For some reason, I had

Re: [PyKDE] SIP: MappedType for pointers?

2006-03-22 Thread Hans-Peter Jansen
Am Mittwoch, 22. März 2006 14:19 schrieb Giovanni Bajo: > Jim Bublitz <[EMAIL PROTECTED]> wrote: > > Same as the following, except "%MappedType wchar_t" and other > > obvious changes. > > Many thanks Jim. For some reason, I had thought that %MappedType > wouldn't work for pointers... never mind! >

Re: [PyKDE] SIP: MappedType for pointers?

2006-03-22 Thread Giovanni Bajo
Phil Thompson <[EMAIL PROTECTED]> wrote: >> Python supports conversion to/from wchar_t buffers using >> PyUnicode_From/AsWideChar, but SIP does not support it. Could this be added >> automatically? > > This is similar to the size_t issue. While I can understand the technical issues with size_t (w

Re: [PyKDE] SIP: MappedType for pointers?

2006-03-22 Thread Giovanni Bajo
Jim Bublitz <[EMAIL PROTECTED]> wrote: > Same as the following, except "%MappedType wchar_t" and other obvious > changes. Many thanks Jim. For some reason, I had thought that %MappedType wouldn't work for pointers... never mind! > if (!sipCpp) > Py_INCREF (Py_None); > return

Re: [PyKDE] SIP: MappedType for pointers?

2006-03-21 Thread Phil Thompson
On Tuesday 21 March 2006 6:23 pm, Giovanni Bajo wrote: > Hello, > > I'm writing a SIP wrapper for a serie of overloaded functions like this: > > void Foo(char *str); > void Foo(wchar_t *str); > > void Bar(char *str); > void Bar(wchar_t *str); > > [etc.] > > Python supports conversion to/from wchar_

Re: [PyKDE] SIP: MappedType for pointers?

2006-03-21 Thread Jim Bublitz
On Tuesday 21 March 2006 10:23, Giovanni Bajo wrote: > Hello, > > I'm writing a SIP wrapper for a serie of overloaded functions like this: > > void Foo(char *str); > void Foo(wchar_t *str); > > void Bar(char *str); > void Bar(wchar_t *str); > > [etc.] > > Python supports conversion to/from wchar_t

[PyKDE] SIP: MappedType for pointers?

2006-03-21 Thread Giovanni Bajo
Hello, I'm writing a SIP wrapper for a serie of overloaded functions like this: void Foo(char *str); void Foo(wchar_t *str); void Bar(char *str); void Bar(wchar_t *str); [etc.] Python supports conversion to/from wchar_t buffers using PyUnicode_From/AsWideChar, but SIP does not support it. Coul