#include "EXTERN.h" #include "perl.h" #include "XSUB.h" AV* world_location( SV* self ) { HV *hash_self = (HV*) SvRV( self ); SV **x = hv_fetch( hash_self, "x", 1, FALSE ); SV **y = hv_fetch( hash_self, "y", 1, FALSE ); AV *to_return = newAV(); av_push( to_return, *x ); av_push( to_return, *y ); return to_return; } MODULE = My::Games::Azure::Unit PACKAGE = My::Games::Azure::Unit PROTOTYPES: DISABLE AV* world_location(self) SV* self