PerlIO_write Question

2005-10-13 Thread Reinhard Pagitsch
Hello, I tryed the following in my XS module: int Write1Byte(PerlIO* fh, long what) { return PerlIO_write(fh, what, 1); // or return PerlIO_write(fh, (void*)what, 1); } With this I got a crash. if I do this it works: int Write1Byte(PerlIO* fh, long what) { int i;

Re: PerlIO_write Question

2005-10-13 Thread muppet
Reinhard Pagitsch said: Hello, I tryed the following in my XS module: int Write1Byte(PerlIO* fh, long what) { return PerlIO_write(fh, what, 1); // or return PerlIO_write(fh, (void*)what, 1); } With this I got a crash. if I do this it works: int Write1Byte(PerlIO* fh, long

Re: PerlIO_write Question

2005-10-13 Thread Tassilo von Parseval
On Thu, Oct 13, 2005 at 02:08:11PM +0200 Reinhard Pagitsch wrote: I tryed the following in my XS module: int Write1Byte(PerlIO* fh, long what) { return PerlIO_write(fh, what, 1); // or return PerlIO_write(fh, (void*)what, 1); } With this I got a crash. No wonder. It's

Re: PerlIO_write Question

2005-10-13 Thread Reinhard Pagitsch
Tassilo von Parseval wrote: On Thu, Oct 13, 2005 at 02:08:11PM +0200 Reinhard Pagitsch wrote: I tryed the following in my XS module: int Write1Byte(PerlIO* fh, long what) { return PerlIO_write(fh, what, 1); // or return PerlIO_write(fh, (void*)what, 1); } With this I got a