~ubuntu-branches/ubuntu/precise/rakudo/precise

« back to all changes in this revision

Viewing changes to perl6_group.c

  • Committer: Bazaar Package Importer
  • Author(s): Ryan Niebur
  • Date: 2009-10-04 14:31:57 UTC
  • Revision ID: james.westby@ubuntu.com-20091004143157-m2mqd76x5ub0ild2
Tags: 0.1~2009.09-1
initial release (closes: 544399)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* ex: set ro ft=c:
 
2
 * !!!!!!!   DO NOT EDIT THIS FILE   !!!!!!!
 
3
 *
 
4
 * This file is generated automatically from 'various files'
 
5
 * by ../../../../usr/lib/parrot/1.6.0/tools/build/pmc2c.pl.
 
6
 *
 
7
 * Any changes made here will be lost!
 
8
 *
 
9
 */
 
10
 
 
11
/* HEADERIZER HFILE: none */
 
12
/* HEADERIZER STOP */
 
13
 
 
14
#define PARROT_IN_EXTENSION
 
15
#define CONST_STRING(i, s)     Parrot_str_new_constant(i, s)
 
16
#define CONST_STRING_GEN(i, s) Parrot_str_new_constant(i, s)
 
17
#include "parrot/parrot.h"
 
18
#include "parrot/extend.h"
 
19
#include "parrot/dynext.h"
 
20
#include "pmc_p6opaque.h"
 
21
#include "pmc_p6invocation.h"
 
22
#include "pmc_perl6scalar.h"
 
23
#include "pmc_p6role.h"
 
24
#include "pmc_mutablevar.h"
 
25
#include "pmc_perl6str.h"
 
26
#include "pmc_objectref.h"
 
27
#include "pmc_perl6multisub.h"
 
28
 
 
29
/*
 
30
 * This load function will be called to do global (once) setup
 
31
 * whatever is needed to get this extension running
 
32
 */
 
33
 
 
34
 
 
35
PARROT_DYNEXT_EXPORT Parrot_PMC Parrot_lib_perl6_group_load(PARROT_INTERP); /* don't warn */
 
36
PARROT_DYNEXT_EXPORT Parrot_PMC Parrot_lib_perl6_group_load(PARROT_INTERP)
 
37
{
 
38
    Parrot_String whoami;
 
39
    Parrot_PMC    pmc;
 
40
    Parrot_Int typeP6opaque;
 
41
    Parrot_Int typeP6Invocation;
 
42
    Parrot_Int typePerl6Scalar;
 
43
    Parrot_Int typeP6role;
 
44
    Parrot_Int typeMutableVAR;
 
45
    Parrot_Int typePerl6Str;
 
46
    Parrot_Int typeObjectRef;
 
47
    Parrot_Int typePerl6MultiSub;
 
48
    int pass;
 
49
 
 
50
    /* create a library PMC */
 
51
    pmc = constant_pmc_new(interp, enum_class_ParrotLibrary);
 
52
 
 
53
    /* TODO: stuff some info into this PMC's props */
 
54
 
 
55
    /* for all PMCs we want to register: */
 
56
    whoami = CONST_STRING_GEN(interp, "P6opaque");
 
57
    typeP6opaque = pmc_register(interp, whoami);
 
58
    whoami = CONST_STRING_GEN(interp, "P6Invocation");
 
59
    typeP6Invocation = pmc_register(interp, whoami);
 
60
    whoami = CONST_STRING_GEN(interp, "Perl6Scalar");
 
61
    typePerl6Scalar = pmc_register(interp, whoami);
 
62
    whoami = CONST_STRING_GEN(interp, "P6role");
 
63
    typeP6role = pmc_register(interp, whoami);
 
64
    whoami = CONST_STRING_GEN(interp, "MutableVAR");
 
65
    typeMutableVAR = pmc_register(interp, whoami);
 
66
    whoami = CONST_STRING_GEN(interp, "Perl6Str");
 
67
    typePerl6Str = pmc_register(interp, whoami);
 
68
    whoami = CONST_STRING_GEN(interp, "ObjectRef");
 
69
    typeObjectRef = pmc_register(interp, whoami);
 
70
    whoami = CONST_STRING_GEN(interp, "Perl6MultiSub");
 
71
    typePerl6MultiSub = pmc_register(interp, whoami);
 
72
 
 
73
    /* do class_init code */
 
74
    for (pass = 0; pass <= 1; ++pass) {
 
75
        Parrot_P6opaque_class_init(interp, typeP6opaque, pass);
 
76
        Parrot_P6Invocation_class_init(interp, typeP6Invocation, pass);
 
77
        Parrot_P6role_class_init(interp, typeP6role, pass);
 
78
        Parrot_MutableVAR_class_init(interp, typeMutableVAR, pass);
 
79
        Parrot_Perl6Str_class_init(interp, typePerl6Str, pass);
 
80
        Parrot_ObjectRef_class_init(interp, typeObjectRef, pass);
 
81
        Parrot_Perl6MultiSub_class_init(interp, typePerl6MultiSub, pass);
 
82
        Parrot_Perl6Scalar_class_init(interp, typePerl6Scalar, pass);
 
83
    }
 
84
    return pmc;
 
85
}
 
86
 
 
87
/*
 
88
 * Local variables:
 
89
 *   c-file-style: "parrot"
 
90
 * End:
 
91
 * vim: expandtab shiftwidth=4:
 
92
 */
 
93