diff options
author | Pixel <pixel@nobis-crew.org> | 2011-10-12 00:03:58 -0700 |
---|---|---|
committer | Pixel <pixel@nobis-crew.org> | 2011-10-12 00:05:43 -0700 |
commit | ceb4347250d8394a2b4f5d1e634b42532f34c7d1 (patch) | |
tree | 748c9e171cb04f42b47a18e5b36d1695edac418a /includes | |
parent | d5ec579125ac11bd24cd9dcbeb2d4fe3baf53333 (diff) |
Forgot mingw32-config.h. Also fixed a couple of bugs:
WSAStartup has to be called in win32 at startup.
The TLS environment needs to be cleared when created.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/Local.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/includes/Local.h b/includes/Local.h index 79862a6..6a598ab 100644 --- a/includes/Local.h +++ b/includes/Local.h @@ -26,14 +26,14 @@ class Local : public AtStart { void set(void * obj) { void * r = getTLS(); if (r) setLocal(obj); else setGlobal(obj); } int getIndex() { return m_idx; } private: - static void * create() { void * r = malloc(s_size * sizeof(void *)); return r; } + static void * create() { void * r = calloc(s_size * sizeof(void *), 1); return r; } static void * getTLS() { return g_tlsManager->getTLS(); } static void * setTLS(void * val) { return g_tlsManager->setTLS(val); } virtual void doStart(); int m_idx; static int s_size; static void ** m_globals; - + friend class TLSManager; }; |