Thanks Victor, I have updated my PR with the Py_DEPRECATED macro.
Le 24/03/19 à 23:07, Victor Stinner a écrit :
> Le dim. 24 mars 2019 à 20:56, Stéphane Wirtel a écrit :
>> So my question is, can we use/add __attribute__(deprecated) in our
>> "development" kit?
>
> There is already
Le dim. 24 mars 2019 à 20:56, Stéphane Wirtel a écrit :
> So my question is, can we use/add __attribute__(deprecated) in our
> "development" kit?
There is already Py_DEPRECATED(VERSION_UNUSED) macro which uses
__attribute__((__deprecated__)) on GCC >= 3.1.
You can find the doc of a few macros
And use an enumeration for the constants.
For example:
#include
#include
enum {
PY_READWRITE = 0,
PY_READONLY = 1,
READONLY __attribute((deprecated("use PY_READONLY"))) = PY_READONLY,
READWRITE __attribute((deprecated("use PY_READWRITE"))) = PY_READWRITE,
};
Le 24/03/19 à
Hi,
I have created the issue https://bugs.python.org/issue36347 because I
wanted to add a missing macro for the PyMemberDef.flags attribute.
In the Modules/*.c files, we can find descriptions with
PyMemberDef where the access flag has the 0 value.
Example:
static PyMemberDef members[] = {