mirror of
https://github.com/janet-lang/janet
synced 2025-01-26 23:24:44 +00:00
Update for windows compiler warning.
This commit is contained in:
parent
b990d77f16
commit
60214dc659
@ -2099,7 +2099,7 @@
|
|||||||
|
|
||||||
(defn warn-compile
|
(defn warn-compile
|
||||||
"Default handler for a compile warning"
|
"Default handler for a compile warning"
|
||||||
[msg where &opt line col]
|
[msg level where &opt line col]
|
||||||
(def ec (dyn :err-color))
|
(def ec (dyn :err-color))
|
||||||
(eprin
|
(eprin
|
||||||
(if ec "\e[33m" "")
|
(if ec "\e[33m" "")
|
||||||
@ -2108,7 +2108,7 @@
|
|||||||
line
|
line
|
||||||
":"
|
":"
|
||||||
col
|
col
|
||||||
": compile warning: ")
|
": compile warning (" level "): ")
|
||||||
(eprint msg (if ec "\e[0m" ""))
|
(eprint msg (if ec "\e[0m" ""))
|
||||||
(eflush))
|
(eflush))
|
||||||
|
|
||||||
@ -2215,7 +2215,7 @@
|
|||||||
(<= l lint-error) (do
|
(<= l lint-error) (do
|
||||||
(set good false)
|
(set good false)
|
||||||
(on-compile-error msg nil where (or line l) (or col c)))
|
(on-compile-error msg nil where (or line l) (or col c)))
|
||||||
(<= l lint-warning) (on-compile-warning msg where (or line l) (or col c))))
|
(<= l lint-warning) (on-compile-warning msg level where (or line l) (or col c))))
|
||||||
(when good
|
(when good
|
||||||
(if (= (type res) :function)
|
(if (= (type res) :function)
|
||||||
(evaluator res source env where)
|
(evaluator res source env where)
|
||||||
|
@ -436,7 +436,7 @@ static void _janet_cfuns_prefix(JanetTable *env, const char *regprefix, const Ja
|
|||||||
janet_table_put(janet_vm_registry, fun, name);
|
janet_table_put(janet_vm_registry, fun, name);
|
||||||
cfuns++;
|
cfuns++;
|
||||||
}
|
}
|
||||||
janet_free(longname_buffer);
|
(janet_free)(longname_buffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
void janet_cfuns_prefix(JanetTable *env, const char *regprefix, const JanetReg *cfuns) {
|
void janet_cfuns_prefix(JanetTable *env, const char *regprefix, const JanetReg *cfuns) {
|
||||||
@ -761,7 +761,7 @@ void *(janet_malloc)(size_t size) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void (janet_free)(void *ptr) {
|
void (janet_free)(void *ptr) {
|
||||||
return janet_free(ptr);
|
janet_free(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *(janet_calloc)(size_t nmemb, size_t size) {
|
void *(janet_calloc)(size_t nmemb, size_t size) {
|
||||||
|
Loading…
Reference in New Issue
Block a user