[Cleanup] Quest API push methods using invalid types. (#2172)

* [Cleanup] Quest API push methods using invalid types.
- Some push methods were pushing integers as unsigned integers or unsigned integer as integers, this fixes all of that.
- Also cleans up some lines that had multiple function calls on them.

* More cleanup of bools and one expansion name was wrong.
This commit is contained in:
Kinglykrab 2022-05-15 22:14:16 -04:00 committed by GitHub
parent 8554aab2ff
commit 7c1a139991
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
16 changed files with 454 additions and 288 deletions

View File

@ -54,7 +54,7 @@ namespace Expansion {
VeilOfAlaris, VeilOfAlaris,
RainOfFear, RainOfFear,
CallOfTheForsaken, CallOfTheForsaken,
TheDarkendSea, TheDarkenedSea,
TheBrokenMirror, TheBrokenMirror,
EmpiresOfKunark, EmpiresOfKunark,
RingOfScale, RingOfScale,
@ -127,7 +127,7 @@ public:
bool IsVeilOfAlarisEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::VeilOfAlaris || GetCurrentExpansion() == Expansion::EXPANSION_ALL; } bool IsVeilOfAlarisEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::VeilOfAlaris || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsRainOfFearEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::RainOfFear || GetCurrentExpansion() == Expansion::EXPANSION_ALL; } bool IsRainOfFearEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::RainOfFear || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsCallOfTheForsakenEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::CallOfTheForsaken || GetCurrentExpansion() == Expansion::EXPANSION_ALL; } bool IsCallOfTheForsakenEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::CallOfTheForsaken || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsTheDarkendSeaEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::TheDarkendSea || GetCurrentExpansion() == Expansion::EXPANSION_ALL; } bool IsTheDarkenedSeaEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::TheDarkenedSea || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsTheBrokenMirrorEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::TheBrokenMirror || GetCurrentExpansion() == Expansion::EXPANSION_ALL; } bool IsTheBrokenMirrorEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::TheBrokenMirror || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsEmpiresOfKunarkEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::EmpiresOfKunark || GetCurrentExpansion() == Expansion::EXPANSION_ALL; } bool IsEmpiresOfKunarkEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::EmpiresOfKunark || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
bool IsRingOfScaleEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::RingOfScale || GetCurrentExpansion() == Expansion::EXPANSION_ALL; } bool IsRingOfScaleEnabled() { return GetCurrentExpansion() >= Expansion::ExpansionNumber::RingOfScale || GetCurrentExpansion() == Expansion::EXPANSION_ALL; }
@ -155,7 +155,7 @@ public:
bool IsCurrentExpansionVeilOfAlaris() { return current_expansion == Expansion::ExpansionNumber::VeilOfAlaris; } bool IsCurrentExpansionVeilOfAlaris() { return current_expansion == Expansion::ExpansionNumber::VeilOfAlaris; }
bool IsCurrentExpansionRainOfFear() { return current_expansion == Expansion::ExpansionNumber::RainOfFear; } bool IsCurrentExpansionRainOfFear() { return current_expansion == Expansion::ExpansionNumber::RainOfFear; }
bool IsCurrentExpansionCallOfTheForsaken() { return current_expansion == Expansion::ExpansionNumber::CallOfTheForsaken; } bool IsCurrentExpansionCallOfTheForsaken() { return current_expansion == Expansion::ExpansionNumber::CallOfTheForsaken; }
bool IsCurrentExpansionTheDarkendSea() { return current_expansion == Expansion::ExpansionNumber::TheDarkendSea; } bool IsCurrentExpansionTheDarkenedSea() { return current_expansion == Expansion::ExpansionNumber::TheDarkenedSea; }
bool IsCurrentExpansionTheBrokenMirror() { return current_expansion == Expansion::ExpansionNumber::TheBrokenMirror; } bool IsCurrentExpansionTheBrokenMirror() { return current_expansion == Expansion::ExpansionNumber::TheBrokenMirror; }
bool IsCurrentExpansionEmpiresOfKunark() { return current_expansion == Expansion::ExpansionNumber::EmpiresOfKunark; } bool IsCurrentExpansionEmpiresOfKunark() { return current_expansion == Expansion::ExpansionNumber::EmpiresOfKunark; }
bool IsCurrentExpansionRingOfScale() { return current_expansion == Expansion::ExpansionNumber::RingOfScale; } bool IsCurrentExpansionRingOfScale() { return current_expansion == Expansion::ExpansionNumber::RingOfScale; }

