On 5 Aug, 23:22, "Diez B. Roggisch" wrote:
> And that gives me the *full* bytestring, not only until the first zero?
> I can't try that right now (not at work anymore), but if it's that easy,
> that would be great.
It should, and if it does not it is a bug in Cython. The len()
function should wo
On Aug 5, 2009, at 5:19 PM, Diez B. Roggisch wrote:
Philip Semanchuk schrieb:
On Aug 5, 2009, at 1:16 PM, Diez B. Roggisch wrote:
Hi,
I'm trying to wrap a C-API which has a call that takes a void* and
a size_t
as arguments.
void foo(void *data, size_t length)
The wrapper is supposed to
sturlamolden schrieb:
On 5 Aug, 19:16, "Diez B. Roggisch" wrote:
void foo(void *data, size_t length)
The wrapper is supposed to be called with a python (byte)string instance,
which might contain more than one '\0'-character.
So how do I access the raw data of a string?
cdef extern void foo
Philip Semanchuk schrieb:
On Aug 5, 2009, at 1:16 PM, Diez B. Roggisch wrote:
Hi,
I'm trying to wrap a C-API which has a call that takes a void* and a
size_t
as arguments.
void foo(void *data, size_t length)
The wrapper is supposed to be called with a python (byte)string instance,
which
On 5 Aug, 21:23, sturlamolden wrote:
> foo(data, length)
Oops, that would be
foo( data, length)
--
http://mail.python.org/mailman/listinfo/python-list
On 5 Aug, 19:16, "Diez B. Roggisch" wrote:
> void foo(void *data, size_t length)
>
> The wrapper is supposed to be called with a python (byte)string instance,
> which might contain more than one '\0'-character.
>
> So how do I access the raw data of a string?
cdef extern void foo(void *data, int
On Aug 5, 2009, at 1:16 PM, Diez B. Roggisch wrote:
Hi,
I'm trying to wrap a C-API which has a call that takes a void* and a
size_t
as arguments.
void foo(void *data, size_t length)
The wrapper is supposed to be called with a python (byte)string
instance,
which might contain more than
Hi,
I'm trying to wrap a C-API which has a call that takes a void* and a size_t
as arguments.
void foo(void *data, size_t length)
The wrapper is supposed to be called with a python (byte)string instance,
which might contain more than one '\0'-character.
So how do I access the raw data of a str