File: Current.xs

package info (click to toggle)
libsub-current-perl 0.02-1
  • links: PTS, VCS
  • area: main
  • in suites: squeeze, wheezy
  • size: 88 kB
  • ctags: 2
  • sloc: perl: 111; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 308 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

MODULE = Sub::Current	PACKAGE = Sub::Current

PROTOTYPES: ENABLE

SV *
ROUTINE()
    PREINIT:
	CV *cv;
    CODE:
	cv = Perl_find_runcv(aTHX_ NULL);
	if (CvUNIQUE(cv))
	    RETVAL = &PL_sv_undef;
	else
	    RETVAL = newRV((SV*)cv);
    OUTPUT:
	RETVAL