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

rename ModPath to v_modules_path; do not allow long variable names without _

This commit is contained in:
Alexander Medvednikov
2019-09-29 04:54:12 +03:00
parent 8b8cd13929
commit ee8ff39454
9 changed files with 61 additions and 48 deletions

View File

@ -468,9 +468,9 @@ pub fn get_line() string {
// get_raw_line returns a one-line string from stdin along with '\n' if there is any
pub fn get_raw_line() string {
$if windows {
maxlinechars := 256
buf := &byte(malloc(maxlinechars*2))
res := int( C.fgetws(buf, maxlinechars, C.stdin ) )
max_line_chars := 256
buf := &byte(malloc(max_line_chars*2))
res := int( C.fgetws(buf, max_line_chars, C.stdin ) )
len := int( C.wcslen(&u16(buf)) )
if 0 != res { return string_from_wide2( &u16(buf), len ) }
return ''