Skip to content
This repository
Newer
Older
100644 470 lines (297 sloc) 9.252 kb
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
1 /*
0e362895 » allisonrandal
2009-02-17 [cage] Updating all copyrights in src/ to Parrot Foundation.
2 Copyright (C) 2001-2009, Parrot Foundation.
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
3
4 =head1 NAME
5
f474cd7f » bschmalhofer
2006-01-18 [perl #38235] Rename (dyn)?classes to (dyn)?pmc
6 src/pmc/fixedfloatarray.pmc - fixed size array for floating point numbers only
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
7
8 =head1 DESCRIPTION
9
f6d5c3e9 » chromatic
2007-09-04 [PMC] More minor cleanups and reformattings.
10 This class, FixedFloatArray, implements an array of fixed size which
11 stored FLOATVALs. It uses Float PMCs to do all necessary conversions.
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
12
13 =head2 Functions
14
15 =over 4
16
17 =cut
18
19 */
20
6bdd5f99 » petdance
2010-03-28 headerizer now runs on PMC files
21 /* HEADERIZER HFILE: none */
22 /* HEADERIZER BEGIN: static */
23 /* HEADERIZER END: static */
24
6b817608 » Whiteknight
2009-08-23 [pmc] we don't need need_ext anymore, so BALEETED
25 pmclass FixedFloatArray auto_attrs provides array {
a638c12e » cotto
2009-01-25 [pmc] get rid of UnionVal in *FloatArray
26 ATTR INTVAL size;
27 ATTR FLOATVAL *float_array;
72981862 » particle
2006-02-17 pmc: convert Fixed*Array and Resizable*Array internal_exceptions to r…
28
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
29 /*
30
31 =back
32
33 =head2 Methods
34
35 =over 4
36
37 =item C<void destroy()>
38
39 Destroys the array.
40
41 =cut
42
43 */
44
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
45 VTABLE void destroy() {
a638c12e » cotto
2009-01-25 [pmc] get rid of UnionVal in *FloatArray
46 FLOATVAL *float_array;
47 GET_ATTR_float_array(INTERP, SELF, float_array);
48 if (float_array)
4833868f » bacek
2010-02-22 Merge branch 'sys_mem' into trunk
49 mem_gc_free(INTERP, float_array);
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
50 }
51
52 /*
53
714df2a3 » tewk
2010-03-10 VTABLE_init_int commented out tests
54 =item C<void init_int(INTVAL size)>
55
56 Initializes the array.
57
58 =cut
59
60 */
61
4d64842d » leto
2010-03-11 [t][TT#1509] Prevent core dumps by preventing negative length array c…
62 VTABLE void init_int(INTVAL size) {
63 if (size < 0)
26914e12 » Jimmy Zhuo
2010-05-05 changed interp in pmc class to INTERP for unification
64 Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
4d64842d » leto
2010-03-11 [t][TT#1509] Prevent core dumps by preventing negative length array c…
65 _("FixedFloatArray: Cannot set array size to a negative number (%d)"), size);
66 SET_ATTR_size(INTERP, SELF, size);
67 SET_ATTR_float_array(INTERP, SELF, mem_gc_allocate_n_typed(INTERP, size, FLOATVAL));
714df2a3 » tewk
2010-03-10 VTABLE_init_int commented out tests
68 PObj_custom_destroy_SET(SELF);
69 }
70
71 /*
72
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
73 =item C<PMC *clone()>
74
75 Creates and returns a copy of the array.
76
77 =cut
78
79 */
80
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
81 VTABLE PMC *clone() {
3b6ebda9 » NotFound
2010-04-24 clean FPA.clone
82 FLOATVAL *self_float_array;
83 PMC * const dest = Parrot_pmc_new(INTERP, SELF->vtable->base_type);
a638c12e » cotto
2009-01-25 [pmc] get rid of UnionVal in *FloatArray
84 GET_ATTR_float_array(INTERP, SELF, self_float_array);
3b6ebda9 » NotFound
2010-04-24 clean FPA.clone
85 if (self_float_array) {
86 INTVAL size;
87 GET_ATTR_size(INTERP, SELF, size);
88 {
89 FLOATVAL * const dest_float_array = mem_gc_allocate_n_typed(INTERP,
90 size, FLOATVAL);
91 mem_copy_n_typed(dest_float_array, self_float_array,
92 size, FLOATVAL);
93 SET_ATTR_float_array(INTERP, dest, dest_float_array);
94 }
95 SET_ATTR_size(INTERP, dest, size);
96 PObj_custom_destroy_SET(dest);
97 }
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
98 return dest;
99 }
100
101 /*
102
c2b50bfb » cotto
2009-03-22 [PMC] add get_iter + tests to *FloatArray
103 =item C<PMC *get_iter()>
104
105 Return an Iterator for this PMC.
106
107 =cut
108
109 */
110
111 VTABLE PMC *get_iter() {
083213a2 » Whiteknight
2010-02-16 start rename of pmc_new to Parrot_pmc_new
112 return Parrot_pmc_new_init(INTERP, enum_class_ArrayIterator, SELF);
c2b50bfb » cotto
2009-03-22 [PMC] add get_iter + tests to *FloatArray
113 }
114
115 /*
116
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
117 =item C<INTVAL get_bool()>
118
119 Returns whether the array has any elements (meaning been initialized, for a
120 fixed sized array).
121
122 =cut
123
124 */
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
125 VTABLE INTVAL get_bool() {
a35f6fdb » petdance
2008-02-09 consting & localizing
126 const INTVAL size = SELF.elements();
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
127 return (INTVAL)(size != 0);
128 }
129
130 /*
131
132 =item C<INTVAL elements()>
133
134 =cut
135
136 */
137
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
138 VTABLE INTVAL elements() {
a638c12e » cotto
2009-01-25 [pmc] get rid of UnionVal in *FloatArray
139 INTVAL size;
140 GET_ATTR_size(INTERP, SELF, size);
141 return size;
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
142 }
143
144 /*
145
146 =item C<INTVAL get_integer()>
147
148 Returns the number of elements in the array.
149
150 =cut
151
152 */
153
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
154 VTABLE INTVAL get_integer() {
ae8baa55 » bschmalhofer
2005-03-20 DYNDYNSELF in the Fixed*Array PMC looks like a typo. Using SELF propably
155 return SELF.elements();
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
156 }
157
158
159 /*
160
161 =item C<INTVAL get_integer_keyed_int(INTVAL key)>
162
163 Returns the integer value of the element at index C<key>.
164
165 =cut
166
167 */
168
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
169 VTABLE INTVAL get_integer_keyed_int(INTVAL key) {
170 const FLOATVAL f = SELF.get_number_keyed_int(key);
8275ff5f » chromatic
2007-08-18 [PMC] Fixed a couple of casting warnings of function return values.
171 return (INTVAL)f;
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
172 }
173
174 /*
175
176 =item C<INTVAL get_integer_keyed(PMC *key)>
177
178 Returns the integer value of the element at index C<*key>.
179
180 =cut
181
182 */
183
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
184 VTABLE INTVAL get_integer_keyed(PMC *key) {
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
185 /* simple int keys only */
757f3a87 » chromatic
2009-05-08 [PMC] Replaced all uses of key_integer() outside of Key PMC and src/k…
186 const INTVAL k = VTABLE_get_integer(INTERP, key);
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
187 return SELF.get_integer_keyed_int(k);
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
188 }
189
190
191 /*
192
193 =item C<FLOATVAL get_number_keyed_int(INTVAL key)>
194
195 Returns the floating-point value of the element at index C<key>.
196
197 =cut
198
199 */
200
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
201 VTABLE FLOATVAL get_number_keyed_int(INTVAL key) {
a638c12e » cotto
2009-01-25 [pmc] get rid of UnionVal in *FloatArray
202 FLOATVAL *float_array;
203 INTVAL size;
f6d5c3e9 » chromatic
2007-09-04 [PMC] More minor cleanups and reformattings.
204
a638c12e » cotto
2009-01-25 [pmc] get rid of UnionVal in *FloatArray
205 GET_ATTR_size(INTERP, SELF, size);
206 if (key < 0 || key >= size)
2255840f » allisonrandal
2008-08-02 [pdd17pmc] Merging the pdd25cx branch into trunk for r26555 to r29949.
207 Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
d1854520 » chromatic
2004-12-12 Standardize internal exception calls (James deBoer, james at huronbox…
208 "FixedFloatArray: index out of bounds!");
72981862 » particle
2006-02-17 pmc: convert Fixed*Array and Resizable*Array internal_exceptions to r…
209
a638c12e » cotto
2009-01-25 [pmc] get rid of UnionVal in *FloatArray
210 GET_ATTR_float_array(INTERP, SELF, float_array);
211 return float_array[key];
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
212 }
213
214 /*
215
95e36766 » Infinoid
2007-08-09 [pmc] PDD07-ize function signatures in src/pmc/[b-f]*.pmc
216 =item C<FLOATVAL get_number_keyed(PMC *key)>
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
217
218 Returns the floating-point value of the element at index C<*key>.
219
220 =cut
221
222 */
223
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
224 VTABLE FLOATVAL get_number_keyed(PMC *key) {
757f3a87 » chromatic
2009-05-08 [PMC] Replaced all uses of key_integer() outside of Key PMC and src/k…
225 const INTVAL k = VTABLE_get_integer(INTERP, key);
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
226 return SELF.get_number_keyed_int(k);
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
227 }
228
229 /*
230
231 =item C<STRING *get_string_keyed_int(INTVAL key)>
232
233 Returns the Parrot string value of the element at index C<key>.
234
235 =cut
236
237 */
238
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
239 VTABLE STRING *get_string_keyed_int(INTVAL key) {
240 PMC * const e = SELF.get_pmc_keyed_int(key);
f6d5c3e9 » chromatic
2007-09-04 [PMC] More minor cleanups and reformattings.
241 return VTABLE_get_string(INTERP, e);
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
242 }
243
244 /*
245
246 =item C<STRING *get_string_keyed(PMC *key)>
247
248 Returns the Parrot string value of the element at index C<*key>.
249
250 =cut
251
252 */
253
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
254 VTABLE STRING *get_string_keyed(PMC *key) {
757f3a87 » chromatic
2009-05-08 [PMC] Replaced all uses of key_integer() outside of Key PMC and src/k…
255 const INTVAL k = VTABLE_get_integer(INTERP, key);
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
256 return SELF.get_string_keyed_int(k);
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
257 }
258
259
260 /*
261
262 =item C<PMC *get_pmc_keyed_int(INTVAL key)>
263
264 Returns the PMC value of the element at index C<key>.
265
266 =cut
267
268 */
269
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
270 VTABLE PMC *get_pmc_keyed_int(INTVAL key) {
083213a2 » Whiteknight
2010-02-16 start rename of pmc_new to Parrot_pmc_new
271 PMC * const ret = Parrot_pmc_new(INTERP, enum_class_Float);
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
272 const FLOATVAL val = SELF.get_number_keyed_int(key);
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
273
274 VTABLE_set_number_native(INTERP, ret, val);
275 return ret;
276 }
277
278 /*
279
280 =item C<PMC *get_pmc_keyed(PMC *key)>
281
282 Returns the PMC value of the element at index C<*key>.
283
284 =cut
285
286 */
287
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
288 VTABLE PMC *get_pmc_keyed(PMC *key) {
757f3a87 » chromatic
2009-05-08 [PMC] Replaced all uses of key_integer() outside of Key PMC and src/k…
289 const INTVAL k = VTABLE_get_integer(INTERP, key);
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
290 return SELF.get_pmc_keyed_int(k);
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
291 }
292
293 /*
294
295 =item C<void set_integer_native(INTVAL size)>
296
297 Resizes the array to C<size> elements.
298
299 =cut
300
301 */
302
a638c12e » cotto
2009-01-25 [pmc] get rid of UnionVal in *FloatArray
303 VTABLE void set_integer_native(INTVAL new_size) {
304 INTVAL old_size;
305 GET_ATTR_size(INTERP, SELF, old_size);
306 if (old_size || new_size < 1)
2255840f » allisonrandal
2008-08-02 [pdd17pmc] Merging the pdd25cx branch into trunk for r26555 to r29949.
307 Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
72981862 » particle
2006-02-17 pmc: convert Fixed*Array and Resizable*Array internal_exceptions to r…
308 "FixedFloatArray: Can't resize!");
f6d5c3e9 » chromatic
2007-09-04 [PMC] More minor cleanups and reformattings.
309
a638c12e » cotto
2009-01-25 [pmc] get rid of UnionVal in *FloatArray
310 SET_ATTR_size(INTERP, SELF, new_size);
1bc2b588 » bschmalhofer
2009-01-25 [codingstd] trailing_space.t
311 SET_ATTR_float_array(INTERP, SELF,
4833868f » bacek
2010-02-22 Merge branch 'sys_mem' into trunk
312 mem_gc_allocate_n_typed(INTERP, new_size, FLOATVAL));
4591dbb8 » chromatic
2009-09-03 [HLL] Fixed two compilation-breaking typos accidentally committed in …
313 PObj_custom_destroy_SET(SELF);
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
314 }
315
316 /*
317
318 =item C<void set_integer_keyed_int(INTVAL key, INTVAL value)>
319
320 Sets the integer value of the element at index C<key> to C<value>.
321
322 =cut
323
324 */
325
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
326 VTABLE void set_integer_keyed_int(INTVAL key, INTVAL value) {
327 SELF.set_number_keyed_int(key, (FLOATVAL)value);
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
328 }
329
330 /*
331
332 =item C<void set_integer_keyed(PMC *key, INTVAL value)>
333
334 Sets the integer value of the element at index C<key> to C<value>.
335
336 =cut
337
338 */
339
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
340 VTABLE void set_integer_keyed(PMC *key, INTVAL value) {
757f3a87 » chromatic
2009-05-08 [PMC] Replaced all uses of key_integer() outside of Key PMC and src/k…
341 const INTVAL k = VTABLE_get_integer(INTERP, key);
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
342 SELF.set_integer_keyed_int(k, value);
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
343 }
344
345 /*
346
347 =item C<void set_number_keyed_int(INTVAL key, FLOATVAL value)>
348
349 Sets the floating-point value of the element at index C<key> to
350 C<value>.
351
352 =cut
353
354 */
355
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
356 VTABLE void set_number_keyed_int(INTVAL key, FLOATVAL value) {
a638c12e » cotto
2009-01-25 [pmc] get rid of UnionVal in *FloatArray
357 FLOATVAL *float_array;
358 INTVAL size;
359
360 GET_ATTR_size(INTERP, SELF, size);
361 if (key < 0 || key >= size)
2255840f » allisonrandal
2008-08-02 [pdd17pmc] Merging the pdd25cx branch into trunk for r26555 to r29949.
362 Parrot_ex_throw_from_c_args(INTERP, NULL, EXCEPTION_OUT_OF_BOUNDS,
d1854520 » chromatic
2004-12-12 Standardize internal exception calls (James deBoer, james at huronbox…
363 "FixedFloatArray: index out of bounds!");
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
364
a638c12e » cotto
2009-01-25 [pmc] get rid of UnionVal in *FloatArray
365 GET_ATTR_float_array(INTERP, SELF, float_array);
366 float_array[key] = value;
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
367 }
368
369 /*
370
371 =item C<void set_number_keyed(PMC *key, FLOATVAL value)>
372
373 Sets the floating-point value of the element at index C<key> to
374 C<value>.
375
376 =cut
377
378 */
379
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
380 VTABLE void set_number_keyed(PMC *key, FLOATVAL value) {
757f3a87 » chromatic
2009-05-08 [PMC] Replaced all uses of key_integer() outside of Key PMC and src/k…
381 const INTVAL k = VTABLE_get_integer(INTERP, key);
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
382 SELF.set_number_keyed_int(k, value);
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
383 }
72981862 » particle
2006-02-17 pmc: convert Fixed*Array and Resizable*Array internal_exceptions to r…
384
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
385 /*
386
387 =item C<void set_string_keyed_int(INTVAL key, STRING *value)>
388
389 Sets the Parrot string value of the element at index C<key> to C<value>.
390
391 =cut
392
393 */
394
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
395 VTABLE void set_string_keyed_int(INTVAL key, STRING *value) {
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
396 FLOATVAL tempNum;
083213a2 » Whiteknight
2010-02-16 start rename of pmc_new to Parrot_pmc_new
397 PMC * const tempPMC = Parrot_pmc_new(INTERP, enum_class_Float);
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
398
399 VTABLE_set_string_native(INTERP, tempPMC, value);
400 tempNum = VTABLE_get_number(INTERP, tempPMC);
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
401 SELF.set_number_keyed_int(key, tempNum);
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
402 }
403
404 /*
405
95e36766 » Infinoid
2007-08-09 [pmc] PDD07-ize function signatures in src/pmc/[b-f]*.pmc
406 =item C<void set_string_keyed(PMC *key, STRING *value)>
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
407
408 Sets the string value of the element at index C<key> to
409 C<value>.
410
411 =cut
412
413 */
414
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
415 VTABLE void set_string_keyed(PMC *key, STRING *value) {
757f3a87 » chromatic
2009-05-08 [PMC] Replaced all uses of key_integer() outside of Key PMC and src/k…
416 const INTVAL k = VTABLE_get_integer(INTERP, key);
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
417 SELF.set_string_keyed_int(k, value);
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
418 }
419
420 /*
421
422 =item C<void set_pmc_keyed_int(INTVAL key, PMC *src)>
423
424 Sets the PMC value of the element at index C<key> to C<*src>.
425
426 =cut
427
428 */
429
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
430 VTABLE void set_pmc_keyed_int(INTVAL key, PMC *src) {
a35f6fdb » petdance
2008-02-09 consting & localizing
431 const FLOATVAL tempNum = VTABLE_get_number(INTERP, src);
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
432 SELF.set_number_keyed_int(key, tempNum);
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
433 }
434
435 /*
436
95e36766 » Infinoid
2007-08-09 [pmc] PDD07-ize function signatures in src/pmc/[b-f]*.pmc
437 =item C<void set_pmc_keyed(PMC *key, PMC *value)>
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
438
439 Sets the string value of the element at index C<key> to
440 C<value>.
441
442 =cut
443
444 */
445
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
446 VTABLE void set_pmc_keyed(PMC *key, PMC *value) {
757f3a87 » chromatic
2009-05-08 [PMC] Replaced all uses of key_integer() outside of Key PMC and src/k…
447 const INTVAL k = VTABLE_get_integer(INTERP, key);
59661f18 » allisonrandal
2008-03-11 [pdd17pmc] Merging the pdd17pmc branch into trunk (r24435 to r26307).
448 SELF.set_pmc_keyed_int(k, value);
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
449 }
450
451 }
452
453 /*
454
455 =back
456
457 =head1 SEE ALSO
458
1e8a4ab7 » Dan Sugalski
2004-10-19 this patch adds some relevant 'push' ops to the resizable PMCs, descr…
459 F<docs/pdds/pdd17_basic_types.pod>.
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
460
461 =cut
462
463 */
464
465 /*
466 * Local variables:
72575ae0 » bschmalhofer
2006-10-09 #40481: [PATCH] C-code coda in pmc files
467 * c-file-style: "parrot"
4498fea9 » Dan Sugalski
2004-06-12 This patch adds the above Fixed*Array classes. They are basic tests for
468 * End:
1d7dded8 » plobsing
2010-11-29 update C file vim modelines
469 * vim: expandtab shiftwidth=4 cinoptions='\:2=2' :
72575ae0 » bschmalhofer
2006-10-09 #40481: [PATCH] C-code coda in pmc files
470 */
Something went wrong with that request. Please try again.