Message171723
tp_flags type is long, not int.
Le 1 oct. 2012 16:42, "Martin v. Löwis" <report@bugs.python.org> a écrit :
>
> Martin v. Löwis added the comment:
>
> What matters is that precompiled stay compatible; in addition, existing
> source code should continue to compile unmodified.
>
> In the specific case, the flags type also shows up in PyType_Spec. As a
> consequence, the actual TPFLAGS_ values *do* constitute a part of the API.
>
> OTOH, a number of the flags are not considered part of the API at all
> (unfortunately, they aren't explicitly excluded, either). Before we make
> such a change, we should really declare what flags are meant to be by an
> extension module, and what flags are implementation details only to be used
> by the object runtime itself.
>
> Wrt. the proposed change: changing tp_flags to unsigned int is fine. I
> cannot see any real problem with changing PyType_Spec.flags to unsigned int
> - changing it to unsigned long would be incompatible on some systems.
>
> Wrt. changing the existing flags: I'd prefer some deprecation procedure
> that just bans them from being used in an extension module (ultimately
> wrapping them within Py_BUILD_CORE). Once they are deprecated, changing
> their type is clearly fine.
>
> ----------
>
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue16086>
> _______________________________________
> |
|
Date |
User |
Action |
Args |
2012-10-01 14:51:41 | vstinner | set | recipients:
+ vstinner, loewis, mark.dickinson, pitrou, ezio.melotti |
2012-10-01 14:51:41 | vstinner | link | issue16086 messages |
2012-10-01 14:51:41 | vstinner | create | |
|