Of course this could be easily solved if one can edit the subroutine. However, as the poster noted, it's someone else's code and an XS sub, not a Perl sub.
When's the last time you used duct tape on a duct? --Larry Wall
Comment on Re^2: Trouble getting size of list returned from sub