activated system shutdown hook again, line_label macro
This commit is contained in:
@@ -75,10 +75,10 @@ struct Hook : Array_List<Lambda<void()>> {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
// struct __System_Shutdown_Hook : Hook {
|
struct __System_Shutdown_Hook : Hook {
|
||||||
// void operator()() = delete;
|
void operator()() = delete;
|
||||||
// ~__System_Shutdown_Hook() {
|
~__System_Shutdown_Hook() {
|
||||||
// Hook::operator()();
|
Hook::operator()();
|
||||||
// dealloc();
|
dealloc();
|
||||||
// }
|
}
|
||||||
// } system_shutdown_hook;
|
} system_shutdown_hook;
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#define proc auto
|
#define proc auto
|
||||||
#define concat(x, y) x ## y
|
#define concat(x, y) x ## y
|
||||||
#define label(x, y) concat(x, y)
|
#define label(x, y) concat(x, y)
|
||||||
|
#define line_label(x) label(x, __LINE__)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ struct StringSlice {
|
|||||||
inline auto make_heap_string(const char* str) -> String {
|
inline auto make_heap_string(const char* str) -> String {
|
||||||
String ret;
|
String ret;
|
||||||
ret.length = strlen(str);
|
ret.length = strlen(str);
|
||||||
ret.data = strdup(str);
|
ret.data = _strdup(str);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user