[pypy-svn] pypy default: Quick fix: the value returned in case of error is actually 0...
arigo
commits-noreply at bitbucket.org
Thu Feb 10 16:48:06 CET 2011
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r41784:cfcac542508c
Date: 2011-02-10 15:52 +0100
http://bitbucket.org/pypy/pypy/changeset/cfcac542508c/
Log: Quick fix: the value returned in case of error is actually 0...
diff --git a/pypy/module/thread/ll_thread.py b/pypy/module/thread/ll_thread.py
--- a/pypy/module/thread/ll_thread.py
+++ b/pypy/module/thread/ll_thread.py
@@ -133,7 +133,7 @@
# lock objects, as well as from the GIL, which exists at shutdown.
ll_lock = lltype.malloc(TLOCKP.TO, flavor='raw', track_allocation=False)
res = c_thread_lock_init(ll_lock)
- if res == -1:
+ if res <= 0:
lltype.free(ll_lock, flavor='raw', track_allocation=False)
raise error("out of resources")
return ll_lock
More information about the Pypy-commit
mailing list