瀏覽代碼

activated system shutdown hook again, line_label macro

master
Felix Brendel 5 年之前
父節點
當前提交
f53506a723
共有 3 個文件被更改,包括 9 次插入8 次删除
  1. +7
    -7
      hooks.hpp
  2. +1
    -0
      macros.hpp
  3. +1
    -1
      types.hpp

+ 7
- 7
hooks.hpp 查看文件

@@ -75,10 +75,10 @@ struct Hook : Array_List<Lambda<void()>> {
}
};

// struct __System_Shutdown_Hook : Hook {
// void operator()() = delete;
// ~__System_Shutdown_Hook() {
// Hook::operator()();
// dealloc();
// }
// } system_shutdown_hook;
struct __System_Shutdown_Hook : Hook {
void operator()() = delete;
~__System_Shutdown_Hook() {
Hook::operator()();
dealloc();
}
} system_shutdown_hook;

+ 1
- 0
macros.hpp 查看文件

@@ -4,6 +4,7 @@
#define proc auto
#define concat(x, y) x ## y
#define label(x, y) concat(x, y)
#define line_label(x) label(x, __LINE__)


/**


+ 1
- 1
types.hpp 查看文件

@@ -35,7 +35,7 @@ struct StringSlice {
inline auto make_heap_string(const char* str) -> String {
String ret;
ret.length = strlen(str);
ret.data = strdup(str);
ret.data = _strdup(str);
return ret;
}



Loading…
取消
儲存