Jan Dubois wrote:
> [Any reason you removed the CC to the perl-xs list?]
Oops, no, that was accidental. Adding it back, and quoting your reply below for
the benefit of the public.
I don't see a way to avoid this if you use PPCODE sections to return more
than
one value.
>>> Yes, s
2008/9/5 Jan Dubois <[EMAIL PROTECTED]>:
> You probably want to use
>
>XPUSHs(sv_2mortal(newSViv(PTR2IV(h;
>
> [...]
>
>> So in the typemap I have:
>>
>> SANE_Handle T_OPAQUEPTR
>
> I think you want just T_PTR instead. Or you can explicitly
Excellent, thank you. That
On Fri, 05 Sep 2008, Torsten Schoenfeld wrote:
> Jan Dubois wrote:
> > It is somewhat confusing that you are using the typemap for your INPUT
> > parameter but then try to encode the OUTPUT parameter yourself. You
> > should consistently do one or the other and not mix things (just for the
> > sak
Jan Dubois wrote:
>> SANE_Handle T_OPAQUEPTR
If you want the handle to be represented by a blessed scalar reference, you can
use T_PTROBJ. Or, if the package name chosen by T_OPAQUEPTR doesn't suit you,
define your own typemap and use sv_setref_pv yourself. See the implementati
On Fri, 05 Sep 2008, Jeffrey Ratcliffe wrote:
>
> void
> sane_open(class, name)
> SANE_String_Const name
> INIT:
> SANE_Status status;
> SANE_Handle h;
> PPCODE:
> status = sane_open(name, &h);
>
On Fri, Sep 05, 2008 at 09:46:57PM +0200, Jeffrey Ratcliffe wrote:
> http://www.sane-project.org/html/doc011.html#s4.2.6: Access to a
> scanner is provided through an opaque type called SANE_Handle. The C
> declaration of this type is given below.
>
> typedef void *SANE_Handle;
>
> While thi