Commits

mattip  committed d6b5957

trying to fix fron thread/thread_nt split

  • Participants
  • Parent commits 2ef0f6e

Comments (0)

Files changed (3)

File pypy/module/cpyext/api.py

             global_objects.append('%s %s = NULL;' % (typ, name))
     global_code = '\n'.join(global_objects)
 
-    prologue = ("#include <Python.h>\n"
+    if sys.platform == "win32":
+        prologue = ("#include <Python.h>\n"
+                "#include <src/thread_nt.c>\n")
+    else:
+        prologue = ("#include <Python.h>\n"
                 "#include <src/thread.c>\n")
     code = (prologue +
             struct_declaration_code +
             kwds["link_extra"] = ["msvcrt.lib"]
         elif sys.platform.startswith('linux'):
             compile_extra.append("-Werror=implicit-function-declaration")
+            compile_extra.append('-g')
         export_symbols_eci.append('pypyAPI')
-        compile_extra.append('-g')
     else:
         kwds["includes"] = ['Python.h'] # this is our Python.h
 

File rpython/translator/c/src/thread_nt.c

 /*
  * Thread support.
  */
+#include "thread.h"
 
 typedef struct RPyOpaque_ThreadLock NRMUTEX, *PNRMUTEX;
 

File rpython/translator/c/src/thread_nt.h

 } NRMUTEX, *PNRMUTEX;
 
 /* prototypes */
+long RPyThreadGetIdent(void);
 long RPyThreadStart(void (*func)(void));
 int RPyThreadLockInit(struct RPyOpaque_ThreadLock *lock);
 void RPyOpaqueDealloc_ThreadLock(struct RPyOpaque_ThreadLock *lock);