]> git.vpit.fr Git - perl/modules/subs-auto.git/blob - auto.xs
Remove obsolete kwalitee workarounds
[perl/modules/subs-auto.git] / auto.xs
1 /* This file is part of the subs::auto Perl module.
2  * See http://search.cpan.org/dist/subs-auto/ */
3
4 #define PERL_NO_GET_CONTEXT
5 #include "EXTERN.h"
6 #include "perl.h"
7 #include "XSUB.h"
8
9 #ifndef GvCV_set
10 # define GvCV_set(G, C) (GvCV(G) = (C))
11 #endif
12
13 MODULE = subs::auto      PACKAGE = subs::auto
14
15 PROTOTYPES: ENABLE
16
17 void
18 _delete_sub(SV *fqn)
19 PREINIT:
20  GV *gv;
21 PPCODE:
22  gv = gv_fetchsv(fqn, 0, 0);
23  if (gv) {
24   CV *cv = GvCV(gv);
25   GvCV_set(gv, NULL);
26   SvREFCNT_dec(cv);
27  }
28  XSRETURN(0);