[issue41073] [C API] PyType_GetSlot() should accept static types

2020-11-10 Thread STINNER Victor
STINNER Victor added the comment: > bpo-41073: PyType_GetSlot() can now accept static types. (GH-21931) Nice! It will be simpler to use PyType_GetSlot() in an extension with the limited C API, without having to care if the type is a static type or a heap type. --

[issue41073] [C API] PyType_GetSlot() should accept static types

2020-11-10 Thread Petr Viktorin
Change by Petr Viktorin : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue41073] [C API] PyType_GetSlot() should accept static types

2020-11-10 Thread miss-islington
miss-islington added the comment: New changeset a13b26cac1519dad7bbc8651de7b826df7389d75 by Hai Shi in branch 'master': bpo-41073: PyType_GetSlot() can now accept static types. (GH-21931) https://github.com/python/cpython/commit/a13b26cac1519dad7bbc8651de7b826df7389d75 -- nosy:

[issue41073] [C API] PyType_GetSlot() should accept static types

2020-08-20 Thread hai shi
Change by hai shi : -- pull_requests: +21044 pull_request: https://github.com/python/cpython/pull/21931 ___ Python tracker ___ ___

[issue41073] [C API] PyType_GetSlot() should accept static types

2020-07-08 Thread hai shi
Change by hai shi : -- keywords: +patch pull_requests: +20543 stage: -> patch review pull_request: https://github.com/python/cpython/pull/21395 ___ Python tracker ___

[issue41073] [C API] PyType_GetSlot() should accept static types

2020-07-02 Thread hai shi
hai shi added the comment: > You'll probably need some table like typeslots.inc to record which sub-slots > struct each slot belongs to. Looks like it's a good way to solve this probleam, Let me try it ;) -- ___ Python tracker

[issue41073] [C API] PyType_GetSlot() should accept static types

2020-07-01 Thread Petr Viktorin
Petr Viktorin added the comment: > If we extend PyType_GetSlot() to accept non-heaptype, we need find a way to > judge the max slot of non-heaptype. Static types can have some sub-slots structs but not others. A "max slot" will not help for types that have tp_as_mapping but not

[issue41073] [C API] PyType_GetSlot() should accept static types

2020-06-30 Thread hai shi
hai shi added the comment: > bpo-17162 added PyType_GetSlot(), but static types were not discussed there. Thanks to correct my info. I paste this bpo just Larry have mentioned the static type in PyType_GetSlot() :) -- ___ Python tracker

[issue41073] [C API] PyType_GetSlot() should accept static types

2020-06-29 Thread STINNER Victor
STINNER Victor added the comment: > historical discuss: bpo17162 bpo-17162 added PyType_GetSlot(), but static types were not discussed there. -- ___ Python tracker ___

[issue41073] [C API] PyType_GetSlot() should accept static types

2020-06-28 Thread hai shi
hai shi added the comment: I create a PR in: https://github.com/shihai1991/cpython/pull/13/commits. Looks like It works. If we extend PyType_GetSlot() to accept non-heaptype, we need find a way to judge the max slot of non-heaptype. -- ___ Python

[issue41073] [C API] PyType_GetSlot() should accept static types

2020-06-28 Thread hai shi
hai shi added the comment: historical discuss: bpo17162 -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41073] [C API] PyType_GetSlot() should accept static types

2020-06-22 Thread hai shi
hai shi added the comment: Hi, victor. If you have much bpo need to manage, I could take a look in this week :) -- ___ Python tracker ___

[issue41073] [C API] PyType_GetSlot() should accept static types

2020-06-22 Thread hai shi
Change by hai shi : -- nosy: +shihai1991 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue41073] [C API] PyType_GetSlot() should accept static types

2020-06-22 Thread STINNER Victor
New submission from STINNER Victor : To fix bpo-40170, I would like to modify Py_TRASHCAN_BEGIN() macro to use PyType_GetSlot() to get the deallocator function, rather than accessing directly the PyTypeObject.tp_dealloc member. The problem is that currently PyType_GetSlot() only works on