Add support for sun.misc.SignalHandler (#1276)

This commit is contained in:
Michiel Borkent 2022-05-27 13:26:40 +02:00 committed by GitHub
parent 92b4dc7620
commit 17c047418e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 5 deletions

View file

@ -19,7 +19,7 @@
"resources" "sci/resources"],
:deps {org.clojure/clojure {:mvn/version "1.11.0"},
org.babashka/sci {:local/root "sci"}
org.babashka/babashka.impl.reify {:mvn/version "0.1.0"}
org.babashka/babashka.impl.reify {:mvn/version "0.1.1"}
org.babashka/sci.impl.types {:mvn/version "0.0.2"}
babashka/babashka.curl {:local/root "babashka.curl"}
babashka/fs {:local/root "fs"}

View file

@ -26,7 +26,7 @@
[nrepl/bencode "1.1.0"]
[borkdude/sci.impl.reflector "0.0.1"]
[org.babashka/sci.impl.types "0.0.2"]
[org.babashka/babashka.impl.reify "0.1.0"]
[org.babashka/babashka.impl.reify "0.1.1"]
[org.clojure/core.async "1.5.648"]
[org.clojure/test.check "1.1.1"]
[com.github.clj-easy/graal-build-time "0.1.0"]

View file

@ -3,7 +3,7 @@
[clojure.tools.build.api :as b]))
(def lib 'org.babashka/babashka.impl.reify)
(def version "0.1.0")
(def version "0.1.1")
(def class-dir "target/classes")
(def basis (b/create-basis {:project "deps.edn"}))
(def jar-file (format "target/%s-%s.jar" (name lib) version))

View file

@ -27,4 +27,5 @@
java.util.function.Supplier
java.lang.Comparable
javax.net.ssl.X509TrustManager
clojure.lang.LispReader$Resolver])
clojure.lang.LispReader$Resolver
sun.misc.SignalHandler])

View file

@ -418,6 +418,8 @@
java.util.zip.ZipEntry
java.util.zip.ZipException
java.util.zip.ZipFile
sun.misc.Signal
sun.misc.SignalHandler
~(symbol "[B")
~(symbol "[I")
~(symbol "[Ljava.lang.Object;")

View file

@ -74,6 +74,11 @@
(proxy [javax.net.ssl.HostnameVerifier] []
(verify [host-name session] ((method-or-bust methods 'verify) this host-name session)))
["sun.misc.SignalHandler" #{}]
(proxy [sun.misc.SignalHandler] []
(handle [sig]
((method-or-bust methods 'handle) this sig)))
["java.io.PipedInputStream" #{}]
(proxy [java.io.PipedInputStream] []
(available [] ((method-or-bust methods 'available) this))
@ -92,7 +97,9 @@
(flush [] ((method-or-bust methods 'flush) this))
(write
([b] ((method-or-bust methods 'write) this b))
([b off len] ((method-or-bust methods 'write) this b off len)))))))
([b off len] ((method-or-bust methods 'write) this b off len))))
, ;; keep this for merge friendliness
)))
(defn class-sym [c] (symbol (class-name c)))

View file

@ -185,4 +185,7 @@
resolveAlias [[this sym]]
resolveVar [[this sym]]}
sun.misc.SignalHandler
{handle [[this signal]]}
}))