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 2011年07月21日 20:38 by joshtriplett, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| fix_empty_macro.patch | petri.lehtinen, 2011年07月22日 18:04 | |||
| Messages (6) | |||
|---|---|---|---|
| msg140827 - (view) | Author: Josh Triplett (joshtriplett) | Date: 2011年07月21日 20:38 | |
In _sre.c, the VTRACE macro normally gets defined to nothing. It later gets used as the body of control structures such as "else" without braces, which causes many compilers to warn (to catch stray semicolons like "else;"). This makes it difficult to compile Python as part of a project which uses -Werror, such as GRUB. Please consider defining VTRACE as do {} while(0) instead, as the standard convention for an empty function-like macro with no return value.
|
|||
| msg140899 - (view) | Author: Petri Lehtinen (petri.lehtinen) * (Python committer) | Date: 2011年07月22日 18:04 | |
Attached a patch against 2.7 that adds the suggested fix. |
|||
| msg140960 - (view) | Author: Petri Lehtinen (petri.lehtinen) * (Python committer) | Date: 2011年07月23日 10:17 | |
Should the component really be extension modules? I don't believe _sre.c is a part of the API, and the problem is embedding Python as a whole. |
|||
| msg141786 - (view) | Author: Éric Araujo (eric.araujo) * (Python committer) | Date: 2011年08月08日 15:20 | |
_sre is a module written in C, not Python; we call that an extension module. The Library component is used for Python modules, which are found in the Lib directory in a checkout of CPython. See #12711. |
|||
| msg141794 - (view) | Author: Petri Lehtinen (petri.lehtinen) * (Python committer) | Date: 2011年08月08日 17:40 | |
Éric Araujo wrote: > _sre is a module written in C, not Python; we call that an extension > module. The Library component is used for Python modules, which are > found in the Lib directory in a checkout of CPython. See #12711. Ok, I wasn't aware of this. Thanks. |
|||
| msg145930 - (view) | Author: Roundup Robot (python-dev) (Python triager) | Date: 2011年10月19日 18:17 | |
New changeset f35514dfadf8 by Senthil Kumaran in branch '2.7': Fix Issue 12604 - Use a proper no-op macro expansion for VTRACE macro in _sre.c http://hg.python.org/cpython/rev/f35514dfadf8 New changeset ab028084f704 by Senthil Kumaran in branch '3.2': 3.2 - Fix Issue 12604 - Use a proper no-op macro expansion for VTRACE macro in _sre.c http://hg.python.org/cpython/rev/ab028084f704 New changeset 847afc310190 by Senthil Kumaran in branch 'default': default - Fix closes Issue 12604 - Use a proper no-op macro expansion for VTRACE macro in _sre.c http://hg.python.org/cpython/rev/847afc310190 |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:19 | admin | set | github: 56813 |
| 2011年10月19日 18:17:19 | python-dev | set | status: open -> closed nosy: + python-dev messages: + msg145930 resolution: fixed stage: commit review -> resolved |
| 2011年08月08日 17:40:39 | petri.lehtinen | set | messages: + msg141794 |
| 2011年08月08日 15:22:01 | eric.araujo | set | stage: patch review -> commit review |
| 2011年08月08日 15:20:58 | eric.araujo | set | nosy:
+ eric.araujo messages: + msg141786 |
| 2011年07月23日 10:17:23 | petri.lehtinen | set | messages: + msg140960 |
| 2011年07月22日 21:41:07 | eric.araujo | set | components:
+ Extension Modules, - Library (Lib) versions: + Python 3.2, Python 3.3 |
| 2011年07月22日 18:05:09 | petri.lehtinen | set | keywords:
+ needs review components: + Build, Library (Lib) stage: patch review |
| 2011年07月22日 18:04:15 | petri.lehtinen | set | files:
+ fix_empty_macro.patch nosy: + petri.lehtinen messages: + msg140899 keywords: + patch |
| 2011年07月21日 20:38:13 | joshtriplett | create | |