mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
live: Fix MSVC hot code reloading (#2460)
This commit is contained in:
parent
333f0ab89f
commit
2829298de7
@ -29,6 +29,14 @@ fn (v &V) generate_hotcode_reloading_declarations() {
|
||||
} else {
|
||||
if v.pref.is_so {
|
||||
cgen.genln('HANDLE live_fn_mutex;')
|
||||
cgen.genln('
|
||||
void pthread_mutex_lock(HANDLE *m) {
|
||||
WaitForSingleObject(*m, INFINITE);
|
||||
}
|
||||
|
||||
void pthread_mutex_unlock(HANDLE *m) {
|
||||
ReleaseMutex(*m);
|
||||
}')
|
||||
}
|
||||
if v.pref.is_live {
|
||||
cgen.genln('HANDLE live_fn_mutex = 0;')
|
||||
|
@ -660,9 +660,11 @@ pub fn write_file(path, text string) {
|
||||
}
|
||||
|
||||
pub fn clear() {
|
||||
$if !windows {
|
||||
C.printf('\x1b[2J')
|
||||
C.printf('\x1b[H')
|
||||
}
|
||||
}
|
||||
|
||||
fn on_segfault(f voidptr) {
|
||||
$if windows {
|
||||
|
Loading…
Reference in New Issue
Block a user