sub world_location
{
my ($self) = @_;
return ($self->{x}, $self->{y});
}
####
#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
####
NOK 1# Failed test (t/025_unit.t at line 128)
# got: 140725396
# expected: 84
t/025_unit...........NOK 2# Failed test (t/025_unit.t at line 129)
# got: undef
# expected: 84