On 7/22/21 1:01 AM, Petr Viktorin wrote:
> On 21. 07. 21 14:18, Nick Coghlan wrote:
>> ====================
>> typedef enum {
>> PyLocals_UNDEFINED = -1;
>> PyLocals_DIRECT_REFERENCE = 0,
>> PyLocals_SHALLOW_COPY = 1
>> } PyLocals_Kind;
>>
>> PyLocals_Kind PyLocals_GetKind(void);
>> PyLocals_Kind PyFrame_GetLocalsKind(PyFrameObject *);
>> ====================
>
> Please don't put the enum in the stable ABI. If we would add another value
and then
> an older extension would receive it, we'd get undefined behavior.
Probably a stupid question, but wouldn't the same thing happen if we didn't use an enum, added another option later, and
on older extension received that newer value?
--
~Ethan~
_______________________________________________
Python-Dev mailing list -- python-dev@python.org
To unsubscribe send an email to python-dev-le...@python.org
https://mail.python.org/mailman3/lists/python-dev.python.org/
Message archived at
https://mail.python.org/archives/list/python-dev@python.org/message/6J5PN5TJ5N3UNJ7UE5UT3NW4CUJ5AGAX/
Code of Conduct: http://python.org/psf/codeofconduct/