Skip to content

Commit

Permalink
Merge pull request pistacheio#1265 from dgreatwood/launchpadFixForWin…
Browse files Browse the repository at this point in the history
…dowsSupport

Fix: Address 4 Integer Type Issues seen on Arm32 Launchpad
  • Loading branch information
dgreatwood authored Nov 22, 2024
2 parents f955e9e + 6194cdb commit e31f139
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions include/pistache/os.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ namespace Pistache
{ }

constexpr TagValue value() const { return value_; }
uint64_t valueU64() const { return (static_cast<uint64_t>
(reinterpret_cast<std::uintptr_t>(value_))); }
uint64_t valueU64() const { return (PS_FD_CAST_TO_UNUM(uint64_t, value_)); }

#ifndef _USE_LIBEVENT
constexpr
#endif
Expand Down
4 changes: 2 additions & 2 deletions include/pistache/transport.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ namespace Pistache::Tcp
bool isFile() const { return type == File; }
bool isRaw() const { return type == Raw; }
size_t size() const { return size_; }
size_t offset() const { return offset_; }
size_t offset() const { return static_cast<size_t>(offset_); }

int fd() const
{
Expand All @@ -171,7 +171,7 @@ namespace Pistache::Tcp
if (!isRaw())
return BufferHolder(_fd, size_, offset);

auto detached = _raw.copy(offset);
auto detached = _raw.copy(static_cast<size_t>(offset));
return BufferHolder(detached);
}

Expand Down
2 changes: 1 addition & 1 deletion src/common/http.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ namespace Pistache::Http

PST_OUT(writeHeaders(writer.headers(), *buf));

const size_t len = sb.st_size;
const size_t len = static_cast<size_t>(sb.st_size);

PST_OUT(writeHeader<Header::ContentLength>(os, len));

Expand Down
2 changes: 1 addition & 1 deletion version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.4.21.20241121
0.4.22.20241122

0 comments on commit e31f139

Please sign in to comment.