Skip to content

Commit

Permalink
call initialize as instance method
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Oct 24, 2024
1 parent 1c9a7cb commit b50bf21
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Basic/Core/pdlperl.h.PL
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ print OUT <<'EOF';
if (SvROK(ST(0)) && ((SvTYPE(SvRV(ST(0))) == SVt_PVMG) || (SvTYPE(SvRV(ST(0))) == SVt_PVHV))) { \
parent = ST(0); \
if (sv_isobject(parent)){ \
bless_stash = SvSTASH(SvRV(ST(0))); \
bless_stash = SvSTASH(SvRV(parent)); \
objname = HvNAME((bless_stash)); /* The package to bless output vars into is taken from the first input var */ \
} \
} \
Expand Down Expand Up @@ -63,9 +63,9 @@ static inline pdl *PDL_XS_pdlinit(pTHX_ char *objname, HV *bless_stash, SV *to_p
return ret;
}
#define PDL_XS_PERLINIT_init() \
PDL_XS_pdlinit(aTHX_ objname, bless_stash, sv_2mortal(newSVpv(objname, 0)), "initialize", NULL, PDL)
PDL_XS_pdlinit(aTHX_ objname, bless_stash, parent ? parent : sv_2mortal(newSVpv(objname, 0)), "initialize", NULL, PDL)
#define PDL_XS_PERLINIT_initsv(sv) \
PDL_XS_pdlinit(aTHX_ objname, bless_stash, sv_2mortal(newSVpv(objname, 0)), "initialize", &sv, PDL)
PDL_XS_pdlinit(aTHX_ objname, bless_stash, parent ? parent : sv_2mortal(newSVpv(objname, 0)), "initialize", &sv, PDL)
#define PDL_XS_PERLINIT_copy() \
PDL_XS_pdlinit(aTHX_ objname, bless_stash, parent, "copy", NULL, PDL)
#define PDL_XS_PERLINIT_copysv(sv) \
Expand Down

0 comments on commit b50bf21

Please sign in to comment.