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 2010年11月05日 08:38 by hfuru, last changed 2022年04月11日 14:57 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 10853 | merged | ZackerySpytz, 2018年12月03日 02:38 | |
| PR 10856 | merged | miss-islington, 2018年12月03日 08:31 | |
| PR 10857 | merged | miss-islington, 2018年12月03日 08:32 | |
| PR 10858 | closed | miss-islington, 2018年12月03日 08:32 | |
| PR 11228 | merged | miss-islington, 2018年12月18日 23:38 | |
| PR 11230 | merged | ZackerySpytz, 2018年12月19日 00:19 | |
| Messages (11) | |||
|---|---|---|---|
| msg120473 - (view) | Author: Hallvard B Furuseth (hfuru) | Date: 2010年11月05日 08:38 | |
Modules/_ctypes/callproc.c:PyCArg_repr() uses sprintf(%qd, long long), which is a GNU (and more?) extension. ISO C99 says %lld. Instead, use "%" PY_FORMAT_LONG_LONG "d" from pyconfig.h/pyport.h. Kills off #ifdef MS_WIN32 too. If Python must support C libraries that handle %qd but not %lld, configure.in seems the right place. Index: ./Modules/_ctypes/callproc.c @@ -468,8 +468,3 @@ PyCArg_repr(PyCArgObject *self) case 'Q': - sprintf(buffer, -#ifdef MS_WIN32 - "<cparam '%c' (%I64d)>", -#else - "<cparam '%c' (%qd)>", -#endif + sprintf(buffer, "<cparam '%c' (%" PY_FORMAT_LONG_LONG "d)>", self->tag, self->value.q); pyport.h tests (defined(MS_WIN64) || defined(MS_WINDOWS)) instead of #ifdef MS_WIN32 for when to use %I64d. I assume that's more up to date. |
|||
| msg142299 - (view) | Author: Meador Inge (meador.inge) * (Python committer) | Date: 2011年08月18日 02:14 | |
I agree that this violates C99, but is this actually causing any real world problems with the platforms Python supports? If so, then we need a test case. This seems low priority |
|||
| msg145773 - (view) | Author: The Written Word (bugs-python@vendor.thewrittenword.com) | Date: 2011年10月18日 05:58 | |
Objects/stringobject.c already does something similar: else if (longlongflag) sprintf(s, "%" PY_FORMAT_LONG_LONG "d", va_arg(vargs, PY_LONG_LONG)); so it makes sense to do the same in Modules/_ctypes/callproc.c. |
|||
| msg235566 - (view) | Author: John Malmberg (John.Malmberg) * | Date: 2015年02月08日 20:07 | |
OpenVMS needs %lld or "%" PY_FORMAT_LONG_LONG "d" in order to build the _ctypes module. |
|||
| msg235567 - (view) | Author: Mark Lawrence (BreamoreBoy) * | Date: 2015年02月08日 20:19 | |
As VMS is not supported I doubt that people here are too bothered about what is needed to build the _ctypes module on it. |
|||
| msg330905 - (view) | Author: Zackery Spytz (ZackerySpytz) * (Python triager) | Date: 2018年12月03日 02:40 | |
I've created a PR for this issue. |
|||
| msg330911 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2018年12月03日 08:31 | |
New changeset 062cbb67726f26794b1b461853e40696b4a0b220 by Serhiy Storchaka (Zackery Spytz) in branch 'master': bpo-10320: Replace nonstandard sprintf() length modifier in ctypes' PyCArg_repr(). (GH-10853) https://github.com/python/cpython/commit/062cbb67726f26794b1b461853e40696b4a0b220 |
|||
| msg330919 - (view) | Author: miss-islington (miss-islington) | Date: 2018年12月03日 09:11 | |
New changeset a9f435e5d856fb62516b70a78217e40b90bec233 by Miss Islington (bot) in branch '3.7': bpo-10320: Replace nonstandard sprintf() length modifier in ctypes' PyCArg_repr(). (GH-10853) https://github.com/python/cpython/commit/a9f435e5d856fb62516b70a78217e40b90bec233 |
|||
| msg330920 - (view) | Author: miss-islington (miss-islington) | Date: 2018年12月03日 09:11 | |
New changeset f65ede3f8fa08493facf48177540d0ec26e59560 by Miss Islington (bot) in branch '3.6': bpo-10320: Replace nonstandard sprintf() length modifier in ctypes' PyCArg_repr(). (GH-10853) https://github.com/python/cpython/commit/f65ede3f8fa08493facf48177540d0ec26e59560 |
|||
| msg332102 - (view) | Author: miss-islington (miss-islington) | Date: 2018年12月18日 23:51 | |
New changeset 53e2248a94cd89e65326c5cfd400f74a88552d8c by Miss Islington (bot) in branch '2.7': bpo-10320: Replace nonstandard sprintf() length modifier in ctypes' PyCArg_repr(). (GH-10853) https://github.com/python/cpython/commit/53e2248a94cd89e65326c5cfd400f74a88552d8c |
|||
| msg332109 - (view) | Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) | Date: 2018年12月19日 06:01 | |
New changeset 838645dc4191c4109e2b300cf9ed9d481b55509f by Serhiy Storchaka (Zackery Spytz) in branch '2.7': bpo-10320: Use PY_FORMAT_LONG_LONG in ctypes' PyCArg_repr(). (GH-11230) https://github.com/python/cpython/commit/838645dc4191c4109e2b300cf9ed9d481b55509f |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:57:08 | admin | set | github: 54529 |
| 2018年12月19日 09:18:08 | serhiy.storchaka | set | status: open -> closed resolution: fixed stage: patch review -> resolved |
| 2018年12月19日 06:01:45 | serhiy.storchaka | set | messages: + msg332109 |
| 2018年12月19日 00:19:00 | ZackerySpytz | set | pull_requests: + pull_request10465 |
| 2018年12月18日 23:51:06 | miss-islington | set | messages: + msg332102 |
| 2018年12月18日 23:38:46 | miss-islington | set | pull_requests: + pull_request10463 |
| 2018年12月03日 16:27:30 | BreamoreBoy | set | nosy:
- BreamoreBoy |
| 2018年12月03日 09:11:39 | miss-islington | set | messages: + msg330920 |
| 2018年12月03日 09:11:33 | miss-islington | set | nosy:
+ miss-islington messages: + msg330919 |
| 2018年12月03日 08:32:15 | miss-islington | set | pull_requests: + pull_request10093 |
| 2018年12月03日 08:32:01 | miss-islington | set | pull_requests: + pull_request10092 |
| 2018年12月03日 08:31:48 | miss-islington | set | pull_requests: + pull_request10091 |
| 2018年12月03日 08:31:37 | serhiy.storchaka | set | nosy:
+ serhiy.storchaka messages: + msg330911 |
| 2018年12月03日 02:40:01 | ZackerySpytz | set | nosy:
+ ZackerySpytz messages: + msg330905 versions: + Python 3.6, Python 3.7, Python 3.8, - Python 3.4, Python 3.5 |
| 2018年12月03日 02:38:34 | ZackerySpytz | set | keywords:
+ patch stage: test needed -> patch review pull_requests: + pull_request10088 |
| 2015年02月08日 20:19:41 | BreamoreBoy | set | nosy:
+ BreamoreBoy messages: + msg235567 versions: + Python 3.4, Python 3.5, - Python 3.1, Python 3.2 |
| 2015年02月08日 20:07:49 | John.Malmberg | set | nosy:
+ John.Malmberg messages: + msg235566 |
| 2011年10月18日 06:01:04 | ezio.melotti | set | nosy:
+ ezio.melotti |
| 2011年10月18日 05:58:12 | bugs-python@vendor.thewrittenword.com | set | nosy:
+ bugs-python@vendor.thewrittenword.com messages: + msg145773 |
| 2011年08月18日 02:14:50 | meador.inge | set | priority: normal -> low nosy: + amaury.forgeotdarc, meador.inge, belopolsky, - theller messages: + msg142299 assignee: theller -> stage: test needed |
| 2010年11月05日 08:38:07 | hfuru | create | |