File: Compiling.xs

package info (click to toggle)
libb-compiling-perl 0.06-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid, stretch
  • size: 144 kB
  • ctags: 1
  • sloc: perl: 34; makefile: 2
file content (26 lines) | stat: -rw-r--r-- 485 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
21
22
23
24
25
26
#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

STATIC SV *compiling_sv;

MODULE = B::Compiling  PACKAGE = B::Compiling

PROTOTYPES: DISABLE

void
PL_compiling ()
    PPCODE:
        XPUSHs (compiling_sv);

BOOT:
    {
        HV *cop_stash = gv_stashpv ("B::COP", 0);

        if (!cop_stash) {
            croak ("B doesn't provide B::COP");
        }

        compiling_sv = newRV_noinc (newSViv (PTR2IV (&PL_compiling)));
        sv_bless (compiling_sv, cop_stash);
    }