|
|
|
Created:
16 years, 2 months ago by gregory.p.smith Modified:
16 years, 2 months ago Reviewers:
Antoine Pitrou CC:
report_bugs.python.org Base URL:
http://svn.python.org/view/*checkout*/python/branches/py3k/ Visibility:
Public. |
code review for http://bugs.python.org/issue3001
Patch Set 1 #
Total comments: 4
Total messages: 2
|
gregory.p.smith
http://codereview.appspot.com/150055/diff/1/4 File Modules/_threadmodule.c (right): http://codereview.appspot.com/150055/diff/1/4#newcode221 Modules/_threadmodule.c:221: return PyBool_FromLong((long) r); This explicit (long) cast is unnecessary. ...
|
16 years, 2 months ago (2009年11月07日 07:48:04 UTC) #1 | ||||||||||||||||||||||||||||
http://codereview.appspot.com/150055/diff/1/4 File Modules/_threadmodule.c (right): http://codereview.appspot.com/150055/diff/1/4#newcode221 Modules/_threadmodule.c:221: return PyBool_FromLong((long) r); This explicit (long) cast is unnecessary. http://codereview.appspot.com/150055/diff/1/4#newcode246 Modules/_threadmodule.c:246: PyThread_release_lock(self->rlock_lock); reset self->rlock_owner to 0 before releasing the lock.
Thanks for the review. I will make the suggested modifications. http://codereview.appspot.com/150055/diff/1/4 File Modules/_threadmodule.c (right): http://codereview.appspot.com/150055/diff/1/4#newcode221 Modules/_threadmodule.c:221: return PyBool_FromLong((long) r); On 2009年11月07日 07:48:05, gregory.p.smith wrote: > This explicit (long) cast is unnecessary. Right. http://codereview.appspot.com/150055/diff/1/4#newcode246 Modules/_threadmodule.c:246: PyThread_release_lock(self->rlock_lock); On 2009年11月07日 07:48:05, gregory.p.smith wrote: > reset self->rlock_owner to 0 before releasing the lock. We always check rlock_count before rlock_owner anyway but, yes, I could reset rlock_owner out of safety.