Skip to content

Commit

Permalink
we can remove these casts since we are no longer supporting py3.6
Browse files Browse the repository at this point in the history
  • Loading branch information
antocuni committed Aug 3, 2022
1 parent 84593fd commit fafec57
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions hpy/devel/src/runtime/ctx_type.c
Original file line number Diff line number Diff line change
Expand Up @@ -308,12 +308,10 @@ create_member_defs(HPyDef *hpydefs[], PyMemberDef *legacy_members, HPy_ssize_t b
if (src->kind != HPyDef_Kind_Member)
continue;
PyMemberDef *dst = &result[dst_idx++];
/* for Python <= 3.6 compatibility, we need to remove the 'const'
qualifier from src->member.{name,doc} */
dst->name = (char *)src->member.name;
dst->name = src->member.name;
dst->type = src->member.type;
dst->offset = src->member.offset + base_member_offset;
dst->doc = (char *)src->member.doc;
dst->doc = src->member.doc;
if (src->member.readonly)
dst->flags = READONLY;
else
Expand Down Expand Up @@ -355,12 +353,10 @@ create_getset_defs(HPyDef *hpydefs[], PyGetSetDef *legacy_getsets)
if (src->kind != HPyDef_Kind_GetSet)
continue;
PyGetSetDef *dst = &result[dst_idx++];
/* for Python <= 3.6 compatibility, we need to remove the 'const'
qualifier from src->getset.{name,doc} */
dst->name = (char *)src->getset.name;
dst->name = src->getset.name;
dst->get = src->getset.getter_cpy_trampoline;
dst->set = src->getset.setter_cpy_trampoline;
dst->doc = (char *)src->getset.doc;
dst->doc = src->getset.doc;
dst->closure = src->getset.closure;
}
}
Expand Down

0 comments on commit fafec57

Please sign in to comment.