Skip to content
Browse files

[pmc] PDD07-ize function signatures and local variable declarations,

for the rest of src/pmc/*.pmc.  (big patch)



git-svn-id: https://svn.parrot.org/parrot/trunk@20579 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent 95e3676 commit f0133666d3b13bda1dac8c366c4f4267c7eb3280 @Infinoid Infinoid committed Aug 9, 2007
Showing with 791 additions and 791 deletions.
  1. +4 −4 src/pmc/class.pmc
  2. +4 −4 src/pmc/closure.pmc
  3. +5 −5 src/pmc/continuation.pmc
  4. +1 −1 src/pmc/default.pmc
  5. +1 −1 src/pmc/env.pmc
  6. +1 −1 src/pmc/exception_handler.pmc
  7. +1 −1 src/pmc/file.pmc
  8. +2 −2 src/pmc/fixedbooleanarray.pmc
  9. +1 −1 src/pmc/fixedfloatarray.pmc
  10. +1 −1 src/pmc/fixedintegerarray.pmc
  11. +1 −1 src/pmc/fixedpmcarray.pmc
  12. +39 −39 src/pmc/hash.pmc
  13. +67 −67 src/pmc/integer.pmc
  14. +7 −7 src/pmc/intlist.pmc
  15. +20 −20 src/pmc/iterator.pmc
  16. +9 −9 src/pmc/key.pmc
  17. +1 −1 src/pmc/lexinfo.pmc
  18. +5 −5 src/pmc/lexpad.pmc
  19. +1 −1 src/pmc/managedstruct.pmc
  20. +9 −9 src/pmc/multiarray.pmc
  21. +4 −4 src/pmc/multisub.pmc
  22. +33 −33 src/pmc/namespace.pmc
  23. +6 −6 src/pmc/nci.pmc
  24. +1 −1 src/pmc/null.pmc
  25. +11 −11 src/pmc/object.pmc
  26. +10 −10 src/pmc/orderedhash.pmc
  27. +20 −20 src/pmc/os.pmc
  28. +14 −14 src/pmc/pair.pmc
  29. +12 −12 src/pmc/parrotclass.pmc
  30. +13 −13 src/pmc/parrotinterpreter.pmc
  31. +18 −18 src/pmc/parrotio.pmc
  32. +4 −4 src/pmc/parrotlibrary.pmc
  33. +17 −17 src/pmc/parrotobject.pmc
  34. +4 −4 src/pmc/parrotrunningthread.pmc
  35. +1 −1 src/pmc/parrotthread.pmc
  36. +3 −3 src/pmc/pccmethod_test.pmc
  37. +7 −7 src/pmc/pmcproxy.pmc
  38. +4 −4 src/pmc/pointer.pmc
  39. +3 −3 src/pmc/random.pmc
  40. +5 −5 src/pmc/ref.pmc
  41. +1 −1 src/pmc/resizablefloatarray.pmc
  42. +1 −1 src/pmc/resizableintegerarray.pmc
  43. +48 −48 src/pmc/resizablepmcarray.pmc
  44. +22 −22 src/pmc/resizablestringarray.pmc
  45. +4 −4 src/pmc/retcontinuation.pmc
  46. +11 −11 src/pmc/role.pmc
  47. +25 −25 src/pmc/sarray.pmc
  48. +123 −123 src/pmc/scalar.pmc
  49. +4 −4 src/pmc/sharedref.pmc
  50. +11 −11 src/pmc/slice.pmc
  51. +5 −5 src/pmc/stmref.pmc
  52. +6 −6 src/pmc/stmvar.pmc
  53. +102 −102 src/pmc/string.pmc
  54. +18 −18 src/pmc/sub.pmc
  55. +3 −3 src/pmc/super.pmc
  56. +7 −7 src/pmc/timer.pmc
  57. +2 −2 src/pmc/tqueue.pmc
  58. +6 −6 src/pmc/undef.pmc
  59. +22 −22 src/pmc/unmanagedstruct.pmc
View
8 src/pmc/class.pmc
@@ -357,7 +357,7 @@ init_class_from_hash(PARROT_INTERP, PMC *self, PMC *info)
}
PMC *
-find_vtable_override(PARROT_INTERP, PMC *class, STRING * name)
+find_vtable_override(PARROT_INTERP, PMC *class, STRING *name)
{
Parrot_Class * const _class = PARROT_CLASS(class);
/* Walk and search for the vtable method. */
@@ -1105,15 +1105,15 @@ Creates a new PMC object of the type of the class and calls init().
* them if they exist */
if (PMC_IS_NULL(init)) {
STRING *name = string_from_literal(interp, "init");
- PMC * meth = find_vtable_override(interp, SELF, name);
+ PMC *meth = find_vtable_override(interp, SELF, name);
if (!PMC_IS_NULL(meth)) {
Parrot_run_meth_fromc_args(interp, meth,
object, name, "v");
}
}
else {
STRING *name = string_from_literal(interp, "init_pmc");
- PMC * meth = find_vtable_override(interp, SELF, name);
+ PMC *meth = find_vtable_override(interp, SELF, name);
if (!PMC_IS_NULL(meth)) {
Parrot_run_meth_fromc_args(interp, meth,
object, name, "vP", init);
@@ -1415,7 +1415,7 @@ Compose a role into a class with the given exclusions and aliases.
*/
PCCMETHOD add_role(PMC *role,
- PMC* exclude_method :optional :named["exclude_method"],
+ PMC *exclude_method :optional :named["exclude_method"],
int got_exclude_method :opt_flag,
PMC *alias_method :optional :named["alias_method"],
int got_alias_method :opt_flag) {
View
8 src/pmc/closure.pmc
@@ -55,7 +55,7 @@ Marks the closure as live.
*/
void mark() {
- struct Parrot_sub * sub = PMC_sub(SELF);
+ struct Parrot_sub *sub = PMC_sub(SELF);
SUPER();
if (sub->outer_sub)
pobject_lives(INTERP, (PObj*)sub->outer_sub);
@@ -79,7 +79,7 @@ Invokes the closure.
*/
void set_pointer(void *value) {
- struct Parrot_sub * sub = PMC_sub(SELF);
+ struct Parrot_sub *sub = PMC_sub(SELF);
opcode_t *addr = (opcode_t *)value;
sub->start_offs = addr - sub->seg->base.data;
}
@@ -140,7 +140,7 @@ Invokes the closure.
}
void thawfinish(visit_info *info) {
- struct Parrot_sub * sub = PMC_sub(SELF);
+ struct Parrot_sub *sub = PMC_sub(SELF);
PMC *outer;
opcode_t i, ci;
PackFile_FixupTable *ft;
@@ -200,7 +200,7 @@ Destroys the closure. This is necessary in order to reclaim the context.
*/
void destroy() {
- struct Parrot_sub * sub = PMC_sub(SELF);
+ struct Parrot_sub *sub = PMC_sub(SELF);
#if CTX_LEAK_DEBUG
if (Interp_debug_TEST(INTERP, PARROT_CTX_DESTROY_DEBUG_FLAG)) {
fprintf(stderr, "[destroy closure %p, context %p with %d refs]\n",
View
10 src/pmc/continuation.pmc
@@ -82,7 +82,7 @@ Marks the continuation as live.
*/
void mark() {
- struct Parrot_cont * cc = PMC_cont(SELF);
+ struct Parrot_cont *cc = PMC_cont(SELF);
if (cc->to_ctx)
mark_context(INTERP, cc->to_ctx);
if (cc->dynamic_state)
@@ -100,7 +100,7 @@ Destroys the continuation.
*/
void destroy() {
- struct Parrot_cont * cc = PMC_cont(SELF);
+ struct Parrot_cont *cc = PMC_cont(SELF);
if (cc) {
#if CTX_LEAK_DEBUG
if (Interp_debug_TEST(interp, PARROT_CTX_DESTROY_DEBUG_FLAG)) {
@@ -126,7 +126,7 @@ Creates and returns a clone of the continuation.
*/
PMC *clone() {
- struct Parrot_cont * cc;
+ struct Parrot_cont *cc;
struct Parrot_cont *cc_self = PMC_cont(SELF);
PMC *ret = pmc_new_noinit(INTERP, enum_class_Continuation);
@@ -225,7 +225,7 @@ destination to continue execution.
*/
opcode_t *invoke(void *next) {
- struct Parrot_cont * cc = PMC_cont(SELF);
+ struct Parrot_cont *cc = PMC_cont(SELF);
Stack_Chunk_t *stack_target = cc->dynamic_state;
Stack_Chunk_t *corresponding_target;
int stack_delta = 0;
@@ -425,7 +425,7 @@ Experimental: return continuation PMC of this Continuation or Undef if none.
*/
METHOD PMC *continuation() {
- struct Parrot_cont * cc = PMC_cont(SELF);
+ struct Parrot_cont *cc = PMC_cont(SELF);
PMC *cont = cc->to_ctx->current_cont;
if (cont)
return cont;
View
2 src/pmc/default.pmc
@@ -47,7 +47,7 @@ caller(PARROT_INTERP, PMC *pmc /*NULLOK*/)
/*
-=item C<static void cant_do_method(PARROT_INTERP, PMC * pmc,
+=item C<static void cant_do_method(PARROT_INTERP, PMC *pmc,
const char *methname)>
Throws an exception "$methname() not implemented in class '$class'", used by
View
2 src/pmc/env.pmc
@@ -29,7 +29,7 @@ environment.
extern char **environ;
#endif
-static PMC * Env_PMC;
+static PMC *Env_PMC;
pmclass Env singleton does hash {
/*
View
2 src/pmc/exception_handler.pmc
@@ -70,7 +70,7 @@ Initializes the exception handler.
*/
void destroy() {
- struct Parrot_cont * cc = PMC_cont(SELF);
+ struct Parrot_cont *cc = PMC_cont(SELF);
if (cc) {
mem_sys_free(cc);
PMC_struct_val(SELF) = NULL;
View
2 src/pmc/file.pmc
@@ -27,7 +27,7 @@ C<File> is a singleton class which provides access to File functions.
/* XXX Check if we need to deallocate strerror strings */
/* XXX apparently, strerror_r is thread-safe and should be used instead.*/
-static PMC * File_PMC;
+static PMC *File_PMC;
pmclass File singleton {
/*
View
4 src/pmc/fixedbooleanarray.pmc
@@ -124,7 +124,7 @@ Creates and returns a copy of the array.
*/
PMC *clone() {
- PMC * dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC *dest = pmc_new(INTERP, SELF->vtable->base_type);
booleanarray_clone(INTERP, SELF, dest);
PObj_active_destroy_SET(dest);
return dest;
@@ -516,7 +516,7 @@ Used to unarchive the string.
SUPER(info);
if (info->extra_flags == EXTRA_IS_NULL) {
INTVAL size = io->vtable->shift_integer(INTERP, io);
- STRING * s = io->vtable->shift_string(INTERP, io);
+ STRING *s = io->vtable->shift_string(INTERP, io);
PMC_int_val(SELF) = size;
PMC_int_val2(pmc) = s->bufused * BITS_PER_CHAR;
PMC_data(pmc) = mem_sys_allocate_zeroed(s->bufused);
View
2 src/pmc/fixedfloatarray.pmc
@@ -88,7 +88,7 @@ Creates and returns a copy of the array.
PMC *clone() {
INTVAL size;
- PMC * dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC *dest = pmc_new(INTERP, SELF->vtable->base_type);
if (!PMC_data(SELF))
return dest;
View
2 src/pmc/fixedintegerarray.pmc
@@ -165,7 +165,7 @@ Creates and returns a copy of the array.
PMC *clone() {
INTVAL size;
- PMC * dest;
+ PMC *dest;
/* a quick hack to create a clone in the constant PMC arena
* this is needed for the call signatures
*
View
2 src/pmc/fixedpmcarray.pmc
@@ -171,7 +171,7 @@ Creates and returns a copy of the array.
*/
PMC *clone() {
- PMC * dest = pmc_new(INTERP, SELF->vtable->base_type);
+ PMC *dest = pmc_new(INTERP, SELF->vtable->base_type);
INTVAL size = PMC_int_val(SELF);
if (size) {
PMC_int_val(dest) = size;
View
78 src/pmc/hash.pmc
@@ -22,7 +22,7 @@ These are the vtable functions for the Hash PMC.
/*
-=item C<static PMC * get_integer_pmc(PARROT_INTERP, INTVAL base_type )>
+=item C<static PMC *get_integer_pmc(PARROT_INTERP, INTVAL base_type )>
Lookup the PMC type which is used for storing native integers.
@@ -32,7 +32,7 @@ TODO: PMCs extending Hash should probably register themselves.
*/
-static PMC* get_integer_pmc(PARROT_INTERP, INTVAL base_type) {
+static PMC *get_integer_pmc(PARROT_INTERP, INTVAL base_type) {
return pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_Integer));
@@ -41,7 +41,7 @@ static PMC* get_integer_pmc(PARROT_INTERP, INTVAL base_type) {
/*
-=item C<static PMC * get_number_pmc(PARROT_INTERP, INTVAL base_type )>
+=item C<static PMC *get_number_pmc(PARROT_INTERP, INTVAL base_type )>
Lookup the PMC type which is used for floating point numbers.
@@ -51,15 +51,15 @@ TODO: PMCs extending Hash should probably register themselves.
*/
-static PMC * get_number_pmc(PARROT_INTERP, INTVAL base_type) {
+static PMC *get_number_pmc(PARROT_INTERP, INTVAL base_type) {
return pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_Float));
}
/*
-=item C<static PMC * get_string_pmc(PARROT_INTERP, INTVAL base_type )>
+=item C<static PMC *get_string_pmc(PARROT_INTERP, INTVAL base_type )>
Lookup the PMC type which is used for storing strings.
@@ -69,7 +69,7 @@ TODO: PMCs extending Hash should probably register themselves.
*/
-static PMC * get_string_pmc(PARROT_INTERP, INTVAL base_type) {
+static PMC *get_string_pmc(PARROT_INTERP, INTVAL base_type) {
return pmc_new(interp,
Parrot_get_ctx_HLL_type(interp, enum_class_String));
@@ -78,15 +78,15 @@ static PMC * get_string_pmc(PARROT_INTERP, INTVAL base_type) {
/*
-=item C<static STRING* make_hash_key(PARROT_INTERP, PMC *key)>
+=item C<static STRING *make_hash_key(PARROT_INTERP, PMC *key)>
Returns a Parrot string for C<*key>.
=cut
*/
-static STRING* make_hash_key(PARROT_INTERP, NOTNULL(PMC *key))
+static STRING *make_hash_key(PARROT_INTERP, NOTNULL(PMC *key))
{
if (key == NULL)
real_exception(interp, NULL, E_KeyError,
@@ -150,8 +150,8 @@ Returns the type of the element for C<*key>.
*/
- INTVAL type_keyed_str(STRING* key) {
- HashBucket* const b =
+ INTVAL type_keyed_str(STRING *key) {
+ HashBucket * const b =
parrot_hash_get_bucket(INTERP, (Hash*) PMC_struct_val(SELF), key);
if (b == NULL) {
return 0;
@@ -198,8 +198,8 @@ Creates and returns a clone of the hash.
*/
- PMC* clone() {
- PMC* const dest = pmc_new_noinit(INTERP, SELF->vtable->base_type);
+ PMC *clone() {
+ PMC * const dest = pmc_new_noinit(INTERP, SELF->vtable->base_type);
PObj_custom_mark_destroy_SETALL(dest);
parrot_hash_clone(INTERP, (Hash *)PMC_struct_val(SELF),
(Hash**)&PMC_struct_val(dest));
@@ -231,7 +231,7 @@ Returns the size of the hash.
*/
- INTVAL get_integer_keyed_str(STRING* key) {
+ INTVAL get_integer_keyed_str(STRING *key) {
HashBucket * const b =
parrot_hash_get_bucket(INTERP, (Hash*) PMC_struct_val(SELF), key);
if (b == NULL) {
@@ -301,7 +301,7 @@ Returns the integer value for the element at C<*key>.
*/
- FLOATVAL get_number_keyed_str(STRING* key) {
+ FLOATVAL get_number_keyed_str(STRING *key) {
HashBucket * const b =
parrot_hash_get_bucket(INTERP, (Hash*) PMC_struct_val(SELF), key);
if (b == NULL) {
@@ -359,11 +359,11 @@ Return a representation of the hash contents.
*/
- STRING* get_string() {
+ STRING *get_string() {
return Parrot_sprintf_c(INTERP, "Hash[0x%x]", SELF);
}
- STRING* get_repr() {
+ STRING *get_repr() {
/* TODO use freeze */
PMC * const iter = VTABLE_get_iter(INTERP, SELF);
STRING *res = string_from_literal(INTERP, "{");
@@ -415,7 +415,7 @@ Return a representation of the hash contents.
*/
- STRING* get_string_keyed_str(STRING* key) {
+ STRING *get_string_keyed_str(STRING *key) {
HashBucket * const b =
parrot_hash_get_bucket(INTERP, (Hash*) PMC_struct_val(SELF), key);
if (b == NULL) {
@@ -429,7 +429,7 @@ Return a representation of the hash contents.
return VTABLE_get_string(INTERP, (PMC*) b->value);
}
- STRING* get_string_keyed_int(INTVAL key) {
+ STRING *get_string_keyed_int(INTVAL key) {
STRING * const s = string_from_int(INTERP, key);
return SELF.get_string_keyed_str(s);
}
@@ -444,7 +444,7 @@ Returns the string value for the element at C<*key>.
*/
- STRING* get_string_keyed(PMC* key) {
+ STRING *get_string_keyed(PMC *key) {
PMC *valpmc;
STRING *keystr;
HashBucket *b;
@@ -521,7 +521,7 @@ Returns the number of elements in the hash.
*/
- PMC* get_pmc_keyed_str(STRING *key) {
+ PMC *get_pmc_keyed_str(STRING *key) {
HashBucket * const b =
parrot_hash_get_bucket(INTERP, (Hash*) PMC_struct_val(SELF), key);
@@ -531,14 +531,14 @@ Returns the number of elements in the hash.
return (PMC *)b->value;
}
- PMC* get_pmc_keyed_int(INTVAL key) {
+ PMC *get_pmc_keyed_int(INTVAL key) {
STRING * const s = string_from_int(INTERP, key);
return SELF.get_pmc_keyed_str(s);
}
/*
-=item C<PMC* get_iter()>
+=item C<PMC *get_iter()>
Return a new iterator for the slice PMC C<key>
@@ -550,7 +550,7 @@ Returns the PMC value for the element at C<*key>.
*/
- PMC* get_iter() {
+ PMC *get_iter() {
PMC * const iter = pmc_new_init(INTERP, enum_class_Iterator, SELF);
PMC * const key = pmc_new(INTERP, enum_class_Key);
@@ -565,11 +565,11 @@ Returns the PMC value for the element at C<*key>.
return iter;
}
- PMC* slice(PMC *key) {
+ PMC *slice(PMC *key) {
return NULL;
}
- PMC* get_pmc_keyed(PMC *key) {
+ PMC *get_pmc_keyed(PMC *key) {
Hash * const hash = (Hash *)PMC_struct_val(SELF);
STRING *keystr;
HashBucket *b;
@@ -621,7 +621,7 @@ Returns whether the hash is the same as C<*other>.
*/
- INTVAL is_same(PMC* other) {
+ INTVAL is_same(PMC *other) {
return (INTVAL)(other->vtable == SELF->vtable &&
PMC_struct_val(other) == PMC_struct_val(SELF));
}
@@ -646,7 +646,7 @@ Returns whether the hash is the same as C<*other>.
nextkey = key_next(INTERP, key);
if (nextkey == NULL) {
- PMC* val = get_integer_pmc(INTERP, SELF->vtable->base_type);
+ PMC *val = get_integer_pmc(INTERP, SELF->vtable->base_type);
VTABLE_set_integer_native(INTERP, val, value);
parrot_hash_put(INTERP, (Hash *)PMC_struct_val(SELF), keystr, val);
@@ -696,7 +696,7 @@ Returns whether the hash is the same as C<*other>.
nextkey = key_next(INTERP, key);
if (nextkey == NULL) {
- PMC* val = get_number_pmc(INTERP, SELF->vtable->base_type);
+ PMC *val = get_number_pmc(INTERP, SELF->vtable->base_type);
PMC_num_val(val) = value;
parrot_hash_put(INTERP, (Hash *)PMC_struct_val(SELF), keystr, val);
return;
@@ -749,7 +749,7 @@ Sets C<value> as the value for C<*key>.
nextkey = key_next(INTERP, key);
if (nextkey == NULL) {
- PMC* const val = get_string_pmc(INTERP, SELF->vtable->base_type);
+ PMC * const val = get_string_pmc(INTERP, SELF->vtable->base_type);
VTABLE_set_string_native(INTERP, val, value);
parrot_hash_put(INTERP, (Hash *)PMC_struct_val(SELF), keystr, val);
return;
@@ -773,7 +773,7 @@ Sets C<value> as the value for C<*key>.
*/
void set_string_keyed_str(STRING *key, STRING *value) {
- PMC* const val = get_string_pmc(INTERP, SELF->vtable->base_type);
+ PMC * const val = get_string_pmc(INTERP, SELF->vtable->base_type);
VTABLE_set_string_native(INTERP, val, value);
parrot_hash_put(INTERP, (Hash *)PMC_struct_val(SELF), key, val);
@@ -838,7 +838,7 @@ Check if two hashes hold the same keys and values.
*/
- INTVAL is_equal(PMC* value) {
+ INTVAL is_equal(PMC *value) {
PMC * const iter = VTABLE_get_iter(INTERP, SELF);
INTVAL j, n;
@@ -871,7 +871,7 @@ Check if two hashes hold the same keys and values.
*/
- INTVAL exists_keyed_str(STRING* key) {
+ INTVAL exists_keyed_str(STRING *key) {
HashBucket * const b =
parrot_hash_get_bucket(INTERP, (Hash*) PMC_struct_val(SELF), key);
return b != NULL;
@@ -887,7 +887,7 @@ Returns whether a key C<*key> exists in the hash.
*/
- INTVAL exists_keyed(PMC* key) {
+ INTVAL exists_keyed(PMC *key) {
Hash * const h = (Hash *)PMC_struct_val(SELF);
STRING * const sx = key_string(INTERP, key);
HashBucket *b;
@@ -909,7 +909,7 @@ Returns whether a key C<*key> exists in the hash.
*/
- INTVAL defined_keyed_str(STRING* key) {
+ INTVAL defined_keyed_str(STRING *key) {
HashBucket * const b =
parrot_hash_get_bucket(INTERP, (Hash*) PMC_struct_val(SELF), key);
@@ -928,7 +928,7 @@ Returns whether the value for C<*key> is defined.
*/
- INTVAL defined_keyed(PMC* key) {
+ INTVAL defined_keyed(PMC *key) {
Hash * const h = (Hash *)PMC_struct_val(SELF);
STRING * const sx = key_string(INTERP, key);
HashBucket *b;
@@ -951,7 +951,7 @@ Returns whether the value for C<*key> is defined.
*/
- void delete_keyed_str(STRING* key) {
+ void delete_keyed_str(STRING *key) {
parrot_hash_delete(INTERP, (Hash *)PMC_struct_val(SELF), key);
}
@@ -965,7 +965,7 @@ Deletes the element associated with C<*key>.
*/
- void delete_keyed(PMC* key) {
+ void delete_keyed(PMC *key) {
Hash * const h = (Hash *)PMC_struct_val(SELF);
STRING * const sx = key_string(INTERP, key);
HashBucket *b;
@@ -982,15 +982,15 @@ Deletes the element associated with C<*key>.
/*
-=item C<PMC* slice(PMC *key)>
+=item C<PMC *slice(PMC *key)>
Return a new iterator for the slice PMC C<key>
=cut
*/
- PMC* slice(PMC* key, INTVAL f) {
+ PMC *slice(PMC *key, INTVAL f) {
switch (f) {
case 0:
{
View
134 src/pmc/integer.pmc
@@ -24,8 +24,8 @@ register.
/* XXX create MMD headers to in Pmc2c.pm */
extern INTVAL Parrot_BigInt_is_equal_BigInt(PARROT_INTERP, PMC*, PMC*);
-extern PMC* Parrot_BigInt_multiply_int(PARROT_INTERP,
- PMC* pmc, INTVAL value, PMC* dest) ;
+extern PMC *Parrot_BigInt_multiply_int(PARROT_INTERP,
+ PMC *pmc, INTVAL value, PMC *dest) ;
static PMC*
overflow(PARROT_INTERP, PMC *self, INTVAL b, PMC *dest, int mmd)
@@ -71,7 +71,7 @@ overflow_p(PARROT_INTERP, PMC *self, PMC *val, PMC *dest, int mmd)
pmclass Integer extends scalar does integer does scalar {
/*
-=item C<PMC instantiate(PMC* sig)>
+=item C<PMC instantiate(PMC *sig)>
Create a new Integer with arguments passed according to pdd03.
@@ -83,8 +83,8 @@ Initializes the integer with a default value of C<0>.
=cut
*/
- PMC* instantiate(PMC* sig) {
- PMC* const ret = new_pmc_header(INTERP, 0);
+ PMC *instantiate(PMC *sig) {
+ PMC * const ret = new_pmc_header(INTERP, 0);
opcode_t *arg_op;
INTVAL init = 0;
@@ -121,7 +121,7 @@ Class method to construct an Integer from the string representation C<rep>.
=cut
*/
- PMC* new_from_string(STRING *rep, INTVAL flags) {
+ PMC *new_from_string(STRING *rep, INTVAL flags) {
PMC *res;
const INTVAL type = SELF->vtable->base_type;
@@ -218,7 +218,7 @@ Return a new BigInt PMC with the value of C<SELF>.
=cut
*/
- PMC* get_bignum() {
+ PMC *get_bignum() {
const INTVAL val = DYNSELF.get_integer();
PMC * const ret = pmc_new(INTERP, enum_class_BigInt);
VTABLE_set_integer_native(INTERP, ret, val);
@@ -234,10 +234,10 @@ Returns the string value of the integer.
=cut
*/
- STRING* get_string() {
+ STRING *get_string() {
return string_from_int(INTERP, PMC_int_val(SELF));
}
- STRING* get_repr() {
+ STRING *get_repr() {
return string_from_int(INTERP, PMC_int_val(SELF));
}
@@ -252,7 +252,7 @@ Sets the value of the integer to the value of the C<Integer> C<*value>.
=cut
*/
- void set_integer_same(PMC * value) {
+ void set_integer_same(PMC *value) {
PMC_int_val(SELF) = PMC_int_val(value);
}
@@ -298,16 +298,16 @@ Morphs the integer to a C<String> and sets the value from C<value>.
DYNSELF.set_integer_native(value);
}
- void set_string_native(STRING* value) {
+ void set_string_native(STRING *value) {
DYNSELF.morph(enum_class_String);
DYNSELF.set_string_native(value);
}
/*
-=item C<PMC* add(PMC *value, PMC *dest)>
+=item C<PMC *add(PMC *value, PMC *dest)>
-=item C<PMC* add_int(INTVAL value, PMC *dest)>
+=item C<PMC *add_int(INTVAL value, PMC *dest)>
Adds C<value> to the integer and returns the result in C<*dest>.
@@ -319,7 +319,7 @@ two types.
=cut
*/
- PMC* add(PMC* value, PMC* dest) {
+ PMC *add(PMC *value, PMC *dest) {
MMD_Integer: {
/*
* SELF and value can both be PMCs that inherit
@@ -370,7 +370,7 @@ MMD_DEFAULT: {
}
}
- PMC* add_int(INTVAL b, PMC* dest) {
+ PMC *add_int(INTVAL b, PMC *dest) {
/* INTVAL a = PMC_int_val(SELF); */
const INTVAL a = VTABLE_get_integer(INTERP, SELF);
const INTVAL c = a + b;
@@ -398,7 +398,7 @@ Adds C<value> to C<SELF> inplace.
*/
- void i_add(PMC* value) {
+ void i_add(PMC *value) {
MMD_Integer: {
SELF.i_add_int(VTABLE_get_integer(INTERP, value));
}
@@ -433,7 +433,7 @@ MMD_DEFAULT: {
}
/*
-=item C<PMC* subtract(PMC *value, PMC *dest)>
+=item C<PMC *subtract(PMC *value, PMC *dest)>
Subtracts C<*value> from the integer and returns the result in C<*dest>.
If C<dest> is NULL, a new int PMC is created.
@@ -444,7 +444,7 @@ call C<get_integer> and C<set_integer_native> always.
=cut
*/
- PMC* subtract(PMC* value, PMC* dest) {
+ PMC *subtract(PMC *value, PMC *dest) {
MMD_Integer: {
const INTVAL a = DYNSELF.get_integer();
const INTVAL b = VTABLE_get_integer(INTERP, value);
@@ -484,14 +484,14 @@ MMD_DEFAULT: {
/*
-=item C<PMC* subtract_int(INTVAL value, PMC *dest)>
+=item C<PMC *subtract_int(INTVAL value, PMC *dest)>
Subtracts C<value> from the integer and returns the result in C<*dest>.
=cut
*/
- PMC* subtract_int(INTVAL b, PMC* dest) {
+ PMC *subtract_int(INTVAL b, PMC *dest) {
const INTVAL a = DYNSELF.get_integer();
const INTVAL c = a - b;
if ((c^a) >= 0 || (c^~b) >= 0) {
@@ -518,7 +518,7 @@ Subtracts C<value> from C<SELF> inplace.
*/
- void i_subtract(PMC* value) {
+ void i_subtract(PMC *value) {
MMD_Integer: {
const INTVAL a = DYNSELF.get_integer();
const INTVAL b = VTABLE_get_integer(INTERP, value);
@@ -561,16 +561,16 @@ MMD_DEFAULT: {
/*
-=item C<PMC* multiply(PMC *value, PMC *dest)>
+=item C<PMC *multiply(PMC *value, PMC *dest)>
-=item C<PMC* multiply_int(INTVAL value, PMC *dest)>
+=item C<PMC *multiply_int(INTVAL value, PMC *dest)>
Multiplies the integer by C<*value> and returns the result in C<*dest>.
=cut
*/
- PMC* multiply(PMC* value, PMC* dest) {
+ PMC *multiply(PMC *value, PMC *dest) {
MMD_Integer: {
const INTVAL a = VTABLE_get_integer(INTERP, SELF);
const INTVAL b = VTABLE_get_integer(INTERP, value);
@@ -605,7 +605,7 @@ MMD_DEFAULT: {
}
}
- PMC* multiply_int(INTVAL b, PMC* dest) {
+ PMC *multiply_int(INTVAL b, PMC *dest) {
const INTVAL a = DYNSELF.get_integer();
const double cf = (double)a * (double)b;
const INTVAL c = a * b;
@@ -633,7 +633,7 @@ Multiply C<value> with C<SELF> inplace.
*/
- void i_multiply(PMC* value) {
+ void i_multiply(PMC *value) {
MMD_Integer: {
SELF.i_multiply_int(VTABLE_get_integer(INTERP, value));
}
@@ -669,11 +669,11 @@ MMD_DEFAULT: {
/*
-=item C<PMC* divide(PMC *value, PMC *dest)>
+=item C<PMC *divide(PMC *value, PMC *dest)>
-=item C<PMC* divide_int(INTVAL value, PMC *dest)>
+=item C<PMC *divide_int(INTVAL value, PMC *dest)>
-=item C<PMC* divide_float(FLOATVAL value, PMC *dest)>
+=item C<PMC *divide_float(FLOATVAL value, PMC *dest)>
Divides the number by C<value> and returns the result in C<*dest>.
@@ -689,7 +689,7 @@ Divides C<SELF> by C<value> inplace.
*/
- PMC* divide(PMC* value, PMC* dest) {
+ PMC *divide(PMC *value, PMC *dest) {
MMD_BigInt: {
return overflow_p(INTERP, SELF, value, dest, MMD_DIVIDE);
}
@@ -706,7 +706,7 @@ MMD_DEFAULT: {
}
}
- void i_divide(PMC* value) {
+ void i_divide(PMC *value) {
MMD_BigInt: {
overflow_p(INTERP, SELF, value, SELF, MMD_DIVIDE);
}
@@ -722,11 +722,11 @@ MMD_DEFAULT: {
/*
-=item C<PMC* floor_divide(PMC *value, PMC *dest)>
+=item C<PMC *floor_divide(PMC *value, PMC *dest)>
-=item C<PMC* floor_divide_int(INTVAL value, PMC *dest)>
+=item C<PMC *floor_divide_int(INTVAL value, PMC *dest)>
-=item C<PMC* floor_divide_float(FLOATVAL value, PMC *dest)>
+=item C<PMC *floor_divide_float(FLOATVAL value, PMC *dest)>
Divides the number by C<value> and returns the result in C<*dest>.
@@ -742,7 +742,7 @@ Divides C<SELF> by C<value> inplace.
*/
- PMC* floor_divide(PMC* value, PMC* dest) {
+ PMC *floor_divide(PMC *value, PMC *dest) {
MMD_BigInt: {
return overflow_p(INTERP, SELF, value, dest, MMD_FLOOR_DIVIDE);
}
@@ -760,7 +760,7 @@ MMD_DEFAULT: {
}
}
- PMC* floor_divide_int(INTVAL value, PMC* dest) {
+ PMC *floor_divide_int(INTVAL value, PMC *dest) {
if (value == 0)
real_exception(INTERP, NULL, E_ZeroDivisionError,
"float division by zero");
@@ -771,7 +771,7 @@ MMD_DEFAULT: {
return dest;
}
- PMC* floor_divide_float(FLOATVAL value, PMC* dest) {
+ PMC *floor_divide_float(FLOATVAL value, PMC *dest) {
if (value == 0.0)
real_exception(INTERP, NULL, E_ZeroDivisionError,
"float division by zero");
@@ -782,7 +782,7 @@ MMD_DEFAULT: {
return dest;
}
- void i_floor_divide(PMC* value) {
+ void i_floor_divide(PMC *value) {
MMD_BigInt: {
overflow_p(INTERP, SELF, value, SELF, MMD_FLOOR_DIVIDE);
}
@@ -815,11 +815,11 @@ MMD_DEFAULT: {
/*
-=item C<PMC* cmodulus(PMC *value, PMC *dest)>
+=item C<PMC *cmodulus(PMC *value, PMC *dest)>
-=item C<PMC* cmodulus(INTVAL value, PMC *dest)>
+=item C<PMC *cmodulus(INTVAL value, PMC *dest)>
-=item C<PMC* cmodulus(FLOATVAL value, PMC *dest)>
+=item C<PMC *cmodulus(FLOATVAL value, PMC *dest)>
Calculates the value of the number C-style C<mod> C<value> and returns
the result in C<dest>.
@@ -837,7 +837,7 @@ the result in C<dest>.
*/
- PMC* cmodulus(PMC* value, PMC* dest) {
+ PMC *cmodulus(PMC *value, PMC *dest) {
MMD_BigInt: {
return overflow_p(INTERP, SELF, value, dest, MMD_CMOD);
}
@@ -855,7 +855,7 @@ MMD_DEFAULT: {
}
}
- PMC* cmodulus_float(FLOATVAL value, PMC* dest) {
+ PMC *cmodulus_float(FLOATVAL value, PMC *dest) {
if (value == 0.0)
real_exception(INTERP, NULL, E_ZeroDivisionError,
"int cmodulus by zero");
@@ -866,7 +866,7 @@ MMD_DEFAULT: {
return dest;
}
- PMC* cmodulus_int(INTVAL value, PMC* dest) {
+ PMC *cmodulus_int(INTVAL value, PMC *dest) {
if (value == 0)
real_exception(INTERP, NULL, E_ZeroDivisionError,
"int cmodulus by zero");
@@ -877,7 +877,7 @@ MMD_DEFAULT: {
return dest;
}
- void i_cmodulus(PMC* value) {
+ void i_cmodulus(PMC *value) {
MMD_BigInt: {
overflow_p(INTERP, SELF, value, SELF, MMD_CMOD);
}
@@ -910,11 +910,11 @@ MMD_DEFAULT: {
/*
-=item C<PMC* modulus(PMC *value, PMC *dest)>
+=item C<PMC *modulus(PMC *value, PMC *dest)>
-=item C<PMC* modulus(INTVAL value, PMC *dest)>
+=item C<PMC *modulus(INTVAL value, PMC *dest)>
-=item C<PMC* modulus(FLOATVAL value, PMC *dest)>
+=item C<PMC *modulus(FLOATVAL value, PMC *dest)>
Calculates the value of corrected C<mod> C<value> and returns
the result in C<dest>. See also ops/math.ops.
@@ -931,7 +931,7 @@ Calculates modulus inplace
*/
- PMC* modulus(PMC* value, PMC* dest) {
+ PMC *modulus(PMC *value, PMC *dest) {
MMD_BigInt: {
return overflow_p(INTERP, SELF, value, dest, MMD_MOD);
}
@@ -949,7 +949,7 @@ MMD_DEFAULT: {
}
}
- PMC* modulus_int(INTVAL value, PMC* dest) {
+ PMC *modulus_int(INTVAL value, PMC *dest) {
if (value == 0)
real_exception(INTERP, NULL, E_ZeroDivisionError,
"int modulus by zero");
@@ -960,7 +960,7 @@ MMD_DEFAULT: {
return dest;
}
- PMC* modulus_float(FLOATVAL value, PMC* dest) {
+ PMC *modulus_float(FLOATVAL value, PMC *dest) {
if (value == 0.0)
real_exception(INTERP, NULL, E_ZeroDivisionError,
"int modulus by zero");
@@ -970,7 +970,7 @@ MMD_DEFAULT: {
intval_mod(DYNSELF.get_integer(), (INTVAL)value));
return dest;
}
- void i_modulus(PMC* value) {
+ void i_modulus(PMC *value) {
MMD_BigInt: {
overflow_p(INTERP, SELF, value, SELF, MMD_MOD);
}
@@ -1003,13 +1003,13 @@ MMD_DEFAULT: {
/*
-=item C<PMC* pow(PMC* value, PMC *dest)>
+=item C<PMC *pow(PMC *value, PMC *dest)>
-=item C<PMC* pow_int(INTVAL value, PMC *dest)>
+=item C<PMC *pow_int(INTVAL value, PMC *dest)>
Return SELF to the C<value>th power and return result in C<dest>.
-=item C<void i_pow(PMC* value)>
+=item C<void i_pow(PMC *value)>
=item C<void i_pow_int(INTVAL value)>
@@ -1020,12 +1020,12 @@ TODO Complex and BigInt rhs.
=cut
*/
- PMC* pow(PMC* value, PMC* dest) {
+ PMC *pow(PMC *value, PMC *dest) {
const INTVAL v = VTABLE_get_integer(INTERP, value);
return SELF.pow_int(v, dest);
}
- PMC* pow_int(INTVAL b, PMC* dest) {
+ PMC *pow_int(INTVAL b, PMC *dest) {
const INTVAL a = DYNSELF.get_integer();
const INTVAL orig_b = b;
INTVAL r;
@@ -1060,7 +1060,7 @@ TODO Complex and BigInt rhs.
}
- void i_pow(PMC* value) {
+ void i_pow(PMC *value) {
SELF.pow(value, SELF);
}
@@ -1071,16 +1071,16 @@ TODO Complex and BigInt rhs.
/*
-=item C<INTVAL is_equal(PMC* value)>
+=item C<INTVAL is_equal(PMC *value)>
The C<==> operation.
=cut
*/
- INTVAL is_equal(PMC* value) {
+ INTVAL is_equal(PMC *value) {
MMD_BigInt: {
- PMC* const temp = pmc_new(INTERP, enum_class_BigInt);
+ PMC * const temp = pmc_new(INTERP, enum_class_BigInt);
VTABLE_set_integer_native(INTERP, temp, PMC_int_val(SELF));
return Parrot_BigInt_is_equal_BigInt(INTERP, temp, value);
}
@@ -1099,7 +1099,7 @@ Returns the result of comparing the integer with C<*value>.
=cut
*/
- INTVAL cmp(PMC* value) {
+ INTVAL cmp(PMC *value) {
MMD_String: {
const FLOATVAL fdiff =
PMC_int_val(SELF) - VTABLE_get_number(INTERP, value);
@@ -1134,7 +1134,7 @@ Returns the result of numerically comparing the integer with C<*value>.
=cut
*/
- INTVAL cmp_num(PMC* value) {
+ INTVAL cmp_num(PMC *value) {
MMD_String: {
const FLOATVAL fdiff =
PMC_int_val(SELF) - VTABLE_get_number(INTERP, value);
@@ -1189,7 +1189,7 @@ Decrements the integer.
}
/*
-=item C<PMC* absolute(PMC* dest)>
+=item C<PMC *absolute(PMC *dest)>
=item C<void absolute()>
@@ -1199,7 +1199,7 @@ Sets C<dest> to the absolute value of SELF.
*/
- PMC* absolute(PMC *dest) {
+ PMC *absolute(PMC *dest) {
const INTVAL a = abs(DYNSELF.get_integer());
/* XXX overlflow for -maxint */
if (!dest)
@@ -1216,7 +1216,7 @@ Sets C<dest> to the absolute value of SELF.
/*
-=item C<STRING* get_as_base(INTVAL base)>
+=item C<STRING *get_as_base(INTVAL base)>
Converts and returns the integer in base C<base>.
C<base> must be between 2 and 36, inclusize.
@@ -1225,7 +1225,7 @@ C<base> must be between 2 and 36, inclusize.
*/
- METHOD STRING* get_as_base(INTVAL base) {
+ METHOD STRING *get_as_base(INTVAL base) {
char buf[128];
if ((base < 2) || (base > 36))
View
14 src/pmc/intlist.pmc
@@ -32,8 +32,8 @@ Creates and returns a clone of the list.
*/
- PMC* clone() {
- PMC* const dest = pmc_new_noinit(INTERP, SELF->vtable->base_type);
+ PMC *clone() {
+ PMC * const dest = pmc_new_noinit(INTERP, SELF->vtable->base_type);
PObj_custom_mark_SET(dest);
PMC_struct_val(dest) = intlist_clone(INTERP,
(IntList *) PMC_struct_val(SELF));
@@ -96,7 +96,7 @@ Sets C<value> at index C<*key>.
*/
- void set_integer_keyed(PMC* key, INTVAL value) {
+ void set_integer_keyed(PMC *key, INTVAL value) {
INTVAL ix;
if (!key) return;
@@ -146,7 +146,7 @@ Returns the value of the element at index C<*key>.
*/
- INTVAL get_integer_keyed(PMC* key) {
+ INTVAL get_integer_keyed(PMC *key) {
INTVAL ix;
if (!key) return 0;
ix = key_integer(INTERP, key);
@@ -211,15 +211,15 @@ Removes and returns the first element in the list.
return intlist_shift(INTERP, list);
}
- void splice(PMC* value, INTVAL offset, INTVAL count) {
+ void splice(PMC *value, INTVAL offset, INTVAL count) {
if (SELF->vtable->base_type != value->vtable->base_type)
real_exception(INTERP, NULL, E_TypeError,
"Type mismatch in splice");
list_splice(INTERP, (List*) PMC_struct_val(SELF),
(List *)PMC_struct_val(value), offset, count);
}
- PMC* slice(PMC* key, INTVAL f) {
+ PMC *slice(PMC *key, INTVAL f) {
switch (f) {
case 0:
{
@@ -233,7 +233,7 @@ Removes and returns the first element in the list.
"IntList: Unknown slice type");
}
- PMC* get_iter() {
+ PMC *get_iter() {
PMC * const iter = pmc_new_init(INTERP, enum_class_Iterator, SELF);
PMC * const key = pmc_new(INTERP, enum_class_Key);
View
40 src/pmc/iterator.pmc
@@ -100,7 +100,7 @@ Defaults iteration mode to iterate from start.
*/
- void init_pmc(PMC* aggregate) {
+ void init_pmc(PMC *aggregate) {
PMC_pmc_val(SELF) = aggregate;
PMC_struct_val(SELF) = NULL;
PObj_custom_mark_SET(SELF);
@@ -138,7 +138,7 @@ Make a clone of the iterator.
*/
- PMC* clone() {
+ PMC *clone() {
PMC * const key = (PMC *)PMC_struct_val(SELF);
PMC * const res = pmc_new_init(INTERP, SELF->vtable->base_type, PMC_pmc_val(SELF));
PMC_struct_val(res) = VTABLE_clone(interp, key);
@@ -170,7 +170,7 @@ Returns a textual representation of the iterator.
*/
- STRING* get_string() {
+ STRING *get_string() {
PMC * const key = (PMC *)PMC_struct_val(SELF);
return string_from_int(INTERP, key_integer(INTERP, key));
}
@@ -183,7 +183,7 @@ Returns a textual representation of the iterator.
*/
- INTVAL get_integer_keyed(PMC* key) {
+ INTVAL get_integer_keyed(PMC *key) {
return VTABLE_get_integer_keyed(INTERP, (PMC *)PMC_pmc_val(SELF), key);
}
@@ -211,7 +211,7 @@ Get integer value of current position plus idx.
*/
- FLOATVAL get_number_keyed(PMC* key) {
+ FLOATVAL get_number_keyed(PMC *key) {
return VTABLE_get_number_keyed(INTERP,(PMC *)PMC_pmc_val(SELF), key);
}
@@ -241,7 +241,7 @@ Get number value of current position plus idx.
*/
- STRING* get_string_keyed(PMC* key) {
+ STRING *get_string_keyed(PMC *key) {
return VTABLE_get_string_keyed(INTERP, (PMC *)PMC_pmc_val(SELF), key);
}
@@ -255,7 +255,7 @@ Get string value of current position plus idx.
*/
- STRING* get_string_keyed_int(INTVAL idx) {
+ STRING *get_string_keyed_int(INTVAL idx) {
PMC * const key = (PMC *)PMC_struct_val(SELF);
PMC * const agg = (PMC *)PMC_pmc_val(SELF);
return VTABLE_get_string_keyed_int(INTERP, agg, PMC_int_val(key) + idx);
@@ -300,7 +300,7 @@ Returns the element for C<*key>.
*/
- PMC* get_pmc_keyed(PMC* key) {
+ PMC *get_pmc_keyed(PMC *key) {
return VTABLE_get_pmc_keyed(INTERP, (PMC *)PMC_pmc_val(SELF), key);
}
@@ -314,7 +314,7 @@ Returns the element for C<key>.
*/
- PMC* get_pmc_keyed_int(INTVAL idx) {
+ PMC *get_pmc_keyed_int(INTVAL idx) {
PMC * const key = (PMC *)PMC_struct_val(SELF);
PMC * const agg = (PMC *)PMC_pmc_val(SELF);
return VTABLE_get_pmc_keyed_int(INTERP, agg, PMC_int_val(key) + idx);
@@ -401,7 +401,7 @@ Reset the Iterator. C<value> must be one of
*/
- STRING* pop_string() {
+ STRING *pop_string() {
PMC * const key = (PMC *)PMC_struct_val(SELF);
PMC * const agg = (PMC *)PMC_pmc_val(SELF);
STRING * const ret = VTABLE_get_string_keyed(INTERP, agg, key);
@@ -421,7 +421,7 @@ the previous one.
*/
- PMC* pop_pmc() {
+ PMC *pop_pmc() {
PMC * const key = (PMC *)PMC_struct_val(SELF);
PMC * const agg = (PMC *)PMC_pmc_val(SELF);
PMC * const ret = VTABLE_get_pmc_keyed(INTERP, agg, key);
@@ -453,7 +453,7 @@ the next one.
/*
-=item C<opcode_t* invoke(void* next)>
+=item C<opcode_t *invoke(void *next)>
Return the next element of the aggregate. The return type may depend on
the aggregate. If there are no more items in the aggregate, I1 .. I4 are
@@ -464,7 +464,7 @@ See F<docs/pdds/pdd03_calling_conventions.pod>.
=cut
*/
- opcode_t* invoke(void *next) {
+ opcode_t *invoke(void *next) {
PMC *agg;
if (REG_INT(interp, 3) == 1) { /* iterator constructor */
@@ -529,7 +529,7 @@ See F<docs/pdds/pdd03_calling_conventions.pod>.
*/
- STRING* shift_string() {
+ STRING *shift_string() {
PMC * const key = (PMC *)PMC_struct_val(SELF);
PMC * const agg = (PMC *)PMC_pmc_val(SELF);
STRING * const ret = VTABLE_get_string_keyed(INTERP, agg, key);
@@ -540,7 +540,7 @@ See F<docs/pdds/pdd03_calling_conventions.pod>.
/*
-=item C<PMC* shift_pmc()>
+=item C<PMC *shift_pmc()>
Returns the element for the current idx/key and sets the idx/key to
the next one.
@@ -549,7 +549,7 @@ the next one.
*/
- PMC* shift_pmc() {
+ PMC *shift_pmc() {
PMC * const key = (PMC *)PMC_struct_val(SELF);
PMC * const agg = (PMC *)PMC_pmc_val(SELF);
PMC *ret;
@@ -575,7 +575,7 @@ Returns whether an element for C<*key> exists in the aggregate.
*/
- INTVAL exists_keyed(PMC* key) {
+ INTVAL exists_keyed(PMC *key) {
return VTABLE_exists_keyed(INTERP, (PMC *)PMC_pmc_val(SELF), key);
}
@@ -617,7 +617,7 @@ Returns whether the iterator contains an aggregate.
*/
- INTVAL defined_keyed(PMC* key) {
+ INTVAL defined_keyed(PMC *key) {
return VTABLE_defined_keyed(INTERP, (PMC *)PMC_pmc_val(SELF), key);
}
@@ -647,7 +647,7 @@ Returns the result of calling C<type_keyed(key)> on the aggregate.
*/
- INTVAL type_keyed(PMC* key) {
+ INTVAL type_keyed(PMC *key) {
return VTABLE_type_keyed(INTERP, (PMC *)PMC_pmc_val(SELF), key);
}
@@ -667,7 +667,7 @@ Returns the result of calling C<type_keyed(key)> on the aggregate.
return VTABLE_type_keyed_int(INTERP, agg, PMC_int_val(key) + idx);
}
- PMC* get_iter() {
+ PMC *get_iter() {
return SELF;
}
}
View
18 src/pmc/key.pmc
@@ -55,7 +55,7 @@ Creates and returns a clone of the key.
*/
- PMC* clone() {
+ PMC *clone() {
PMC * const dest = pmc_new_noinit(INTERP, SELF->vtable->base_type);
PMC *dkey = dest;
PMC *key = SELF;
@@ -145,7 +145,7 @@ Returns the Parrot string value of the key.
*/
- STRING* get_string() {
+ STRING *get_string() {
return key_string(INTERP, SELF);
}
@@ -159,7 +159,7 @@ Returns the PMC value of the key.
*/
- PMC* get_pmc() {
+ PMC *get_pmc() {
return key_pmc(INTERP, SELF);
}
@@ -198,7 +198,7 @@ Sets the value of the key to C<value>.
*/
- void set_string_native(STRING* value) {
+ void set_string_native(STRING *value) {
key_set_string(INTERP, SELF, value);
}
@@ -212,7 +212,7 @@ Sets the value of the key to C<*value>.
*/
- void set_pmc(PMC* value) {
+ void set_pmc(PMC *value) {
key_set_pmc(INTERP, SELF, value);
}
@@ -226,7 +226,7 @@ Appends C<*value> to the key.
*/
- void push_pmc(PMC * value /*NN*/) {
+ void push_pmc(PMC *value /*NN*/) {
if (value->vtable->base_type != enum_class_Key)
real_exception(interp, NULL, INVALID_OPERATION,
"Can only push another Key onto a Key PMC.");
@@ -246,7 +246,7 @@ chain.
*/
- PMC* shift_pmc() {
+ PMC *shift_pmc() {
return key_next(INTERP, SELF);
}
@@ -266,7 +266,7 @@ Returns the key itself.
*/
- PMC* get_pmc_keyed(PMC* key) {
+ PMC *get_pmc_keyed(PMC *key) {
return key;
}
@@ -281,7 +281,7 @@ PMC_int_val(-1) means end of iteration.
*/
- PMC* nextkey_keyed(PMC* agg, INTVAL what) {
+ PMC *nextkey_keyed(PMC *agg, INTVAL what) {
const INTVAL n = VTABLE_elements(INTERP, agg);
PMC *ret = SELF;
STRING *_hash;
View
2 src/pmc/lexinfo.pmc
@@ -69,7 +69,7 @@ subroutine.
"don't create me like this");
}
- void init_pmc(PMC* sub) {
+ void init_pmc(PMC *sub) {
PARROT_ASSERT(PObj_constant_TEST(SELF));
PMC_pmc_val(SELF) = sub;
parrot_new_pmc_hash_x(INTERP, SELF,
View
10 src/pmc/lexpad.pmc
@@ -81,7 +81,7 @@ Return the LexInfo PMC, if any or a Null PMC.
PMC_pmc_val(SELF) = lexinfo;
}
- void set_pointer(void* ctx) {
+ void set_pointer(void *ctx) {
PMC_struct_val(SELF) = ctx;
}
@@ -90,7 +90,7 @@ Return the LexInfo PMC, if any or a Null PMC.
return parrot_hash_size(INTERP, (Hash *)PMC_struct_val(info));
}
- INTVAL exists_keyed_str(STRING* name) {
+ INTVAL exists_keyed_str(STRING *name) {
PMC * const info = PMC_pmc_val(SELF);
return parrot_hash_get_bucket(INTERP,
(Hash*) PMC_struct_val(info), name) != 0;
@@ -101,7 +101,7 @@ Return the LexInfo PMC, if any or a Null PMC.
return SELF.exists_keyed_str(s);
}
- PMC* get_pmc_keyed_str(STRING* name) {
+ PMC *get_pmc_keyed_str(STRING *name) {
PMC * const info = PMC_pmc_val(SELF);
Hash * const hash = (Hash *)PMC_struct_val(info);
parrot_context_t * const ctx = (parrot_context_t *)PMC_struct_val(SELF);
@@ -116,7 +116,7 @@ Return the LexInfo PMC, if any or a Null PMC.
return CTX_REG_PMC(ctx, regno);
}
- PMC* get_pmc_keyed(PMC *name) {
+ PMC *get_pmc_keyed(PMC *name) {
STRING * const s = key_string(INTERP, name);
return SELF.get_pmc_keyed_str(s);
}
@@ -141,7 +141,7 @@ Return the LexInfo PMC, if any or a Null PMC.
SELF.set_pmc_keyed_str(s, value);
}
- METHOD PMC* get_lexinfo() {
+ METHOD PMC *get_lexinfo() {
return PMC_pmc_val(SELF);
}
View
2 src/pmc/managedstruct.pmc
@@ -50,7 +50,7 @@ Initializes the struct with C<*value>.
*/
- void init_pmc(PMC* value) {
+ void init_pmc(PMC *value) {
SELF.init();
SUPER(value);
}
View
18 src/pmc/multiarray.pmc
@@ -49,7 +49,7 @@ static INTVAL calc_offset(PARROT_INTERP, List*list, PMC *key)
{
INTVAL l;
INTVAL ninj;
- PMC * dim = VTABLE_get_pmc_keyed_int(interp, list->user_data, 1);
+ PMC *dim = VTABLE_get_pmc_keyed_int(interp, list->user_data, 1);
l = key_integer(interp, key);
ninj = 1;
@@ -89,7 +89,7 @@ Returns the integer value for C<*key>.
*/
- INTVAL get_integer_keyed(PMC* key) {
+ INTVAL get_integer_keyed(PMC *key) {
INTVAL ix = calc_offset(INTERP, (List*) PMC_data(SELF), key);
return DYNSELF.get_integer_keyed_int(ix);
}
@@ -104,7 +104,7 @@ Returns the floating-point number value for C<*key>.
*/
- FLOATVAL get_number_keyed(PMC* key) {
+ FLOATVAL get_number_keyed(PMC *key) {
INTVAL ix = calc_offset(INTERP, (List*) PMC_data(SELF), key);
return DYNSELF.get_number_keyed_int(ix);
}
@@ -119,7 +119,7 @@ Returns the Parrot string value for C<*key>.
*/
- STRING* get_string_keyed(PMC* key) {
+ STRING *get_string_keyed(PMC *key) {
INTVAL ix = calc_offset(INTERP, (List*) PMC_data(SELF), key);
return DYNSELF.get_string_keyed_int(ix);
}
@@ -134,7 +134,7 @@ Returns the PMC value for C<*key>.
*/
- PMC* get_pmc_keyed(PMC* key) {
+ PMC *get_pmc_keyed(PMC *key) {
INTVAL ix = calc_offset(INTERP, (List*) PMC_data(SELF), key);
return DYNSELF.get_pmc_keyed_int(ix);
}
@@ -149,7 +149,7 @@ Sets the integer value C<value> at C<*key>.
*/
- void set_integer_keyed(PMC* key, INTVAL value) {
+ void set_integer_keyed(PMC *key, INTVAL value) {
INTVAL ix = calc_offset(INTERP, (List*) PMC_data(SELF), key);
DYNSELF.set_integer_keyed_int(ix, value);
}
@@ -164,7 +164,7 @@ Sets the floating-point number value C<value> at C<*key>.
*/
- void set_number_keyed(PMC* key, FLOATVAL value) {
+ void set_number_keyed(PMC *key, FLOATVAL value) {
INTVAL ix = calc_offset(INTERP, (List*) PMC_data(SELF), key);
DYNSELF.set_number_keyed_int(ix, value);
}
@@ -179,7 +179,7 @@ Sets the Parrot string value C<value> at C<*key>.
*/
- void set_string_keyed(PMC* key, STRING* value) {
+ void set_string_keyed(PMC *key, STRING *value) {
INTVAL ix = calc_offset(INTERP, (List*) PMC_data(SELF), key);
DYNSELF.set_string_keyed_int(ix, value);
}
@@ -194,7 +194,7 @@ Unimplemented.
*/
- void set_pmc_keyed(PMC* dest_key, PMC* src) {
+ void set_pmc_keyed(PMC *dest_key, PMC *src) {
/* XXX array ??? */
}
}
View
8 src/pmc/multisub.pmc
@@ -24,7 +24,7 @@ Sub PMCs with the same short name, but different long names.
pmclass MultiSub extends ResizablePMCArray need_ext does array {
- void push_pmc(PMC* value) {
+ void push_pmc(PMC *value) {
STRING * const _sub = CONST_STRING(interp, "Sub");
STRING * const _nci = CONST_STRING(interp, "NCI");
if (!VTABLE_isa(interp, value, _sub) &&
@@ -34,7 +34,7 @@ pmclass MultiSub extends ResizablePMCArray need_ext does array {
SUPER(value);
}
- void set_pmc_keyed_int(INTVAL key, PMC* value) {
+ void set_pmc_keyed_int(INTVAL key, PMC *value) {
STRING *_sub = CONST_STRING(interp, "Sub");
if (!VTABLE_isa(interp, value, _sub))
real_exception(interp, NULL, E_TypeError,
@@ -47,7 +47,7 @@ pmclass MultiSub extends ResizablePMCArray need_ext does array {
"attempt to set non Sub PMC");
}
- void set_string_keyed_int(INTVAL key, STRING* value) {
+ void set_string_keyed_int(INTVAL key, STRING *value) {
real_exception(interp, NULL, E_TypeError,
"attempt to set non Sub PMC");
}
@@ -57,7 +57,7 @@ pmclass MultiSub extends ResizablePMCArray need_ext does array {
"attempt to set non Sub PMC");
}
- opcode_t* invoke(void *next) {
+ opcode_t *invoke(void *next) {
PMC * const list = Parrot_mmd_sort_candidate_list(interp, SELF);
PMC * const func =
PMC_IS_NULL(list)
View
66 src/pmc/namespace.pmc
@@ -123,15 +123,15 @@ Frees the namespace info struct.
/*
-=item C<PMC* get_class()>
+=item C<PMC *get_class()>
Returns the class or role PMC that is associated with this namespace.
=cut
*/
- PMC* get_class()
+ PMC *get_class()
{
Parrot_NSInfo *nsinfo = PARROT_NSINFO(SELF);
PMC *ret_class = nsinfo->_class;
@@ -152,12 +152,12 @@ C<value> is stored too.
If C<key> is a simple key, it works like above. If C<key> is an array
of strings or a chained key, add all components to the namespace.
-=item C<PMC* get_pmc_keyed(PMC *key)>
+=item C<PMC *get_pmc_keyed(PMC *key)>
Return the given namespace or PMCNULL. C<key> is either an array of
strings, or a possibly nested key.
-=item C<PMC* get_pmc_keyed_str(STRING *key)>
+=item C<PMC *get_pmc_keyed_str(STRING *key)>
Return the given namespace item or PMCNULL. If the named item is either
a NameSpace or a var, the NameSpace is returned.
@@ -298,7 +298,7 @@ really a public API.
real_exception(INTERP, NULL, E_NameError, "Invalid namespace key in set_pmc_keyed");
}
- PMC* get_pmc_keyed_str(STRING *key) {
+ PMC *get_pmc_keyed_str(STRING *key) {
PMC *ns = (PMC *)parrot_hash_get(INTERP, (Hash *)PMC_struct_val(SELF),
key);
if (!ns)
@@ -311,7 +311,7 @@ really a public API.
return ns;
}
- PMC* get_pmc_keyed(PMC *key) {
+ PMC *get_pmc_keyed(PMC *key) {
PMC *ns = SELF;
STRING *part;
@@ -335,7 +335,7 @@ really a public API.
real_exception(INTERP, NULL, E_NameError, "Invalid namespace key in get_pmc_keyed_str");
}
- PMC* get_pmc_keyed_int(INTVAL key) {
+ PMC *get_pmc_keyed_int(INTVAL key) {
Parrot_NSInfo *nsinfo = PARROT_NSINFO(SELF);
PMC *vtable = nsinfo->vtable;
@@ -347,9 +347,9 @@ really a public API.
/*
-=item C<void* get_pointer_keyed_str(STRING *key)>
+=item C<void *get_pointer_keyed_str(STRING *key)>
-=item C<void* get_pointer_keyed(PMC *key)>
+=item C<void *get_pointer_keyed(PMC *key)>
Return the given namespace item or PMCNULL. If the named item is either
a NameSpace or a var, the var is returned.
@@ -360,7 +360,7 @@ TOTAL KLUDGE. ON THE CHOPPING BLOCK.
*/
- void* get_pointer_keyed_str(STRING *key) {
+ void *get_pointer_keyed_str(STRING *key) {
PMC *ns = (PMC *)parrot_hash_get(INTERP, (Hash *)PMC_struct_val(SELF),
key);
if (PMC_IS_NULL(ns))
@@ -373,7 +373,7 @@ TOTAL KLUDGE. ON THE CHOPPING BLOCK.
return ns;
}
- void* get_pointer_keyed(PMC *key) {
+ void *get_pointer_keyed(PMC *key) {
PMC *ns = SELF;
STRING *part;
@@ -402,15 +402,15 @@ TOTAL KLUDGE. ON THE CHOPPING BLOCK.
/*
-=item C<STRING* get_string()>
+=item C<STRING *get_string()>
Return the name of this namespace part.
=cut
*/
- STRING* get_string() {
+ STRING *get_string() {
Parrot_NSInfo *nsinfo = PARROT_NSINFO(SELF);
return nsinfo->name;
}
@@ -429,7 +429,7 @@ Return the name of this namespace part.
/*
-=item C<METHOD void PMC* add_namespace(STRING *name, PMC *namespace)>
+=item C<METHOD void PMC *add_namespace(STRING *name, PMC *namespace)>
Stores the given namespace under this namespace, with the given name. Throws
an invalid type exception if C<namespace> is not a NameSpace PMC or subclass.
@@ -453,7 +453,7 @@ an invalid type exception if C<namespace> is not a NameSpace PMC or subclass.
/*
-=item C<METHOD void PMC* add_sub(STRING *name, PMC *sub)>
+=item C<METHOD void PMC *add_sub(STRING *name, PMC *sub)>
Stores the given sub under this namespace, with the given name. Throws an
invalid type exception if C<sub> is not a Sub PMC or subclass.
@@ -476,7 +476,7 @@ invalid type exception if C<sub> is not a Sub PMC or subclass.
/*
-=item C<METHOD void PMC* add_var(STRING *name, PMC *var)>
+=item C<METHOD void PMC *add_var(STRING *name, PMC *var)>
Stores the given sub under this namespace, with the given name.
@@ -491,7 +491,7 @@ Stores the given sub under this namespace, with the given name.
/*
-=item C<METHOD PMC* get_name()>
+=item C<METHOD PMC *get_name()>
Returns the name of the namespace as an array of strings.
@@ -502,7 +502,7 @@ Returns the name of the namespace as an array of strings.
*/
- METHOD PMC* get_name() {
+ METHOD PMC *get_name() {
PMC *ar, *ns;
ar = pmc_new(INTERP, enum_class_ResizableStringArray);
@@ -520,15 +520,15 @@ Returns the name of the namespace as an array of strings.
}
/*
-=item C<METHOD PMC* find_namespace(STRING* name)>
+=item C<METHOD PMC *find_namespace(STRING *name)>
Return the namespace with the given name.
=cut
*/
- METHOD PMC* find_namespace(STRING* key) {
+ METHOD PMC *find_namespace(STRING *key) {
STRING *s_ns = CONST_STRING(INTERP, "NameSpace");
PMC *ns = (PMC *)parrot_hash_get(INTERP,
(Hash *)PMC_struct_val(SELF), key);
@@ -545,15 +545,15 @@ Return the namespace with the given name.
/*
-=item C<METHOD PMC* find_sub(STRING *name)>
+=item C<METHOD PMC *find_sub(STRING *name)>
Return the Sub PMC with the given name.
=cut
*/
- METHOD PMC* find_sub(STRING *key) {
+ METHOD PMC *find_sub(STRING *key) {
STRING *s_sub = CONST_STRING(INTERP, "Sub");
PMC *sub = (PMC *)parrot_hash_get(INTERP,
(Hash *)PMC_struct_val(SELF), key);
@@ -570,15 +570,15 @@ Return the Sub PMC with the given name.
/*
-=item C<METHOD PMC* find_var(STRING *name)>
+=item C<METHOD PMC *find_var(STRING *name)>
Return the PMC with the given name.
=cut
*/
- METHOD PMC* find_var(STRING *key) {
+ METHOD PMC *find_var(STRING *key) {
PMC *val = (PMC *)parrot_hash_get(INTERP,
(Hash *)PMC_struct_val(SELF), key);
@@ -590,7 +590,7 @@ Return the PMC with the given name.
/*
-=item C<METHOD PMC* del_namespace(STRING *name)>
+=item C<METHOD PMC *del_namespace(STRING *name)>
Deletes the contained NameSpace PMC with the given name. Throws an invalid
type exception if the item to delete is not a NameSpace PMC or subclass, and
@@ -624,7 +624,7 @@ does not delete the PMC.
/*
-=item C<METHOD PMC* del_sub(STRING *name)>
+=item C<METHOD PMC *del_sub(STRING *name)>
Deletes the contained Sub PMC with the given name. Throws an invalid type
exception if the item to delete is not a Sub PMC or subclass, and does not
@@ -656,21 +656,21 @@ delete the PMC.
/*
-=item C<METHOD PMC* del_var(STRING* name)>
+=item C<METHOD PMC *del_var(STRING *name)>
Deletes the contained variable-like PMC with the given name.
=cut
*/
- METHOD void del_var(STRING* name) {
+ METHOD void del_var(STRING *name) {
parrot_hash_delete(INTERP, (Hash*) PMC_struct_val(SELF), name);
}
/*
-=item C<METHOD PMC* get_sym(STRING* name)>
+=item C<METHOD PMC *get_sym(STRING *name)>
Return the symbol (var or sub) with the given name. This can be used
to retrieve symbols, if a NameSpace with the same name exists.
@@ -679,7 +679,7 @@ to retrieve symbols, if a NameSpace with the same name exists.
*/
- METHOD PMC* get_sym(STRING *key) {
+ METHOD PMC *get_sym(STRING *key) {
PMC *ns = (PMC *)parrot_hash_get(INTERP,
(Hash *)PMC_struct_val(SELF), key);
@@ -717,7 +717,7 @@ NOTE: exporting 'default' set of items is not yet implemented.
*/
- METHOD void export_to(PMC* dest, PMC* what) {
+ METHOD void export_to(PMC *dest, PMC *what) {
STRING *s_hash = CONST_STRING(interp, "hash");
STRING *s_array = CONST_STRING(interp, "array");
@@ -806,15 +806,15 @@ NOTE: exporting 'default' set of items is not yet implemented.
/*
-=item C<METHOD PMC* get_parent()>
+=item C<METHOD PMC *get_parent()>
Return the parent NameSpace or PMCNULL, if none.
=cut
*/
- METHOD PMC* get_parent() {
+ METHOD PMC *get_parent() {
return PMC_pmc_val(SELF) ? PMC_pmc_val(SELF) : PMCNULL;
}
View
12 src/pmc/nci.pmc
@@ -27,21 +27,21 @@ pmclass NCI need_ext {
/*
-=item C<METHOD PMC* get_multisig()>
+=item C<METHOD PMC *get_multisig()>
Return the MMD signature PMC, if any or a Null PMC.
=cut
*/
- METHOD PMC* get_multisig() {
+ METHOD PMC *get_multisig() {
return PMC_pmc_val(SELF) ? PMC_pmc_val(SELF) : PMCNULL;