Author: Christian Tismer <[email protected]>
Branch: win64_gborg
Changeset: r48826:8910ec31f7e2
Date: 2011-11-06 14:37 +0100
http://bitbucket.org/pypy/pypy/changeset/8910ec31f7e2/

Log:    reverted a few changes which cannot take external macros

diff --git a/pypy/translator/c/src/stack.h b/pypy/translator/c/src/stack.h
--- a/pypy/translator/c/src/stack.h
+++ b/pypy/translator/c/src/stack.h
@@ -12,17 +12,17 @@
 #include "thread.h"
 
 extern char *_LLstacktoobig_stack_end;
-extern new_long _LLstacktoobig_stack_length;
+extern long _LLstacktoobig_stack_length;
 extern char _LLstacktoobig_report_error;
 
-char LL_stack_too_big_slowpath(new_long);    /* returns 0 (ok) or 1 (too big) 
*/
+char LL_stack_too_big_slowpath(long);    /* returns 0 (ok) or 1 (too big) */
 void LL_stack_set_length_fraction(double);
 
 /* some macros referenced from pypy.rlib.rstack */
-#define LL_stack_get_end() ((new_long)_LLstacktoobig_stack_end)
+#define LL_stack_get_end() ((long)_LLstacktoobig_stack_end)
 #define LL_stack_get_length() _LLstacktoobig_stack_length
-#define LL_stack_get_end_adr()    ((new_long)&_LLstacktoobig_stack_end)   /* 
JIT */
-#define LL_stack_get_length_adr() ((new_long)&_LLstacktoobig_stack_length)/* 
JIT */
+#define LL_stack_get_end_adr()    ((long)&_LLstacktoobig_stack_end)   /* JIT */
+#define LL_stack_get_length_adr() ((long)&_LLstacktoobig_stack_length)/* JIT */
 
 #define LL_stack_criticalcode_start()  (_LLstacktoobig_report_error = 0)
 #define LL_stack_criticalcode_stop()   (_LLstacktoobig_report_error = 1)
@@ -41,18 +41,18 @@
 /* the current stack is in the interval [end-length:end].  We assume a
    stack that grows downward here. */
 char *_LLstacktoobig_stack_end = NULL;
-new_long _LLstacktoobig_stack_length = MAX_STACK_SIZE;
+long _LLstacktoobig_stack_length = MAX_STACK_SIZE;
 char _LLstacktoobig_report_error = 1;
 static RPyThreadStaticTLS end_tls_key;
 
 void LL_stack_set_length_fraction(double fraction)
 {
-       _LLstacktoobig_stack_length = (new_long)(MAX_STACK_SIZE * fraction);
+       _LLstacktoobig_stack_length = (long)(MAX_STACK_SIZE * fraction);
 }
 
-char LL_stack_too_big_slowpath(new_long current)
+char LL_stack_too_big_slowpath(long current)
 {
-       new_long diff, max_stack_size;
+       long diff, max_stack_size;
        char *baseptr, *curptr = (char*)current;
 
        /* The stack_end variable is updated to match the current value
@@ -81,12 +81,12 @@
        }
        else {
                diff = baseptr - curptr;
-               if (((unsigned new_long)diff) <= (unsigned 
new_long)max_stack_size) {
+               if (((unsigned long)diff) <= (unsigned long)max_stack_size) {
                        /* within bounds, probably just had a thread switch */
                        _LLstacktoobig_stack_end = baseptr;
                        return 0;
                }
