On 11/15/06, Steve Hay <[EMAIL PROTECTED]> wrote:
I don't know about the casting problem, but that line needs to be
fract::new(arg1, arg2, ...)
in order to get optional arguments.
Ah. Excellent. Thank you.
And I figured out the casting problem too. It was staring me in the face:
fract *
fract::new(...)
CODE:
if (items == 3) {
RETVAL = new fract(SvIV( ST(1) ), SvIV( ST(2) ));
}
else if (items == 2) {
fract * arg;
arg = (fract *)SvIV((SV*)SvRV( ST(1) ));
RETVAL = new fract(*arg);
}
else if (items == 1) {
RETVAL = new fract;
}
OUTPUT:
RETVAL