Require @(init) and @(fini) to be proc "contextless" ()

This commit is contained in:
gingerBill
2025-08-08 12:10:01 +01:00
parent 3194fda8f3
commit 7642e0a0e0
47 changed files with 170 additions and 102 deletions
+5 -2
View File
@@ -1,6 +1,7 @@
#+private
package terminal
import "base:runtime"
import "core:os"
import "core:strings"
@@ -68,9 +69,11 @@ get_environment_color :: proc() -> Color_Depth {
}
@(init)
init_terminal :: proc() {
init_terminal :: proc "contextless" () {
_init_terminal()
context = runtime.default_context()
// We respect `NO_COLOR` specifically as a color-disabler but not as a
// blanket ban on any terminal manipulation codes, hence why this comes
// after `_init_terminal` which will allow Windows to enable Virtual
@@ -81,6 +84,6 @@ init_terminal :: proc() {
}
@(fini)
fini_terminal :: proc() {
fini_terminal :: proc "contextless" () {
_fini_terminal()
}