Skip to content

How to set or modify tp_flags? #273

@fsh

Description

@fsh

In an extension type written with py_class!(), is there a way to set or fix the tp_flags of the resulting PyTypeObject?

For this specific use-case I want to add Py_TPFLAGS_BASETYPE so the extension class can be sub-classed in Python. Is this a quote-unquote "difficult" thing to do while still using the py_class! macro?

Any example or code appreciated.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions