Ver a proveniência

activated system shutdown hook again, line_label macro

master
Felix Brendel há 5 anos
ascendente
cometimento
f53506a723
3 ficheiros alterados com 9 adições e 8 eliminações
  1. +7
    -7
      hooks.hpp
  2. +1
    -0
      macros.hpp
  3. +1
    -1
      types.hpp

+ 7
- 7
hooks.hpp Ver ficheiro

@@ -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 Ver ficheiro

@@ -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 Ver ficheiro

@@ -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;
}



Carregando…
Cancelar
Guardar