8000 gh-91051: allow setting a callback hook on PyType_Modified by carljm · Pull Request #97875 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-91051: allow setting a callback hook on PyType_Modified #97875

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 21 commits into from
Oct 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Move new API to Include/cpython so it's not in limited API
  • Loading branch information
carljm committed Oct 5, 2022
commit 95e49eeae3abc750f20455be8af4fae751475f44
4 changes: 4 additions & 0 deletions Include/cpython/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -510,3 +510,7 @@ Py_DEPRECATED(3.11) typedef int UsingDeprecatedTrashcanMacro;

PyAPI_FUNC(int) _PyObject_VisitManagedDict(PyObject *obj, visitproc visit, void *arg);
PyAPI_FUNC(void) _PyObject_ClearManagedDict(PyObject *obj);

typedef void(*PyType_ModifiedCallback)(PyTypeObject *);
PyAPI_FUNC(void) PyType_SetModifiedCallback(PyType_ModifiedCallback callback);
PyAPI_FUNC(PyType_ModifiedCallback) PyType_GetModifiedCallback(void);
3 changes: 0 additions & 3 deletions Include/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,6 @@ PyAPI_FUNC(PyObject *) PyType_GenericNew(PyTypeObject *,
PyObject *, PyObject *);
PyAPI_FUNC(unsigned int) PyType_ClearCache(void);
PyAPI_FUNC(void) PyType_Modified(PyTypeObject *);
typedef void(*PyType_ModifiedCallback)(PyTypeObject *);
PyAPI_FUNC(void) PyType_SetModifiedCallback(PyType_ModifiedCallback callback);
PyAPI_FUNC(PyType_ModifiedCallback) PyType_GetModifiedCallback(void);

/* Generic operations on objects */
PyAPI_FUNC(PyObject *) PyObject_Repr(PyObject *);
Expand Down
0