in reply to Re^2: returning an object in XS
in thread returning an object in XS

Oh I found it. The line

result = (rect*)safemalloc(sizeof(rect*));

should be

result = (rect*)safemalloc(sizeof(rect));

Regards,