Incline is allowed to be negative and the Perl only allows uint32.
There is a minor typo fix in this as well... the "Usage example" for GetSize ..said "GetIncline" so just changed it.
Code:
@@ -332,7 +332,7 @@
Perl_croak(aTHX_ "Usage: Doors::GetIncline(THIS)");
{
Doors * THIS;
- uint32 RETVAL;
+ int32 RETVAL;
dXSTARG;
if (sv_derived_from(ST(0), "Doors")) {
@@ -345,7 +345,7 @@
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->GetIncline();
- XSprePUSH; PUSHu((UV)RETVAL);
+ XSprePUSH; PUSHi((IV)RETVAL);
}
XSRETURN(1);
}
@@ -355,7 +355,7 @@
{
dXSARGS;
if (items != 1)
- Perl_croak(aTHX_ "Usage: Doors::GetIncline(THIS)");
+ Perl_croak(aTHX_ "Usage: Doors::GetSize(THIS)");
{
Doors * THIS;
uint32 RETVAL;
@@ -482,7 +482,7 @@
Perl_croak(aTHX_ "Usage: Doors::SetIncline(THIS, type)");
{
Doors * THIS;
- uint32 type = (uint32)SvUV(ST(1));
+ int32 type = (int32)SvIV(ST(1));
if (sv_derived_from(ST(0), "Doors")) {
IV tmp = SvIV((SV*)SvRV(ST(0)));