Add tests for cycles in various objects
[gitmo/Moose.git] / xs / MOP.xs
CommitLineData
38bf2a25 1#include "mop.h"
2
38bf2a25 3MODULE = Class::MOP PACKAGE = Class::MOP
4
5PROTOTYPES: DISABLE
6
7# use prototype here to be compatible with get_code_info from Sub::Identify
8void
9get_code_info(coderef)
10 SV *coderef
11 PROTOTYPE: $
12 PREINIT:
13 char *pkg = NULL;
14 char *name = NULL;
15 PPCODE:
16 SvGETMAGIC(coderef);
17 if (mop_get_code_info(coderef, &pkg, &name)) {
18 EXTEND(SP, 2);
19 mPUSHs(newSVpv(pkg, 0));
20 mPUSHs(newSVpv(name, 0));
21 }