8000 gh-104469: Convert _testcapi/watchers.c to use AC by sobolevn · Pull Request #104503 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-104469: Convert _testcapi/watchers.c to use AC #104503

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 3 commits into from
May 15, 2023
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
Address review
  • Loading branch information
sobolevn committed May 15, 2023
commit ec2f0b071ec7e41d0d9e741faa95128b370e0827
14 changes: 5 additions & 9 deletions Modules/_testcapi/clinic/watchers.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 6 additions & 16 deletions Modules/_testcapi/watchers.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,12 +131,11 @@ _testcapi.watch_dict
watcher_id: int
dict: object
/
Watch dict.
[clinic start generated code]*/

static PyObject *
_testcapi_watch_dict_impl(PyObject *module, int watcher_id, PyObject *dict)
/*[clinic end generated code: output=1426e0273cebe2d8 input=ffbe7762b6c79c52]*/
/*[clinic end generated code: output=1426e0273cebe2d8 input=5d11ddf8ccb22a05]*/
{
if (PyDict_Watch(watcher_id, dict)) {
return NULL;
Expand All @@ -145,16 +144,12 @@ _testcapi_watch_dict_impl(PyObject *module, int watcher_id, PyObject *dict)
}

/*[clinic input]
_testcapi.unwatch_dict
watcher_id: int
dict: object
/
Unwatch dict.
_testcapi.unwatch_dict = _testcapi.watch_dict
[clinic start generated code]*/

static PyObject *
_testcapi_unwatch_dict_impl(PyObject *module, int watcher_id, PyObject *dict)
/*[clinic end generated code: output=512b1a71ae33c351 input=5621f8bbc4ef8e6a]*/
/*[clinic end generated code: output=512b1a71ae33c351 input=cae7dc1b6f7713b8]*/
{
if (PyDict_Unwatch(watcher_id, dict)) {
return NULL;
Expand Down Expand Up @@ -270,12 +265,11 @@ _testcapi.watch_type
watcher_id: int
type: object
/
Watch type.
[clinic start generated code]*/

static PyObject *
_testcapi_watch_type_impl(PyObject *module, int watcher_id, PyObject *type)
/*[clinic end generated code: output=fdf4777126724fc4 input=70ac8124d5b8296d]*/
/*[clinic end generated code: output=fdf4777126724fc4 input=b0a72ed7db885ee8]*/
{
if (PyType_Watch(watcher_id, type)) {
return NULL;
Expand All @@ -284,16 +278,12 @@ _testcapi_watch_type_impl(PyObject *module, int watcher_id, PyObject *type)
}

/*[clinic input]
_testcapi.unwatch_type
watcher_id: int
type: object
/
Unwatch type.
_testcapi.unwatch_type = _testcapi.watch_type
[clinic start generated code]*/

static PyObject *
_testcapi_unwatch_type_impl(PyObject *module, int watcher_id, PyObject *type)
/*[clinic end generated code: output=0389672d4ad5f68b input=33cdc13902253394]*/
/*[clinic end generated code: output=0389672d4ad5f68b input=6701911fb45edc9e]*/
{
if (PyType_Unwatch(watcher_id, type)) {
return NULL;
Expand Down
0