Skip to content

bpo-1635741: replace UCD_Check with Py_IS_TYPE #22328

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 2 commits into from
Sep 23, 2020
Merged
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
Update Modules/unicodedata.c
Co-authored-by: Victor Stinner <vstinner@python.org>
  • Loading branch information
koubaa and vstinner authored Sep 23, 2020
commit f09d3c23047866f30626728dac29a36ead0264e9
8 changes: 3 additions & 5 deletions Modules/unicodedata.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,9 @@ static PyMemberDef DB_members[] = {
/* forward declaration */
static PyTypeObject UCD_Type;

//check if self is of given type (which will be UCD_Type)
//UCD_Type is not in the macro because this will become a heap
//type and will need to be passed in. self is NULL when
//the PyCapsule API is used.
#define UCD_Check(self, type) self && Py_IS_TYPE(self, type)
// Check if self is an instance of UCD_Type.
// Return 0 if self is NULL (when the PyCapsule C API is used).
#define UCD_Check(self, ucd_type) (self != NULL && Py_IS_TYPE(self, ucd_type))

static PyObject*
new_previous_version(const char*name, const change_record* (*getrecord)(Py_UCS4),
Expand Down
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy