Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: 7d4f224d08
Fetching contributors…

Cannot retrieve contributors at this time

18 lines (15 sloc) 0.533 kb
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"
MODULE = Class::MethodMaker PACKAGE = Class::MethodMaker
void
set_sub_name(SV *sub, char *pname, char *subname, char *stashname)
CODE:
CvGV((GV*)SvRV(sub)) = gv_fetchpv(stashname, TRUE, SVt_PV);
GvSTASH(CvGV((GV*)SvRV(sub))) = gv_stashpv(pname, 1);
#ifdef gv_name_set
gv_name_set(CvGV((GV*)SvRV(sub)), subname, strlen(subname), GV_NOTQUAL);
#else
GvNAME(CvGV((GV*)SvRV(sub))) = savepv(subname);
GvNAMELEN(CvGV((GV*)SvRV(sub))) = strlen(subname);
#endif
Jump to Line
Something went wrong with that request. Please try again.