This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2012年04月12日 21:49 by Jim.Jewett, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Messages (6) | |||
|---|---|---|---|
| msg158174 - (view) | Author: Jim Jewett (Jim.Jewett) * (Python triager) | Date: 2012年04月12日 21:49 | |
The C linkage is guarded by WITH_THREAD. The 'extern "C" {' and '}' declarations should be in effect regardless of threading.
Note that the bug can only be triggered by compiling without threads, but with a C++ compiler; this is obscure enough that I don't feel strongly about backporting.
|
|||
| msg158176 - (view) | Author: Jim Jewett (Jim.Jewett) * (Python triager) | Date: 2012年04月12日 21:52 | |
http://hg.python.org/cpython/file/0f114b855824/Python/pystate.c#l25 #ifdef WITH_THREAD #include "pythread.h" static PyThread_type_lock head_mutex = NULL; /* Protects interp->tstate_head */ #define HEAD_INIT() (void)(head_mutex || (head_mutex = PyThread_allocate_lock())) #define HEAD_LOCK() PyThread_acquire_lock(head_mutex, WAIT_LOCK) #define HEAD_UNLOCK() PyThread_release_lock(head_mutex) #ifdef __cplusplus extern "C" { #endif |
|||
| msg158205 - (view) | Author: Antoine Pitrou (pitrou) * (Python committer) | Date: 2012年04月13日 10:19 | |
I don't think you need anyone's permission to commit such a fix :) |
|||
| msg158209 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年04月13日 15:59 | |
New changeset 5cc359804d61 by Benjamin Peterson in branch '3.2': take linkage def outside of WITH_THREAD conditional (closes #14569) http://hg.python.org/cpython/rev/5cc359804d61 |
|||
| msg158210 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2012年04月13日 16:00 | |
New changeset 508ae5d27c2c by Benjamin Peterson in branch '2.7': take linkage def outside of WITH_THREAD conditional (closes #14569) http://hg.python.org/cpython/rev/508ae5d27c2c |
|||
| msg158450 - (view) | Author: Jim Jewett (Jim.Jewett) * (Python triager) | Date: 2012年04月16日 13:50 | |
On Fri, Apr 13, 2012 at 6:19 AM, Antoine Pitrou <pitrou@free.fr> added the comment: > I don't think you need anyone's permission to commit such a fix :) Well, *I* would, since I don't have commit privs, and don't currently have a C dev environment with which to test. But I figured testing the various build conditions might be good documentation-of-ability for someone applying to GSoC or otherwise trying to get started. (OK, the timing wouldn't be ideal, ...) That said, I foresee adding build-multiple-ways to the regression tests (as opposed to a buildbot), so I'll let the next applicant come up with something else. :D |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:29 | admin | set | github: 58774 |
| 2012年04月16日 13:50:22 | Jim.Jewett | set | messages: + msg158450 |
| 2012年04月13日 16:00:55 | python-dev | set | messages: + msg158210 |
| 2012年04月13日 15:59:57 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg158209 resolution: fixed stage: needs patch -> resolved |
| 2012年04月13日 10:19:33 | pitrou | set | nosy:
+ pitrou messages: + msg158205 |
| 2012年04月12日 21:52:41 | Jim.Jewett | set | priority: normal -> low type: compile error messages: + msg158176 stage: needs patch |
| 2012年04月12日 21:49:06 | Jim.Jewett | create | |