Skip to content

[mypyc] Use Py_TYPE and Py_IsNone #12233

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 1 commit into from
Feb 22, 2022

Conversation

97littleleaf11
Copy link
Collaborator

We are using Py_TYPE in many places, however keeping several direct calls to ob_type. Replace them with Py_TYPE to maintain consistency. This PR also replaces == Py_None with Py_IsNone as pythoncapi_compat suggests.

@97littleleaf11 97littleleaf11 changed the title Use Py_TYPE and Py_IsNone [mypyc] Use Py_TYPE and Py_IsNone Feb 22, 2022
@@ -3,14 +3,13 @@
// These are registered in mypyc.primitives.misc_ops.

#include <Python.h>
#include "pythoncapi_compat.h"
#include "CPy.h"
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant include.

@97littleleaf11 97littleleaf11 merged commit 784b67e into python:master Feb 22, 2022
@97littleleaf11 97littleleaf11 deleted the use-pythoncapi-compat branch February 22, 2022 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants