1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

compiler: module init function & init consts for cached modules

This commit is contained in:
joe-conigliaro
2019-10-12 09:17:37 +11:00
committed by Alexander Medvednikov
parent c7e47e6884
commit 51388fea75
11 changed files with 164 additions and 59 deletions

View File

@ -4,7 +4,7 @@
module builtin
fn builtin_init() int {
fn init() {
$if windows {
if is_atty(0) {
C._setmode(C._fileno(C.stdin), C._O_U16TEXT)
@ -15,13 +15,8 @@ fn builtin_init() int {
C.SetConsoleMode(C.GetStdHandle(C.STD_OUTPUT_HANDLE), C.ENABLE_PROCESSED_OUTPUT | 0x0004) // ENABLE_VIRTUAL_TERMINAL_PROCESSING
C.setbuf(C.stdout,0)
}
return 1
}
const (
_ = builtin_init()
)
fn C.memcpy(byteptr, byteptr, int)
fn C.memmove(byteptr, byteptr, int)
//fn C.malloc(int) byteptr