1. RE: fptr / Matt Lewis
Yes, just yesterday I considered that, since I came across that problem.
For now, I use this piece of code to convert:
constant sign_conversion = allocate(4)
global function signed( atom x )
poke4(sign_conversion,x)
return peek4s( sign_conversion )
end function
In following the peek4 example, should I name them call_cdecls() and
call_cdeclu()? Or just add call_cdecl_signed() to be really explicit?
Matt Lewis
> From: Andy Serpa [mailto:ac at onehorseshy.com]
> Hi Matt,
>
> You ought to add duplicate versions of (or add a parameter to) the
> call_xxx() functions that return signed values rather than
> unsigned. I
> find most libraries I use return signed error codes from the
> functions
> and put the "real" return value in some pre-allocated
> location that you
> pass as a parameter....
2. RE: fptr / Matt Lewis
> In following the peek4 example, should I name them call_cdecls() and
> call_cdeclu()? Or just add call_cdecl_signed() to be really explicit?
>
In your old version I just made a duplicate called call_cdecl_s() --
"signed" is too much typing, "cdecls" is too ugly...
-- Andy
> Matt Lewis
>
> > From: Andy Serpa [mailto:ac at onehorseshy.com]
>
> > Hi Matt,
> >
> > You ought to add duplicate versions of (or add a parameter to) the
> > call_xxx() functions that return signed values rather than
> > unsigned. I
> > find most libraries I use return signed error codes from the
> > functions
> > and put the "real" return value in some pre-allocated
> > location that you
> > pass as a parameter....
>
>