Message179504
| Author |
skrah |
| Recipients |
Arfrever, Gregory.Andersen, amaury.forgeotdarc, franck, georg.brandl, lemburg, ncoghlan, pitrou, serhiy.storchaka, skrah, stutzbach, vstinner |
| Date |
2013年01月10日.00:21:25 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<20130110002127.GA7233@sleipnir.bytereef.org> |
| In-reply-to |
<CADiSq7dPfKtXDvMTOTJhV5=zLmqOR=UOVtqz4HD6P+NToXgunA@mail.gmail.com> |
| Content |
Nick Coghlan <report@bugs.python.org> wrote:
> There should still be a check in tp_new (IIRC) that calls PyType_Ready on
> unready types.
Indeed there is one in type_new(), but that isn't used here AFAICS. If
you apply this patch and start up python, there are many "str: not ready"
instances:
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -14282,6 +14282,10 @@
PyUnicode_InternFromString(const char *cp)
{
PyObject *s = PyUnicode_FromString(cp);
+
+ fprintf(stderr, "%s: %s\n", PyUnicode_Type.tp_name,
+ (PyUnicode_Type.tp_flags & Py_TPFLAGS_READY) ? "ready" : "not ready");
+
if (s == NULL)
return NULL;
PyUnicode_InternInPlace(&s); |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2013年01月10日 00:21:25 | skrah | set | recipients:
+ skrah, lemburg, georg.brandl, amaury.forgeotdarc, ncoghlan, pitrou, vstinner, stutzbach, Arfrever, serhiy.storchaka, franck, Gregory.Andersen |
| 2013年01月10日 00:21:25 | skrah | link | issue10156 messages |
| 2013年01月10日 00:21:25 | skrah | create |
|