-               if (((unsigned new_long)-diff) <= (unsigned 
new_long)max_stack_size) {
+               if (((unsigned long)-diff) <= (unsigned long)max_stack_size) {
                        /* stack underflowed: the initial estimation of
                           the stack base must be revised */
                }
diff --git a/pypy/translator/c/src/thread.h b/pypy/translator/c/src/thread.h
--- a/pypy/translator/c/src/thread.h
+++ b/pypy/translator/c/src/thread.h
@@ -37,8 +37,8 @@
 
 #endif
 
-new_long RPyGilAllocate(void);
-new_long RPyGilYieldThread(void);
+long RPyGilAllocate(void);
+long RPyGilYieldThread(void);
 void RPyGilRelease(void);
 void RPyGilAcquire(void);
 
diff --git a/pypy/translator/c/src/thread_nt.h 
b/pypy/translator/c/src/thread_nt.h
--- a/pypy/translator/c/src/thread_nt.h
+++ b/pypy/translator/c/src/thread_nt.h
@@ -17,7 +17,7 @@
 
 typedef struct {
        void (*func)(void);
-       new_long id;
+       long id;
        HANDLE done;
 } callobj;
 
@@ -28,7 +28,7 @@
 } NRMUTEX, *PNRMUTEX ;
 
 /* prototypes */
-new_long RPyThreadStart(void (*func)(void));
+long RPyThreadStart(void (*func)(void));
 BOOL InitializeNonRecursiveMutex(PNRMUTEX mutex);
 VOID DeleteNonRecursiveMutex(PNRMUTEX mutex);
 DWORD EnterNonRecursiveMutex(PNRMUTEX mutex, BOOL wait);
@@ -36,15 +36,15 @@
 void RPyOpaqueDealloc_ThreadLock(struct RPyOpaque_ThreadLock *lock);
 int RPyThreadAcquireLock(struct RPyOpaque_ThreadLock *lock, int waitflag);
 void RPyThreadReleaseLock(struct RPyOpaque_ThreadLock *lock);
-new_long RPyThreadGetStackSize(void);
-new_long RPyThreadSetStackSize(new_long);
+long RPyThreadGetStackSize(void);
+long RPyThreadSetStackSize(long);
 
 
 /* implementations */
 
 #ifndef PYPY_NOT_MAIN_FILE
 
-static new_long _pypythread_stacksize = 0;
+static long _pypythread_stacksize = 0;
 
 /*
  * Return the thread Id instead of an handle. The Id is said to uniquely
@@ -67,9 +67,9 @@
        func();
 }
 
-new_long RPyThreadStart(void (*func)(void))
+long RPyThreadStart(void (*func)(void))
 {
-       unsigned new_long rv;
+       unsigned long rv;
        callobj obj;
 
        obj.id = -1;    /* guilty until proved innocent */
@@ -79,7 +79,7 @@
                return -1;
 
        rv = _beginthread(bootstrap, _pypythread_stacksize, &obj);
-       if (rv == (unsigned new_long)-1) {
+       if (rv == (unsigned long)-1) {
                /* I've seen errno == EAGAIN here, which means "there are
                 * too many threads".
                 */
@@ -100,12 +100,12 @@
 #define THREAD_MIN_STACKSIZE    0x8000      /* 32kB */
 #define THREAD_MAX_STACKSIZE    0x10000000  /* 256MB */
 
-new_long RPyThreadGetStackSize(void)
+long RPyThreadGetStackSize(void)
 {
        return _pypythread_stacksize;
 }
 
-new_long RPyThreadSetStackSize(new_long newsize)
+long RPyThreadSetStackSize(long newsize)
 {
        if (newsize == 0) {    /* set to default */
                _pypythread_stacksize = 0;
@@ -229,7 +229,7 @@
 static CRITICAL_SECTION mutex_gil;
 static HANDLE cond_gil;
 
-new_long RPyGilAllocate(void)
+long RPyGilAllocate(void)
 {
     pending_acquires = 0;
     InitializeCriticalSection(&mutex_gil);
@@ -238,7 +238,7 @@
     return 1;
 }
 
-new_long RPyGilYieldThread(void)
+long RPyGilYieldThread(void)
 {
     /* can be called even before RPyGilAllocate(), but in this case,
        pending_acquires will be -1 */
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to