View File

@ -58,7 +58,8 @@ XS(XS_EQDB_field_count)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->field_count(); RETVAL = THIS->field_count();
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -84,7 +85,8 @@ XS(XS_EQDB_affected_rows)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->affected_rows(); RETVAL = THIS->affected_rows();
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -110,7 +112,8 @@ XS(XS_EQDB_insert_id)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->insert_id(); RETVAL = THIS->insert_id();
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -136,7 +139,8 @@ XS(XS_EQDB_get_errno)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->get_errno(); RETVAL = THIS->get_errno();
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }

View File

@ -54,7 +54,8 @@ XS(XS_EQDBRes_num_rows)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->num_rows(); RETVAL = THIS->num_rows();
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -80,7 +81,8 @@ XS(XS_EQDBRes_num_fields)
Perl_croak(aTHX_ "THIS is nullptr, avoiding crash."); Perl_croak(aTHX_ "THIS is nullptr, avoiding crash.");
RETVAL = THIS->num_fields(); RETVAL = THIS->num_fields();
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }

File diff suppressed because it is too large Load Diff

View File

@ -1619,8 +1619,8 @@ bool lua_is_call_of_the_forsaken_enabled() {
return content_service.IsCallOfTheForsakenEnabled(); return content_service.IsCallOfTheForsakenEnabled();
} }
bool lua_is_the_darkend_sea_enabled() { bool lua_is_the_darkened_sea_enabled() {
return content_service.IsTheDarkendSeaEnabled(); return content_service.IsTheDarkenedSeaEnabled();
} }
bool lua_is_the_broken_mirror_enabled() { bool lua_is_the_broken_mirror_enabled() {
@ -1727,8 +1727,8 @@ bool lua_is_current_expansion_call_of_the_forsaken() {
return content_service.IsCurrentExpansionCallOfTheForsaken(); return content_service.IsCurrentExpansionCallOfTheForsaken();
} }
bool lua_is_current_expansion_the_darkend_sea() { bool lua_is_current_expansion_the_darkened_sea() {
return content_service.IsCurrentExpansionTheDarkendSea(); return content_service.IsCurrentExpansionTheDarkenedSea();
} }
bool lua_is_current_expansion_the_broken_mirror() { bool lua_is_current_expansion_the_broken_mirror() {
@ -4078,7 +4078,7 @@ luabind::scope lua_register_general() {
luabind::def("is_veil_of_alaris_enabled", &lua_is_veil_of_alaris_enabled), luabind::def("is_veil_of_alaris_enabled", &lua_is_veil_of_alaris_enabled),
luabind::def("is_rain_of_fear_enabled", &lua_is_rain_of_fear_enabled), luabind::def("is_rain_of_fear_enabled", &lua_is_rain_of_fear_enabled),
luabind::def("is_call_of_the_forsaken_enabled", &lua_is_call_of_the_forsaken_enabled), luabind::def("is_call_of_the_forsaken_enabled", &lua_is_call_of_the_forsaken_enabled),
luabind::def("is_the_darkend_sea_enabled", &lua_is_the_darkend_sea_enabled), luabind::def("is_the_darkened_sea_enabled", &lua_is_the_darkened_sea_enabled),
luabind::def("is_the_broken_mirror_enabled", &lua_is_the_broken_mirror_enabled), luabind::def("is_the_broken_mirror_enabled", &lua_is_the_broken_mirror_enabled),
luabind::def("is_empires_of_kunark_enabled", &lua_is_empires_of_kunark_enabled), luabind::def("is_empires_of_kunark_enabled", &lua_is_empires_of_kunark_enabled),
luabind::def("is_ring_of_scale_enabled", &lua_is_ring_of_scale_enabled), luabind::def("is_ring_of_scale_enabled", &lua_is_ring_of_scale_enabled),
@ -4105,7 +4105,7 @@ luabind::scope lua_register_general() {
luabind::def("is_current_expansion_veil_of_alaris", &lua_is_current_expansion_veil_of_alaris), luabind::def("is_current_expansion_veil_of_alaris", &lua_is_current_expansion_veil_of_alaris),
luabind::def("is_current_expansion_rain_of_fear", &lua_is_current_expansion_rain_of_fear), luabind::def("is_current_expansion_rain_of_fear", &lua_is_current_expansion_rain_of_fear),
luabind::def("is_current_expansion_call_of_the_forsaken", &lua_is_current_expansion_call_of_the_forsaken), luabind::def("is_current_expansion_call_of_the_forsaken", &lua_is_current_expansion_call_of_the_forsaken),
luabind::def("is_current_expansion_the_darkend_sea", &lua_is_current_expansion_the_darkend_sea), luabind::def("is_current_expansion_the_darkened_sea", &lua_is_current_expansion_the_darkened_sea),
luabind::def("is_current_expansion_the_broken_mirror", &lua_is_current_expansion_the_broken_mirror), luabind::def("is_current_expansion_the_broken_mirror", &lua_is_current_expansion_the_broken_mirror),
luabind::def("is_current_expansion_empires_of_kunark", &lua_is_current_expansion_empires_of_kunark), luabind::def("is_current_expansion_empires_of_kunark", &lua_is_current_expansion_empires_of_kunark),
luabind::def("is_current_expansion_ring_of_scale", &lua_is_current_expansion_ring_of_scale), luabind::def("is_current_expansion_ring_of_scale", &lua_is_current_expansion_ring_of_scale),

View File

@ -3810,7 +3810,7 @@ XS(XS_Client_GetSpellIDByBookSlot) {
VALIDATE_THIS_IS_CLIENT; VALIDATE_THIS_IS_CLIENT;
RETVAL = THIS->GetSpellIDByBookSlot(slot_id); RETVAL = THIS->GetSpellIDByBookSlot(slot_id);
XSprePUSH; XSprePUSH;
PUSHi((IV)RETVAL); PUSHi((IV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -4661,7 +4661,7 @@ XS(XS_Client_GetMoney) {
VALIDATE_THIS_IS_CLIENT; VALIDATE_THIS_IS_CLIENT;
RETVAL = THIS->GetMoney(type, subtype); RETVAL = THIS->GetMoney(type, subtype);
XSprePUSH; XSprePUSH;
PUSHn((uint32) RETVAL); PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -4678,7 +4678,7 @@ XS(XS_Client_GetAccountAge) {
VALIDATE_THIS_IS_CLIENT; VALIDATE_THIS_IS_CLIENT;
RETVAL = THIS->GetAccountAge(); RETVAL = THIS->GetAccountAge();
XSprePUSH; XSprePUSH;
PUSHn((int) RETVAL); PUSHi((IV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -4773,7 +4773,7 @@ XS(XS_Client_GetClientMaxLevel) {
VALIDATE_THIS_IS_CLIENT; VALIDATE_THIS_IS_CLIENT;
RETVAL = THIS->GetClientMaxLevel(); RETVAL = THIS->GetClientMaxLevel();
XSprePUSH; XSprePUSH;
PUSHu((UV)RETVAL); PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -6019,7 +6019,7 @@ XS(XS_Client_GetEnvironmentDamageModifier) {
VALIDATE_THIS_IS_CLIENT; VALIDATE_THIS_IS_CLIENT;
RETVAL = THIS->GetEnvironmentDamageModifier(); RETVAL = THIS->GetEnvironmentDamageModifier();
XSprePUSH; XSprePUSH;
PUSHi((IV)RETVAL); PUSHi((IV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -6156,7 +6156,7 @@ XS(XS_Client_CountAugmentEquippedByID) {
VALIDATE_THIS_IS_CLIENT; VALIDATE_THIS_IS_CLIENT;
quantity = THIS->GetInv().CountAugmentEquippedByID(item_id); quantity = THIS->GetInv().CountAugmentEquippedByID(item_id);
XSprePUSH; XSprePUSH;
PUSHi((IV)quantity); PUSHi((IV) quantity);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -6228,7 +6228,7 @@ XS(XS_Client_CountItemEquippedByID) {
VALIDATE_THIS_IS_CLIENT; VALIDATE_THIS_IS_CLIENT;
quantity = THIS->GetInv().CountItemEquippedByID(item_id); quantity = THIS->GetInv().CountItemEquippedByID(item_id);
XSprePUSH; XSprePUSH;
PUSHi((IV)quantity); PUSHi((IV) quantity);
} }
XSRETURN(1); XSRETURN(1);
} }

View File

@ -126,7 +126,7 @@ XS(XS_Inventory_GetBagIndex) {
VALIDATE_THIS_IS_INVENTORY; VALIDATE_THIS_IS_INVENTORY;
bag_index = THIS->CalcBagIdx(slot_id); bag_index = THIS->CalcBagIdx(slot_id);
XSprePUSH; XSprePUSH;
PUSHu((UV)bag_index); PUSHu((UV) bag_index);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -162,7 +162,7 @@ XS(XS_Inventory_GetMaterialFromSlot) {
VALIDATE_THIS_IS_INVENTORY; VALIDATE_THIS_IS_INVENTORY;
material = THIS->CalcMaterialFromSlot(slot_id); material = THIS->CalcMaterialFromSlot(slot_id);
XSprePUSH; XSprePUSH;
PUSHu((UV)material); PUSHu((UV) material);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -180,7 +180,7 @@ XS(XS_Inventory_GetSlotByItemInst) {
VALIDATE_THIS_IS_INVENTORY; VALIDATE_THIS_IS_INVENTORY;
slot_id = THIS->GetSlotByItemInst(item); slot_id = THIS->GetSlotByItemInst(item);
XSprePUSH; XSprePUSH;
PUSHi((IV)slot_id); PUSHi((IV) slot_id);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -198,7 +198,7 @@ XS(XS_Inventory_GetSlotFromMaterial) {
VALIDATE_THIS_IS_INVENTORY; VALIDATE_THIS_IS_INVENTORY;
slot_id = THIS->CalcSlotFromMaterial(material); slot_id = THIS->CalcSlotFromMaterial(material);
XSprePUSH; XSprePUSH;
PUSHi((IV)slot_id); PUSHi((IV) slot_id);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -222,7 +222,7 @@ XS(XS_Inventory_GetSlotID) {
} }
XSprePUSH; XSprePUSH;
PUSHi((IV)slot_id); PUSHi((IV) slot_id);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -247,7 +247,7 @@ XS(XS_Inventory_HasItem) {
slot_id = THIS->HasItem(item_id, quantity, where_to_look); slot_id = THIS->HasItem(item_id, quantity, where_to_look);
XSprePUSH; XSprePUSH;
PUSHi((IV)slot_id); PUSHi((IV) slot_id);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -269,7 +269,7 @@ XS(XS_Inventory_HasItemByLoreGroup) {
slot_id = THIS->HasItemByLoreGroup(loregroup, where_to_look); slot_id = THIS->HasItemByLoreGroup(loregroup, where_to_look);
XSprePUSH; XSprePUSH;
PUSHi((IV)slot_id); PUSHi((IV) slot_id);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -292,7 +292,7 @@ XS(XS_Inventory_HasItemByUse) {
slot_id = THIS->HasItemByUse(item_use, quantity, where_to_look); slot_id = THIS->HasItemByUse(item_use, quantity, where_to_look);
XSprePUSH; XSprePUSH;
PUSHi((IV)slot_id); PUSHi((IV) slot_id);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -387,7 +387,7 @@ XS(XS_Inventory_PushCursor) {
slot_id = 0; slot_id = 0;
XSprePUSH; XSprePUSH;
PUSHi((IV)slot_id); PUSHi((IV) slot_id);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -409,7 +409,7 @@ XS(XS_Inventory_PutItem) {
slot_id = 0; slot_id = 0;
XSprePUSH; XSprePUSH;
PUSHi((IV)slot_id); PUSHi((IV) slot_id);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -444,7 +444,7 @@ XS(XS_Inventory_CountAugmentEquippedByID) {
VALIDATE_THIS_IS_INVENTORY; VALIDATE_THIS_IS_INVENTORY;
quantity = THIS->CountAugmentEquippedByID(item_id); quantity = THIS->CountAugmentEquippedByID(item_id);
XSprePUSH; XSprePUSH;
PUSHi((IV)quantity); PUSHi((IV) quantity);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -479,7 +479,7 @@ XS(XS_Inventory_CountItemEquippedByID) {
VALIDATE_THIS_IS_INVENTORY; VALIDATE_THIS_IS_INVENTORY;
quantity = THIS->CountItemEquippedByID(item_id); quantity = THIS->CountItemEquippedByID(item_id);
XSprePUSH; XSprePUSH;
PUSHi((IV)quantity); PUSHi((IV) quantity);
} }
XSRETURN(1); XSRETURN(1);
} }

View File

@ -5677,7 +5677,7 @@ XS(XS_Mob_GetBuffStatValueBySpell) {
RETVAL = THIS->GetBuffStatValueBySpell(spellid, stat); RETVAL = THIS->GetBuffStatValueBySpell(spellid, stat);
XSprePUSH; XSprePUSH;
PUSHi((IV)RETVAL); PUSHi((IV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -5697,7 +5697,7 @@ XS(XS_Mob_GetBuffStatValueBySlot) {
RETVAL = THIS->GetBuffStatValueBySlot(slot, stat); RETVAL = THIS->GetBuffStatValueBySlot(slot, stat);
XSprePUSH; XSprePUSH;
PUSHi((IV)RETVAL); PUSHi((IV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -5858,7 +5858,7 @@ XS(XS_Mob_GetInvisibleLevel) {
VALIDATE_THIS_IS_MOB; VALIDATE_THIS_IS_MOB;
RETVAL = THIS->GetInvisibleLevel(); RETVAL = THIS->GetInvisibleLevel();
XSprePUSH; XSprePUSH;
PUSHu((UV)RETVAL); PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -5875,7 +5875,7 @@ XS(XS_Mob_GetInvisibleUndeadLevel) {
VALIDATE_THIS_IS_MOB; VALIDATE_THIS_IS_MOB;
RETVAL = THIS->GetInvisibleUndeadLevel(); RETVAL = THIS->GetInvisibleUndeadLevel();
XSprePUSH; XSprePUSH;
PUSHu((UV)RETVAL); PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -5910,7 +5910,7 @@ XS(XS_Mob_SeeInvisibleUndead) {
VALIDATE_THIS_IS_MOB; VALIDATE_THIS_IS_MOB;
RETVAL = THIS->SeeInvisibleUndead(); RETVAL = THIS->SeeInvisibleUndead();
XSprePUSH; XSprePUSH;
PUSHu((UV)RETVAL); PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }

View File

@ -1282,7 +1282,7 @@ XS(XS_NPC_GetNPCStat) {
RETVAL = THIS->GetNPCStat(identifier); RETVAL = THIS->GetNPCStat(identifier);
XSprePUSH; XSprePUSH;
PUSHn((double)RETVAL); PUSHn((double) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -1496,7 +1496,7 @@ XS(XS_NPC_GetScore) {
VALIDATE_THIS_IS_NPC; VALIDATE_THIS_IS_NPC;
RETVAL = THIS->GetScore(); RETVAL = THIS->GetScore();
XSprePUSH; XSprePUSH;
PUSHi((UV) RETVAL); PUSHi((IV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }

View File

@ -317,7 +317,8 @@ XS(XS_PerlPacket_GetByte)
uint32 pos = (uint32)SvUV(ST(1)); uint32 pos = (uint32)SvUV(ST(1));
VALIDATE_THIS_IS_PACKET; VALIDATE_THIS_IS_PACKET;
RETVAL = THIS->GetByte(pos); RETVAL = THIS->GetByte(pos);
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -335,7 +336,8 @@ XS(XS_PerlPacket_GetShort)
uint32 pos = (uint32)SvUV(ST(1)); uint32 pos = (uint32)SvUV(ST(1));
VALIDATE_THIS_IS_PACKET; VALIDATE_THIS_IS_PACKET;
RETVAL = THIS->GetShort(pos); RETVAL = THIS->GetShort(pos);
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -353,7 +355,8 @@ XS(XS_PerlPacket_GetLong)
uint32 pos = (uint32)SvUV(ST(1)); uint32 pos = (uint32)SvUV(ST(1));
VALIDATE_THIS_IS_PACKET; VALIDATE_THIS_IS_PACKET;
RETVAL = THIS->GetLong(pos); RETVAL = THIS->GetLong(pos);
XSprePUSH; PUSHu((UV)RETVAL); XSprePUSH;
PUSHu((UV) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }
@ -371,7 +374,8 @@ XS(XS_PerlPacket_GetFloat)
uint32 pos = (uint32)SvUV(ST(1)); uint32 pos = (uint32)SvUV(ST(1));
VALIDATE_THIS_IS_PACKET; VALIDATE_THIS_IS_PACKET;
RETVAL = THIS->GetFloat(pos); RETVAL = THIS->GetFloat(pos);
XSprePUSH; PUSHn((double)RETVAL); XSprePUSH;
PUSHn((double) RETVAL);
} }
XSRETURN(1); XSRETURN(1);
} }