Skip to content

Commit

Permalink
inline used-once getref_pdl
Browse files Browse the repository at this point in the history
  • Loading branch information
mohawk2 committed Feb 18, 2024
1 parent 4e7eea0 commit e00f910
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Basic/Core/pdlcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include "pdlcore.h" /* Core declarations */
#include "pdlperl.h"

static SV *getref_pdl(pdl *it) {
void pdl_SetSV_PDL ( SV *sv, pdl *it ) {
SV *newref;
if(!it->sv) {
newref = newRV_noinc(it->sv = newSViv(PTR2IV(it)));
Expand All @@ -12,18 +12,11 @@ static SV *getref_pdl(pdl *it) {
newref = newRV_inc(it->sv);
SvAMAGIC_on(newref);
}
return newref;
}

void pdl_SetSV_PDL ( SV *sv, pdl *it ) {
SV *newref = getref_pdl(it); /* YUCK!!!! */
sv_setsv(sv,newref);
SvREFCNT_dec(newref);
}


/* Size of data type information */

size_t pdl_howbig (int datatype) {
#define X(datatype, ctype, ...) \
return sizeof(ctype);
Expand Down

0 comments on commit e00f910

Please sign in to comment.