Skip to content

Commit

Permalink
Fix HPyDef_METH usage after rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
fangerer committed Oct 14, 2022
1 parent ce7a886 commit 07f25c0
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/test_hpytype.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def DEFINE_Dummy(self):

def DEFINE_meta_data_accessors(self):
return """
HPyDef_METH(set_meta_data, "set_meta_data", set_meta_data_impl, HPyFunc_O)
HPyDef_METH(set_meta_data, "set_meta_data", HPyFunc_O)
static HPy set_meta_data_impl(HPyContext *ctx, HPy self, HPy arg)
{
DummyMeta *data = DummyMeta_AsStruct(ctx, arg);
Expand All @@ -208,7 +208,7 @@ def DEFINE_meta_data_accessors(self):
return HPy_Dup(ctx, ctx->h_None);
}
HPyDef_METH(get_meta_data, "get_meta_data", get_meta_data_impl, HPyFunc_O)
HPyDef_METH(get_meta_data, "get_meta_data", HPyFunc_O)
static HPy get_meta_data_impl(HPyContext *ctx, HPy self, HPy arg)
{
DummyMeta *data = DummyMeta_AsStruct(ctx, arg);
Expand All @@ -221,7 +221,7 @@ def DEFINE_meta_data_accessors(self):
return HPyLong_FromLong(ctx, data->meta_magic + data->meta_member);
}
HPyDef_METH(set_member, "set_member", set_member_impl, HPyFunc_O)
HPyDef_METH(set_member, "set_member", HPyFunc_O)
static HPy set_member_impl(HPyContext *ctx, HPy self, HPy arg)
{
Dummy *data = Dummy_AsStruct(ctx, arg);
Expand Down Expand Up @@ -1151,7 +1151,7 @@ def test_specparam_multiple_metaclass_fails(self):
.name = "mytest.Dummy",
};
HPyDef_METH(make_dummy, "make_dummy", make_dummy_impl, HPyFunc_NOARGS)
HPyDef_METH(make_dummy, "make_dummy", HPyFunc_NOARGS)
static HPy make_dummy_impl(HPyContext *ctx, HPy module)
{
HPyType_SpecParam param[] = {
Expand All @@ -1178,8 +1178,7 @@ def test_metaclass(self):
@DEFINE_Dummy
@DEFINE_meta_data_accessors
HPyDef_METH(create_type, "create_type", create_type_impl,
HPyFunc_VARARGS)
HPyDef_METH(create_type, "create_type", HPyFunc_VARARGS)
static HPy create_type_impl(HPyContext *ctx, HPy module,
HPy *args, HPy_ssize_t nargs)
{
Expand Down

0 comments on commit 07f25c0

Please sign in to comment.