mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: remove intermediate handling for both global definition syntaxes (#6546)
This commit is contained in:
@ -3,8 +3,10 @@
|
||||
// that can be found in the LICENSE file.
|
||||
module builtin
|
||||
|
||||
__global g_m2_buf byteptr
|
||||
__global g_m2_ptr byteptr
|
||||
__global (
|
||||
g_m2_buf byteptr
|
||||
g_m2_ptr byteptr
|
||||
)
|
||||
|
||||
type FnExitCb = fn()
|
||||
fn C.atexit(f FnExitCb) int
|
||||
@ -125,10 +127,10 @@ pub fn println(s string) {
|
||||
}
|
||||
}
|
||||
|
||||
__global total_m i64=0
|
||||
__global nr_mallocs int=0
|
||||
|
||||
fn looo(){} // TODO remove, [ pratt
|
||||
__global (
|
||||
total_m = i64(0)
|
||||
nr_mallocs = int(0)
|
||||
)
|
||||
|
||||
[unsafe]
|
||||
pub fn malloc(n int) byteptr {
|
||||
|
@ -60,7 +60,7 @@ const (
|
||||
)
|
||||
|
||||
// g_original_codepage - used to restore the original windows console code page when exiting
|
||||
__global g_original_codepage u32=0
|
||||
__global ( g_original_codepage = u32(0) )
|
||||
// utf8 to stdout needs C.SetConsoleOutputCP(C.CP_UTF8)
|
||||
fn C.GetConsoleOutputCP() u32
|
||||
fn C.SetConsoleOutputCP(wCodePageID u32) bool
|
||||
|
@ -1070,7 +1070,7 @@ pub fn (s string) ustring() ustring {
|
||||
// A hack that allows to create ustring without allocations.
|
||||
// It's called from functions like draw_text() where we know that the string is going to be freed
|
||||
// right away. Uses global buffer for storing runes []int array.
|
||||
__global g_ustring_runes []int
|
||||
__global ( g_ustring_runes []int )
|
||||
|
||||
pub fn (s string) ustring_tmp() ustring {
|
||||
if g_ustring_runes.len == 0 {
|
||||
|
Reference in New Issue
Block a user