Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update nscplugin, sbt-scala-native, ... to 0.4.15 in series/3.x #3809

Merged
merged 10 commits into from
Sep 18, 2023
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ object KqueueSystem extends PollingSystem {
final class Poller private[KqueueSystem] (kqfd: Int) {

private[this] val changelistArray = new Array[Byte](sizeof[kevent64_s].toInt * MaxEvents)
@inline private[this] def changelist = changelistArray.at(0).asInstanceOf[Ptr[kevent64_s]]
@inline private[this] def changelist =
changelistArray.atUnsafe(0).asInstanceOf[Ptr[kevent64_s]]
private[this] var changeCount = 0

private[this] val callbacks = new LongMap[Either[Throwable, Unit] => Unit]()
Expand Down
2 changes: 1 addition & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ libraryDependencies += "org.scala-js" %% "scalajs-env-selenium" % "1.1.1"
addSbtPlugin("org.typelevel" % "sbt-typelevel" % "0.5.3")

addSbtPlugin("org.scala-js" % "sbt-scalajs" % "1.13.2")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.14")
addSbtPlugin("org.scala-native" % "sbt-scala-native" % "0.4.15")
addSbtPlugin("pl.project13.scala" % "sbt-jmh" % "0.4.6")
addSbtPlugin("pl.project13.scala" % "sbt-jcstress" % "0.2.0")
addSbtPlugin("org.scalameta" % "sbt-mdoc" % "2.3.7")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ private[std] trait SecureRandomCompanionPlatform {
var i = 0
while (i < len) {
val n = Math.min(256, len - i)
if (sysrandom.getentropy(bytes.at(i), n.toULong) < 0)
if (sysrandom.getentropy(bytes.atUnsafe(i), n.toULong) < 0)
throw new RuntimeException(fromCString(strerror(errno)))
i += n
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ class FileDescriptorPollerSpec extends BaseSpec {
) {
def read(buf: Array[Byte], offset: Int, length: Int): IO[Unit] =
readHandle
.pollReadRec(()) { _ => IO(guard(unistd.read(readFd, buf.at(offset), length.toULong))) }
.pollReadRec(()) { _ =>
IO(guard(unistd.read(readFd, buf.atUnsafe(offset), length.toULong)))
}
.void

def write(buf: Array[Byte], offset: Int, length: Int): IO[Unit] =
writeHandle
.pollWriteRec(()) { _ =>
IO(guard(unistd.write(writeFd, buf.at(offset), length.toULong)))
IO(guard(unistd.write(writeFd, buf.atUnsafe(offset), length.toULong)))
}
.void

Expand Down Expand Up @@ -121,7 +123,7 @@ class FileDescriptorPollerSpec extends BaseSpec {
.surround {
IO { // trigger all the pipes at once
pipes.foreach { pipe =>
unistd.write(pipe.writeFd, Array[Byte](42).at(0), 1.toULong)
unistd.write(pipe.writeFd, Array[Byte](42).atUnsafe(0), 1.toULong)
}
}.background.surround(latch.await.as(true))
}
Expand Down
Loading