Steffen,

Thankyou. I've resolved my problems quite simply by specifying the CLASS
variable, after reading the generated c code..

So instead of:


MyClass *
MyClass::child()
  CODE:
    RETVAL = (MyClass *)safemalloc( sizeof(MyClass) );
    *RETVAL = THIS->child();

  OUTPUT:
    RETVAL

  CLEANUP:
    safefree(RETVAL);

I used:

MyClass *
MyClass::child()
  CODE:
    const char *CLASS = "MyPackage";
    RETVAL = new MyClass(THIS->child());

  OUTPUT:
    RETVAL


Cheers

James


On 10 April 2011 15:51, Steffen Mueller <smuel...@cpan.org> wrote:

> Hi James,
>
>
> On 04/10/2011 04:08 AM, James Shirley wrote:
>
>> It seems I will need to spend some time to understand XS and perl guts.
>> I was just hoping to add a perl interface without spending to much time..
>>
>
> I think you should read the rest of my previous message more carefully.
> Quite likely, it explains what your problem is and how to work around it.
>
> --Steffen
>
>

Reply via email to