@@ -18,6 +18,7 @@ static STRING *p6opaque_str = NULL;
18
18
19
19
/* Creates a new type with this HOW as its meta-object. */
20
20
static void new_type (PARROT_INTERP , PMC * nci ) {
21
+ PMC * unused ;
21
22
/* We first create a new HOW instance. */
22
23
PMC * capture = Parrot_pcc_get_signature (interp , CURRENT_CONTEXT (interp ));
23
24
PMC * self = VTABLE_get_pmc_keyed_int (interp , capture , 0 );
@@ -46,11 +47,12 @@ static void new_type(PARROT_INTERP, PMC *nci) {
46
47
PARROT_GC_WRITE_BARRIER (interp , STABLE_PMC (type_object ));
47
48
48
49
/* Put it into capture to act as return value. */
49
- Parrot_pcc_build_call_from_c_args (interp , capture , "P" , type_object );
50
+ unused = Parrot_pcc_build_call_from_c_args (interp , capture , "P" , type_object );
50
51
}
51
52
52
53
/* Adds a method. */
53
54
static void add_method (PARROT_INTERP , PMC * nci ) {
55
+ PMC * unused ;
54
56
/* Get methods table out of meta-object. */
55
57
PMC * capture = Parrot_pcc_get_signature (interp , CURRENT_CONTEXT (interp ));
56
58
PMC * self = VTABLE_get_pmc_keyed_int (interp , capture , 0 );
@@ -62,11 +64,12 @@ static void add_method(PARROT_INTERP, PMC *nci) {
62
64
63
65
/* Add it, and return added method as result. */
64
66
VTABLE_set_pmc_keyed_str (interp , methods , name , method );
65
- Parrot_pcc_build_call_from_c_args (interp , capture , "P" , method );
67
+ unused = Parrot_pcc_build_call_from_c_args (interp , capture , "P" , method );
66
68
}
67
69
68
70
/* Adds an attribute meta-object to the list. */
69
71
static void add_attribute (PARROT_INTERP , PMC * nci ) {
72
+ PMC * unused ;
70
73
/* Get attributes list out of meta-object. */
71
74
PMC * capture = Parrot_pcc_get_signature (interp , CURRENT_CONTEXT (interp ));
72
75
PMC * self = VTABLE_get_pmc_keyed_int (interp , capture , 0 );
@@ -75,11 +78,12 @@ static void add_attribute(PARROT_INTERP, PMC *nci) {
75
78
/* Add meta-attribute to it. */
76
79
PMC * meta_attr = VTABLE_get_pmc_keyed_int (interp , capture , 2 );
77
80
VTABLE_push_pmc (interp , attrs , meta_attr );
78
- Parrot_pcc_build_call_from_c_args (interp , capture , "P" , meta_attr );
81
+ unused = Parrot_pcc_build_call_from_c_args (interp , capture , "P" , meta_attr );
79
82
}
80
83
81
84
/* Finds a method. */
82
85
static void find_method (PARROT_INTERP , PMC * nci ) {
86
+ PMC * unused ;
83
87
/* Get methods table out of meta-object and look up method. */
84
88
PMC * capture = Parrot_pcc_get_signature (interp , CURRENT_CONTEXT (interp ));
85
89
PMC * self = VTABLE_get_pmc_keyed_int (interp , capture , 0 );
@@ -88,46 +92,51 @@ static void find_method(PARROT_INTERP, PMC *nci) {
88
92
PMC * method = VTABLE_get_pmc_keyed_str (interp , methods , name );
89
93
90
94
/* Put into capture to act as return value. */
91
- Parrot_pcc_build_call_from_c_args (interp , capture , "P" , method );
95
+ unused = Parrot_pcc_build_call_from_c_args (interp , capture , "P" , method );
92
96
}
93
97
94
98
/* Composes the meta-object. */
95
99
static void compose (PARROT_INTERP , PMC * nci ) {
100
+ PMC * unused ;
96
101
PMC * capture = Parrot_pcc_get_signature (interp , CURRENT_CONTEXT (interp ));
97
102
PMC * obj = VTABLE_get_pmc_keyed_int (interp , capture , 1 );
98
- Parrot_pcc_build_call_from_c_args (interp , capture , "P" , obj );
103
+ unused = Parrot_pcc_build_call_from_c_args (interp , capture , "P" , obj );
99
104
}
100
105
101
106
/* Introspects the parents. Since a KnowHOW doesn't support inheritance,
102
107
* just hand back an empty list. */
103
108
static void parents (PARROT_INTERP , PMC * nci ) {
109
+ PMC * unused ;
104
110
PMC * capture = Parrot_pcc_get_signature (interp , CURRENT_CONTEXT (interp ));
105
111
PMC * empty = pmc_new (interp , enum_class_FixedPMCArray );
106
- Parrot_pcc_build_call_from_c_args (interp , capture , "P" , empty );
112
+ unused = Parrot_pcc_build_call_from_c_args (interp , capture , "P" , empty );
107
113
}
108
114
109
115
/* Introspects the attributes. For now just hand back real list. */
110
116
static void attributes (PARROT_INTERP , PMC * nci ) {
117
+ PMC * unused ;
111
118
PMC * capture = Parrot_pcc_get_signature (interp , CURRENT_CONTEXT (interp ));
112
119
PMC * self = VTABLE_get_pmc_keyed_int (interp , capture , 0 );
113
120
PMC * attrs = ((KnowHOWREPRInstance * )PMC_data (self ))-> attributes ;
114
- Parrot_pcc_build_call_from_c_args (interp , capture , "P" , attrs );
121
+ unused = Parrot_pcc_build_call_from_c_args (interp , capture , "P" , attrs );
115
122
}
116
123
117
124
/* Introspects the methods. For now just hand back real method table. */
118
125
static void methods (PARROT_INTERP , PMC * nci ) {
126
+ PMC * unused ;
119
127
PMC * capture = Parrot_pcc_get_signature (interp , CURRENT_CONTEXT (interp ));
120
128
PMC * self = VTABLE_get_pmc_keyed_int (interp , capture , 0 );
121
129
PMC * meths = ((KnowHOWREPRInstance * )PMC_data (self ))-> methods ;
122
- Parrot_pcc_build_call_from_c_args (interp , capture , "P" , meths );
130
+ unused = Parrot_pcc_build_call_from_c_args (interp , capture , "P" , meths );
123
131
}
124
132
125
133
/* Introspects the name. */
126
134
static void name (PARROT_INTERP , PMC * nci ) {
135
+ PMC * unused ;
127
136
PMC * capture = Parrot_pcc_get_signature (interp , CURRENT_CONTEXT (interp ));
128
137
PMC * self = VTABLE_get_pmc_keyed_int (interp , capture , 0 );
129
138
STRING * name = ((KnowHOWREPRInstance * )PMC_data (self ))-> name ;
130
- Parrot_pcc_build_call_from_c_args (interp , capture , "S" , name );
139
+ unused = Parrot_pcc_build_call_from_c_args (interp , capture , "S" , name );
131
140
}
132
141
133
142
/* Wraps up a C function as a raw NCI method. */
@@ -224,20 +233,22 @@ PMC * SixModelObject_bootstrap_knowhow(PARROT_INTERP, PMC *sc) {
224
233
225
234
/* Attribute new method. */
226
235
static void attr_new (PARROT_INTERP , PMC * nci ) {
236
+ PMC * unused ;
227
237
PMC * capture = Parrot_pcc_get_signature (interp , CURRENT_CONTEXT (interp ));
228
238
PMC * type = VTABLE_get_pmc_keyed_int (interp , capture , 0 );
229
239
STRING * name = VTABLE_get_string_keyed_str (interp , capture , name_str );
230
240
PMC * self = REPR (type )-> instance_of (interp , type );
231
241
REPR (self )-> set_str (interp , self , name );
232
- Parrot_pcc_build_call_from_c_args (interp , capture , "P" , self );
242
+ unused = Parrot_pcc_build_call_from_c_args (interp , capture , "P" , self );
233
243
}
234
244
235
245
/* Attribute name introspection. */
236
246
static void attr_name (PARROT_INTERP , PMC * nci ) {
247
+ PMC * unused ;
237
248
PMC * capture = Parrot_pcc_get_signature (interp , CURRENT_CONTEXT (interp ));
238
249
PMC * self = VTABLE_get_pmc_keyed_int (interp , capture , 0 );
239
250
STRING * name = REPR (self )-> get_str (interp , self );
240
- Parrot_pcc_build_call_from_c_args (interp , capture , "S" , name );
251
+ unused = Parrot_pcc_build_call_from_c_args (interp , capture , "S" , name );
241
252
}
242
253
243
254
/* Sets up a very simple attribute meta-object. Just supports having a
0 commit comments