Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[pmc] PDD07-ize function signatures in src/pmc/[b-f]*.pmc

git-svn-id: https://svn.parrot.org/parrot/trunk@20578 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
commit 95e36766c259fc923901aabe2b9cab29b483a4d3 1 parent 438fe38
@Infinoid Infinoid authored
View
2  src/pmc/bigint.pmc
@@ -503,7 +503,7 @@ Return GMP version string "x.y.z".
*/
- METHOD STRING* version() {
+ METHOD STRING *version() {
#ifdef PARROT_HAS_GMP
return string_from_cstring(INTERP, gmp_version, 0);
#else
View
50 src/pmc/capture.pmc
@@ -109,9 +109,9 @@ Sets a value in the array component of the Capture.
=item C<INTVAL get_integer_keyed_int(INTVAL key)>
-=item C<PMC* get_pmc_keyed_int(INTVAL key)>
+=item C<PMC *get_pmc_keyed_int(INTVAL key)>
-=item C<STRING* get_string_keyed_int(INTVAL key)>
+=item C<STRING *get_string_keyed_int(INTVAL key)>
Retrieves a value in the array component of the Capture.
@@ -129,12 +129,12 @@ Retrieves a value in the array component of the Capture.
return VTABLE_get_integer_keyed_int(INTERP, CAPTURE_array(SELF), key);
}
- PMC* get_pmc_keyed_int(INTVAL key) {
+ PMC *get_pmc_keyed_int(INTVAL key) {
CAPTURE_array_CREATE(INTERP, SELF);
return VTABLE_get_pmc_keyed_int(INTERP, CAPTURE_array(SELF), key);
}
- STRING* get_string_keyed_int(INTVAL key) {
+ STRING *get_string_keyed_int(INTVAL key) {
CAPTURE_array_CREATE(INTERP, SELF);
return VTABLE_get_string_keyed_int(INTERP, CAPTURE_array(SELF), key);
}
@@ -211,9 +211,9 @@ Unshift a value onto the array component of the Capture.
=item C<INTVAL pop_integer()>
-=item C<PMC* pop_pmc()>
+=item C<PMC *pop_pmc()>
-=item C<STRING* pop_string()>
+=item C<STRING *pop_string()>
Pop a value from the array component of the Capture.
@@ -221,9 +221,9 @@ Pop a value from the array component of the Capture.
=item C<INTVAL shift_integer()>
-=item C<PMC* shift_pmc()>
+=item C<PMC *shift_pmc()>
-=item C<STRING* shift_string()>
+=item C<STRING *shift_string()>
Shift a value from the array component of the Capture.
@@ -241,12 +241,12 @@ Shift a value from the array component of the Capture.
return VTABLE_pop_integer(INTERP, CAPTURE_array(SELF));
}
- PMC* pop_pmc() {
+ PMC *pop_pmc() {
CAPTURE_array_CREATE(INTERP, SELF);
return VTABLE_pop_pmc(INTERP, CAPTURE_array(SELF));
}
- STRING* pop_string() {
+ STRING *pop_string() {
CAPTURE_array_CREATE(INTERP, SELF);
return VTABLE_pop_string(INTERP, CAPTURE_array(SELF));
}
@@ -261,12 +261,12 @@ Shift a value from the array component of the Capture.
return VTABLE_shift_integer(INTERP, CAPTURE_array(SELF));
}
- PMC* shift_pmc() {
+ PMC *shift_pmc() {
CAPTURE_array_CREATE(INTERP, SELF);
return VTABLE_shift_pmc(INTERP, CAPTURE_array(SELF));
}
- STRING* shift_string() {
+ STRING *shift_string() {
CAPTURE_array_CREATE(INTERP, SELF);
return VTABLE_shift_string(INTERP, CAPTURE_array(SELF));
}
@@ -318,11 +318,11 @@ Delete the element corresponding to C<key> in the array component.
=item C<void set_number_keyed(PMC *key, FLOATVAL value)>
-=item C<void set_integer_keyed(PMC* key, INTVAL value)>
+=item C<void set_integer_keyed(PMC *key, INTVAL value)>
-=item C<void set_pmc_keyed(PMC* key, PMC *value)>
+=item C<void set_pmc_keyed(PMC *key, PMC *value)>
-=item C<void set_string_keyed(PMC* key, STRING *value)>
+=item C<void set_string_keyed(PMC *key, STRING *value)>
Sets a value in the hash component of the Capture.
@@ -356,9 +356,9 @@ Sets a value in the hash component of the Capture.
=item C<INTVAL get_integer_keyed(PMC *key)>
-=item C<PMC* get_pmc_keyed(PMC *key)>
+=item C<PMC *get_pmc_keyed(PMC *key)>
-=item C<STRING* get_string_keyed(PMC *key)>
+=item C<STRING *get_string_keyed(PMC *key)>
Retrieves a value from the hash component of the Capture.
@@ -366,22 +366,22 @@ Retrieves a value from the hash component of the Capture.
*/
- FLOATVAL get_number_keyed(PMC* key) {
+ FLOATVAL get_number_keyed(PMC *key) {
CAPTURE_hash_CREATE(INTERP, SELF);
return VTABLE_get_number_keyed(INTERP, CAPTURE_hash(SELF), key);
}
- INTVAL get_integer_keyed(PMC* key) {
+ INTVAL get_integer_keyed(PMC *key) {
CAPTURE_hash_CREATE(INTERP, SELF);
return VTABLE_get_integer_keyed(INTERP, CAPTURE_hash(SELF), key);
}
- PMC* get_pmc_keyed(PMC* key) {
+ PMC *get_pmc_keyed(PMC *key) {
CAPTURE_hash_CREATE(INTERP, SELF);
return VTABLE_get_pmc_keyed(INTERP, CAPTURE_hash(SELF), key);
}
- STRING* get_string_keyed(PMC* key) {
+ STRING *get_string_keyed(PMC *key) {
CAPTURE_hash_CREATE(INTERP, SELF);
return VTABLE_get_string_keyed(INTERP, CAPTURE_hash(SELF), key);
}
@@ -429,8 +429,8 @@ Delete the element corresponding to C<key> in the hash component.
*/
- METHOD PMC* get_array() {
- PMC* capt = SELF;
+ METHOD PMC *get_array() {
+ PMC *capt = SELF;
/* XXX: This workaround is for when we get here as
part of a subclass of Capture */
if (PObj_is_object_TEST(SELF))
@@ -439,8 +439,8 @@ Delete the element corresponding to C<key> in the hash component.
return CAPTURE_array(capt);
}
- METHOD PMC* get_hash() {
- PMC* capt = SELF;
+ METHOD PMC *get_hash() {
+ PMC *capt = SELF;
/* XXX: This workaround is for when we get here as
part of a subclass of Capture */
if (PObj_is_object_TEST(SELF))
View
42 src/pmc/class.pmc
@@ -451,7 +451,7 @@ arguments. The class is attatched to the current namespace.
PObj_is_class_SET(SELF);
}
- void init_pmc(PMC* init_data) {
+ void init_pmc(PMC *init_data) {
PMC *arg;
const INTVAL arg_type = VTABLE_type(interp, init_data);
STRING * const name_str = CONST_STRING(interp, "name");
@@ -499,7 +499,7 @@ arguments. The class is attatched to the current namespace.
/*
-=item C<PMC* subclass(PMC* name)>
+=item C<PMC *subclass(PMC *name)>
Creates a subclass, optionally with a given C<name>.
@@ -507,7 +507,7 @@ Creates a subclass, optionally with a given C<name>.
*/
- PMC* subclass(PMC *name) {
+ PMC *subclass(PMC *name) {
PMC *child_class;
/* Create a new class. Set the classname, if we have one. */
@@ -545,7 +545,7 @@ Free the memory associated with the object's underlying struct.
/*
-=item C<STRING* get_string()>
+=item C<STRING *get_string()>
Return the fully qualified name of the class.
@@ -553,7 +553,7 @@ Return the fully qualified name of the class.
*/
- STRING* get_string() {
+ STRING *get_string() {
Parrot_Class * const _class = PARROT_CLASS(SELF);
PMC *namespace = _class->_namespace;
PMC *names;
@@ -762,7 +762,7 @@ no conflicts.
/*
-=item C<PMC* inspect_str(STRING *what)>
+=item C<PMC *inspect_str(STRING *what)>
Provides introspection of a specific piece of information about the class. The
available information is:
@@ -800,7 +800,7 @@ Array of Class PMCs representing the direct parents of this class.
=cut
*/
- PMC* inspect_str(STRING *what) {
+ PMC *inspect_str(STRING *what) {
Parrot_Class *_class = PARROT_CLASS(SELF);
/* What should we return? */
@@ -837,7 +837,7 @@ Array of Class PMCs representing the direct parents of this class.
/*
-=item C<PMC* inspect()>
+=item C<PMC *inspect()>
Returns a Hash describing the class, with key/value pairs as described in
inspect_str.
@@ -845,7 +845,7 @@ inspect_str.
=cut
*/
- PMC* inspect() {
+ PMC *inspect() {
/* Create a hash, then use inspect_str to get all of the data to
* fill it up with. */
PMC *metadata = pmc_new(interp, enum_class_Hash);
@@ -879,7 +879,7 @@ inspect_str.
/*
-=item C<PMC* clone()>
+=item C<PMC *clone()>
Returns an anonymous copy of the class (with no name and no link to a
namespace). Unsets the instantiated flag, allowing modifications.
@@ -888,7 +888,7 @@ namespace). Unsets the instantiated flag, allowing modifications.
*/
- PMC* clone() {
+ PMC *clone() {
Parrot_Class *_class = PARROT_CLASS(SELF);
/* Create the new class PMC, of the same type of this one (we may
@@ -917,7 +917,7 @@ namespace). Unsets the instantiated flag, allowing modifications.
/*
-=item C<PMC* clone_pmc(PMC *args)>
+=item C<PMC *clone_pmc(PMC *args)>
Makes a copy of the class, then modifies or adds to it based upon the contents
of the supplied initialization data. If a new name or namespace is not supplied
@@ -928,7 +928,7 @@ unset to allow further modifications.
*/
- PMC* clone_pmc(PMC *args) {
+ PMC *clone_pmc(PMC *args) {
/* Do the standard clone. */
PMC *copy = DYNSELF.clone();
@@ -939,7 +939,7 @@ unset to allow further modifications.
/*
-=item C<PMC* instantiate(PMC* init)>
+=item C<PMC *instantiate(PMC *init)>
Creates a new PMC object of the type of the class and calls init().
@@ -947,7 +947,7 @@ Creates a new PMC object of the type of the class and calls init().
*/
- PMC* instantiate(PMC* init) {
+ PMC *instantiate(PMC *init) {
Parrot_Object *obj_guts = NULL;
Parrot_Class *_class = PARROT_CLASS(SELF);
STRING * const class_str = string_from_cstring(interp, "Class", 5);
@@ -1274,7 +1274,7 @@ Add an attribute to the class. Requires a name and, optionally, a type.
*/
PCCMETHOD add_attribute(STRING *attribute_name,
- PMC* attribute_type :optional, int got_type :opt_flag) {
+ PMC *attribute_type :optional, int got_type :opt_flag) {
PMC *type = got_type ? attribute_type : PMCNULL;
DYNSELF.add_attribute(attribute_name, type);
}
@@ -1324,7 +1324,7 @@ C<add_method> vtable method.
/*
-=item C<PMC* find_method(STRING *name)>
+=item C<PMC *find_method(STRING *name)>
Walks the MRO of the class and finds the method with the given name.
@@ -1406,18 +1406,18 @@ Return the roles array PMC.
/*
-=item C<void add_role(PMC* role, PMC* exclude :optional :named["exclude"],
-PMC* alias :optional :named["alias"])>
+=item C<void add_role(PMC *role, PMC *exclude :optional :named["exclude"],
+PMC *alias :optional :named["alias"])>
Compose a role into a class with the given exclusions and aliases.
=cut
*/
- PCCMETHOD add_role(PMC* role,
+ PCCMETHOD add_role(PMC *role,
PMC* exclude_method :optional :named["exclude_method"],
int got_exclude_method :opt_flag,
- PMC* alias_method :optional :named["alias_method"],
+ PMC *alias_method :optional :named["alias_method"],
int got_alias_method :opt_flag) {
Parrot_Class *_class = PARROT_CLASS(SELF);
View
6 src/pmc/closure.pmc
@@ -70,7 +70,7 @@ Marks the closure as live.
Sets the address to the closure entry.
-=item C<void* invoke(void* next)>
+=item C<opcode_t *invoke(void *next)>
Invokes the closure.
@@ -78,13 +78,13 @@ Invokes the closure.
*/
- void set_pointer(void* value) {
+ void set_pointer(void *value) {
struct Parrot_sub * sub = PMC_sub(SELF);
opcode_t *addr = (opcode_t *)value;
sub->start_offs = addr - sub->seg->base.data;
}
- opcode_t* invoke(void *in_next) {
+ opcode_t *invoke(void *in_next) {
struct Parrot_sub *sub = PMC_sub(SELF);
PMC *cont, *outer_sub;
opcode_t *next = SUPER(in_next);
View
18 src/pmc/codestring.pmc
@@ -60,7 +60,7 @@ A newline is automatically added to the end of the fmt.
=cut
*/
- PCCMETHOD emit(STRING* fmt, PMC* args :slurpy, PMC* hash :slurpy :named) {
+ PCCMETHOD emit(STRING *fmt, PMC *args :slurpy, PMC *hash :slurpy :named) {
INTVAL pos = 0;
INTVAL replen = 0;
STRING *key, *repl;
@@ -121,7 +121,7 @@ A newline is automatically added to the end of the fmt.
VTABLE_set_string_native(INTERP, SELF, S1);
}
- PCCRETURN(PMC* SELF);
+ PCCRETURN(PMC *SELF);
}
@@ -140,20 +140,20 @@ counting at 10 (so that the values 0..9 can be considered "safe").
*/
- PCCMETHOD unique(STRING* format :optional, int has_fmt :opt_flag) {
+ PCCMETHOD unique(STRING *format :optional, int has_fmt :opt_flag) {
static INTVAL counter = 10;
- STRING* counter_as_string = string_from_int(INTERP, counter);
+ STRING *counter_as_string = string_from_int(INTERP, counter);
counter++;
if (!has_fmt) {
- PCCRETURN(STRING* counter_as_string);
+ PCCRETURN(STRING *counter_as_string);
}
else {
- STRING* result;
+ STRING *result;
result = Parrot_make_COW_reference(INTERP, format);
result = string_concat(INTERP, result, counter_as_string, 1);
- PCCRETURN(STRING* result);
+ PCCRETURN(STRING *result);
}
}
@@ -169,7 +169,7 @@ prefixed with 'unicode:'.
*/
- PCCMETHOD escape(STRING* str) {
+ PCCMETHOD escape(STRING *str) {
STRING *escaped_str = string_escape_string(INTERP, str);
STRING *quote = string_from_literal (INTERP, "\"");
STRING *x = string_from_literal (INTERP, "\\x");
@@ -197,7 +197,7 @@ prefixed with 'unicode:'.
escaped_str = string_concat(INTERP, unicode, escaped_str, 1);
}
- PCCRETURN(STRING* escaped_str);
+ PCCRETURN(STRING *escaped_str);
}
/*
View
2  src/pmc/compiler.pmc
@@ -34,7 +34,7 @@ C<Eval> PMC with a new PackFile attached.
*/
- opcode_t* invoke(void * code_ptr) {
+ opcode_t *invoke(void *code_ptr) {
return SUPER(code_ptr);
}
}
View
278 src/pmc/complex.pmc
@@ -32,7 +32,7 @@ but those starting with => are the ones used
/*
=item C<static void
-complex_parse_string(Interp* interp,
+complex_parse_string(Interp *interp,
FLOATVAL *re, FLOATVAL *im, STRING *value)>
Parses the string in C<value> to produce a complex number, represented
@@ -46,7 +46,7 @@ use C<j> instead of C<i>.
*/
static void
-complex_parse_string(Interp* interp,
+complex_parse_string(Interp *interp,
FLOATVAL *re, FLOATVAL *im, STRING *value) {
char *str;
INTVAL first_num_length, second_num_length;
@@ -169,7 +169,7 @@ complex_parse_string(Interp* interp,
/*
=item C<static FLOATVAL*
-complex_locate_keyed_num(Interp* interp, PMC* self, STRING *key)>
+complex_locate_keyed_num(Interp *interp, PMC *self, STRING *key)>
Interpret the string C<key>; valid keys are C<real> and C<imag>,
representing the real and imaginary parts of the complex number.
@@ -179,7 +179,7 @@ representing the real and imaginary parts of the complex number.
*/
static FLOATVAL*
-complex_locate_keyed_num(Interp* interp, PMC* self, STRING *key) {
+complex_locate_keyed_num(Interp *interp, PMC *self, STRING *key) {
/* do imag first since real can be read much faster anyway */
STRING *imag = string_from_cstring(interp, "imag", 4);
STRING *real;
@@ -226,7 +226,7 @@ pmclass Complex {
/*
-=item C<PMC* instantiate(PMC* sig)>
+=item C<PMC *instantiate(PMC *sig)>
Create a new complex PMC with passed arguments according to pdd03.
@@ -234,7 +234,7 @@ Create a new complex PMC with passed arguments according to pdd03.
*/
- PMC* instantiate(PMC* sig) {
+ PMC *instantiate(PMC *sig) {
return PMCNULL;
/* TODO -- really build this thing */
@@ -280,7 +280,7 @@ Create a new complex PMC with passed arguments according to pdd03.
/*
-=item C<opcode_t* invoke(void* next)>
+=item C<opcode_t *invoke(void *next)>
Pythonic object constructor. SELF is a Complex Class object. Return a new
C<complex> object according to 2.1. Built-in Functions.
@@ -288,7 +288,7 @@ C<complex> object according to 2.1. Built-in Functions.
=cut
*/
- opcode_t* invoke(void *next) {
+ opcode_t *invoke(void *next) {
const int argcP = REG_INT(interp, 3);
PMC * const res = pmc_new(INTERP, enum_class_Complex);
@@ -321,7 +321,7 @@ C<complex> object according to 2.1. Built-in Functions.
Initializes the complex number with the value 0+0i.
-=item C<void init_pmc(PMC* initializer)>
+=item C<void init_pmc(PMC *initializer)>
Initializes the complex number with the specified values.
(not implemented)
@@ -330,7 +330,7 @@ Initializes the complex number with the specified values.
Cleans up.
-=item C<PMC* clone()>
+=item C<PMC *clone()>
Creates an identical copy of the complex number.
@@ -340,13 +340,13 @@ Creates an identical copy of the complex number.
void init() {
/* XXX should check if mem_sys_allocate failed */
- FLOATVAL* data = (FLOATVAL*)mem_sys_allocate(2 * sizeof (FLOATVAL));
+ FLOATVAL *data = (FLOATVAL*)mem_sys_allocate(2 * sizeof (FLOATVAL));
PMC_struct_val(SELF) = data;
PObj_active_destroy_SET(SELF);
RE(SELF) = IM(SELF) = 0.0;
}
- void init_pmc(PMC* initializer) {
+ void init_pmc(PMC *initializer) {
/* XXX not implemented */
DYNSELF.init();
}
@@ -362,9 +362,9 @@ Creates an identical copy of the complex number.
SUPER(type);
}
- PMC* clone() {
- PMC* dest = pmc_new_noinit(INTERP, SELF->vtable->base_type);
- FLOATVAL* data = (FLOATVAL*)mem_sys_allocate(2 * sizeof (FLOATVAL));
+ PMC *clone() {
+ PMC *dest = pmc_new_noinit(INTERP, SELF->vtable->base_type);
+ FLOATVAL *data = (FLOATVAL*)mem_sys_allocate(2 * sizeof (FLOATVAL));
PMC_struct_val(dest) = data;
PObj_active_destroy_SET(dest);
RE(dest) = RE(SELF);
@@ -382,7 +382,7 @@ Returns the modulus of the complex number as an integer.
Returns the modulus of the complex number.
-=item C<STRING* get_string()>
+=item C<STRING *get_string()>
Returns the complex number as a string in the form C<a+bi>.
@@ -402,7 +402,7 @@ Returns true if the complex number is non-zero.
return sqrt(RE(SELF)*RE(SELF) + IM(SELF)*IM(SELF));
}
- STRING* get_string() {
+ STRING *get_string() {
STRING *s;
s = Parrot_sprintf_c(INTERP,
"%vg%+vgi", RE(SELF), IM(SELF));
@@ -415,17 +415,17 @@ Returns true if the complex number is non-zero.
/*
-=item C<INTVAL get_integer_keyed(PMC* key)>
+=item C<INTVAL get_integer_keyed(PMC *key)>
-=item C<INTVAL get_integer_keyed_str(STRING* key)>
+=item C<INTVAL get_integer_keyed_str(STRING *key)>
-=item C<FLOATVAL get_number_keyed(PMC* key)>
+=item C<FLOATVAL get_number_keyed(PMC *key)>
-=item C<FLOATVAL get_number_keyed_str(STRING* key)>
+=item C<FLOATVAL get_number_keyed_str(STRING *key)>
-=item C<PMC* get_pmc_keyed(PMC* key)>
+=item C<PMC *get_pmc_keyed(PMC *key)>
-=item C<PMC* get_pmc_keyed_str(STRING* key)>
+=item C<PMC *get_pmc_keyed_str(STRING *key)>
Returns the requested number (real part for C<real> and imaginary for C<imag>).
@@ -433,33 +433,33 @@ Returns the requested number (real part for C<real> and imaginary for C<imag>).
*/
- INTVAL get_integer_keyed(PMC* key) {
+ INTVAL get_integer_keyed(PMC *key) {
STRING * const s = VTABLE_get_string(INTERP, key);
return DYNSELF.get_integer_keyed_str(s);
}
- INTVAL get_integer_keyed_str(STRING* key) {
+ INTVAL get_integer_keyed_str(STRING *key) {
return (INTVAL)(DYNSELF.get_number_keyed_str(key));
}
- FLOATVAL get_number_keyed(PMC* key) {
+ FLOATVAL get_number_keyed(PMC *key) {
STRING * const s = VTABLE_get_string(INTERP, key);
return DYNSELF.get_number_keyed_str(s);
}
- FLOATVAL get_number_keyed_str(STRING* key) {
+ FLOATVAL get_number_keyed_str(STRING *key) {
const FLOATVAL * const num = complex_locate_keyed_num(INTERP, SELF, key);
if (num)
return *num;
return 0.0;
}
- PMC* get_pmc_keyed(PMC* key) {
+ PMC *get_pmc_keyed(PMC *key) {
STRING * const s = VTABLE_get_string(INTERP, key);
return DYNSELF.get_pmc_keyed_str(s);
}
- PMC* get_pmc_keyed_str(STRING* key) {
+ PMC *get_pmc_keyed_str(STRING *key) {
PMC * const ret = pmc_new(INTERP, enum_class_Float);
const FLOATVAL val = DYNSELF.get_number_keyed_str(key);
VTABLE_set_number_native(INTERP, ret, val);
@@ -468,7 +468,7 @@ Returns the requested number (real part for C<real> and imaginary for C<imag>).
/*
-=item C<PMC* get_pmc_keyed_int(INTVAL key)>
+=item C<PMC *get_pmc_keyed_int(INTVAL key)>
Returns the requested number (real part for C<0> and imaginary for C<1>).
@@ -476,7 +476,7 @@ Returns the requested number (real part for C<0> and imaginary for C<1>).
*/
- PMC* get_pmc_keyed_int(INTVAL key) {
+ PMC *get_pmc_keyed_int(INTVAL key) {
PMC * const ret = pmc_new(INTERP, enum_class_Float);
const FLOATVAL val = DYNSELF.get_number_keyed_int(key);
VTABLE_set_number_native(INTERP, ret, val);
@@ -527,12 +527,12 @@ Set real or imag depending on key
}
/*
-=item C<void set_string_native(STRING* value)>
+=item C<void set_string_native(STRING *value)>
Parses the string C<value> into a complex number; raises an exception
on failure.
-=item C<void set_pmc(PMC* value)>
+=item C<void set_pmc(PMC *value)>
if C<value> is a Complex PMC then the complex number is set to its
value; otherwise C<value>'s string representation is parsed with
@@ -549,11 +549,11 @@ part to C<0.0>
*/
- void set_string_native(STRING* value) {
+ void set_string_native(STRING *value) {
complex_parse_string(INTERP, &RE(SELF), &IM(SELF), value);
}
- void set_pmc(PMC* value) {
+ void set_pmc(PMC *value) {
if (value->vtable->base_type == enum_class_Complex) {
RE(SELF) = RE(value);
IM(SELF) = IM(value);
@@ -574,17 +574,17 @@ part to C<0.0>
/*
-=item C<void set_integer_keyed(PMC* key, INTVAL value)>
+=item C<void set_integer_keyed(PMC *key, INTVAL value)>
-=item C<void set_integer_keyed_str(STRING* key, INTVAL value)>
+=item C<void set_integer_keyed_str(STRING *key, INTVAL value)>
-=item C<void set_number_keyed(PMC* key, FLOATVAL value)>
+=item C<void set_number_keyed(PMC *key, FLOATVAL value)>
-=item C<void set_number_keyed_str(STRING* key, FLOATVAL value)>
+=item C<void set_number_keyed_str(STRING *key, FLOATVAL value)>
-=item C<void set_pmc_keyed(PMC* key, PMC* value)>
+=item C<void set_pmc_keyed(PMC *key, PMC *value)>
-=item C<void set_pmc_keyed_str(STRING* key, PMC* value)>
+=item C<void set_pmc_keyed_str(STRING *key, PMC *value)>
Sets the requested number (real part for C<real> and imaginary for C<imag>)
to C<value>.
@@ -593,42 +593,42 @@ to C<value>.
*/
- void set_integer_keyed(PMC* key, INTVAL value) {
+ void set_integer_keyed(PMC *key, INTVAL value) {
DYNSELF.set_number_keyed(key, value);
}
- void set_integer_keyed_str(STRING* key, INTVAL value) {
+ void set_integer_keyed_str(STRING *key, INTVAL value) {
DYNSELF.set_number_keyed_str(key, value);
}
- void set_number_keyed(PMC* key, FLOATVAL value) {
- STRING* s = VTABLE_get_string(INTERP, key);
+ void set_number_keyed(PMC *key, FLOATVAL value) {
+ STRING *s = VTABLE_get_string(INTERP, key);
DYNSELF.set_number_keyed_str(s, value);
}
- void set_number_keyed_str(STRING* key, FLOATVAL value) {
+ void set_number_keyed_str(STRING *key, FLOATVAL value) {
FLOATVAL * const num = complex_locate_keyed_num(INTERP, SELF, key);
if (num)
*num = value;
}
- void set_pmc_keyed(PMC* key, PMC* value) {
+ void set_pmc_keyed(PMC *key, PMC *value) {
const FLOATVAL f = VTABLE_get_number(INTERP, value);
DYNSELF.set_number_keyed(key, f);
}
- void set_pmc_keyed_str(STRING* key, PMC* value) {
+ void set_pmc_keyed_str(STRING *key, PMC *value) {
const FLOATVAL f = VTABLE_get_number(INTERP, value);
DYNSELF.set_number_keyed_str(key, f);
}
/*
-=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)>
-=item C<PMC* add_float(FLOATVAL value, PMC* dest)>
+=item C<PMC *add_float(FLOATVAL value, PMC *dest)>
Adds C<value> to the complex number, placing the result in C<dest>.
@@ -636,7 +636,7 @@ Adds C<value> to the complex number, placing the result in C<dest>.
*/
- PMC* add(PMC* value, PMC* dest) {
+ PMC *add(PMC *value, PMC *dest) {
MMD_Complex: {
if (dest)
VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
@@ -659,7 +659,7 @@ MMD_DEFAULT: {
}
}
- PMC* add_int(INTVAL value, PMC* dest) {
+ PMC *add_int(INTVAL value, PMC *dest) {
if (dest)
VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
else {
@@ -670,7 +670,7 @@ MMD_DEFAULT: {
return dest;
}
- PMC* add_float(FLOATVAL value, PMC* dest) {
+ PMC *add_float(FLOATVAL value, PMC *dest) {
if (dest)
VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
else {
@@ -682,7 +682,7 @@ MMD_DEFAULT: {
return dest;
}
- void i_add(PMC* value) {
+ void i_add(PMC *value) {
MMD_Complex: {
RE(SELF) += RE(value);
IM(SELF) += IM(value);
@@ -701,11 +701,11 @@ MMD_DEFAULT: {
/*
-=item C<PMC* subtract(PMC* value, PMC* dest)>
+=item C<PMC *subtract(PMC *value, PMC *dest)>
-=item C<PMC* subtract_int(INTVAL value, PMC* dest)>
+=item C<PMC *subtract_int(INTVAL value, PMC *dest)>
-=item C<PMC* subtract_float(FLOATVAL value, PMC* dest)>
+=item C<PMC *subtract_float(FLOATVAL value, PMC *dest)>
Subtracts C<value> from the complex number, placing the result in C<dest>.
@@ -713,7 +713,7 @@ Subtracts C<value> from the complex number, placing the result in C<dest>.
*/
- PMC* subtract(PMC* value, PMC* dest) {
+ PMC *subtract(PMC *value, PMC *dest) {
MMD_Complex: {
if (dest)
VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
@@ -736,7 +736,7 @@ MMD_DEFAULT: {
}
}
- PMC* subtract_int(INTVAL value, PMC* dest) {
+ PMC *subtract_int(INTVAL value, PMC *dest) {
if (dest)
VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
else {
@@ -747,7 +747,7 @@ MMD_DEFAULT: {
return dest;
}
- PMC* subtract_float(FLOATVAL value, PMC* dest) {
+ PMC *subtract_float(FLOATVAL value, PMC *dest) {
if (dest)
VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
else {
@@ -758,7 +758,7 @@ MMD_DEFAULT: {
return dest;
}
- void i_subtract(PMC* value) {
+ void i_subtract(PMC *value) {
MMD_Complex: {
RE(SELF) -= RE(value);
IM(SELF) -= IM(value);
@@ -776,15 +776,15 @@ 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)>
-=item C<PMC* multiply_float(FLOATVAL value, PMC* dest)>
+=item C<PMC *multiply_float(FLOATVAL value, PMC *dest)>
Multiplies the complex number with C<value>, placing the result in C<dest>.
-=item C<void i_multiply(PMC* value)>
+=item C<void i_multiply(PMC *value)>
=item C<void i_multiply_int(INTVAL value)>
@@ -804,7 +804,7 @@ Multiplies the complex number SELF inplace with C<value>.
(a+bi)(c+di)=(ac-bd)+i(ad+bc)
*/
- PMC* multiply(PMC* value, PMC* dest) {
+ PMC *multiply(PMC *value, PMC *dest) {
MMD_Complex: {
FLOATVAL re = RE(SELF) * RE(value) - IM(SELF) * IM(value);
FLOATVAL im = IM(SELF) * RE(value) + RE(SELF) * IM(value);
@@ -831,7 +831,7 @@ MMD_DEFAULT: {
}
}
- PMC* multiply_int(INTVAL value, PMC* dest) {
+ PMC *multiply_int(INTVAL value, PMC *dest) {
if (dest)
VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
else {
@@ -842,7 +842,7 @@ MMD_DEFAULT: {
return dest;
}
- PMC* multiply_float(FLOATVAL value, PMC* dest) {
+ PMC *multiply_float(FLOATVAL value, PMC *dest) {
if (dest)
VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
else {
@@ -853,7 +853,7 @@ MMD_DEFAULT: {
return dest;
}
- void i_multiply(PMC* value) {
+ void i_multiply(PMC *value) {
MMD_Complex: {
FLOATVAL re = RE(SELF) * RE(value) - IM(SELF) * IM(value);
FLOATVAL im = IM(SELF) * RE(value) + RE(SELF) * IM(value);
@@ -878,19 +878,19 @@ 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)>
Divide the complex number by C<value>, placing the result in C<dest>.
-=item C<void i_divide(PMC* value, PMC* dest)>
+=item C<void i_divide(PMC *value, PMC *dest)>
-=item C<void i_divide_int(INTVAL value, PMC* dest)>
+=item C<void i_divide_int(INTVAL value, PMC *dest)>
-=item C<void i_divide_float(FLOATVAL value, PMC* dest)>
+=item C<void i_divide_float(FLOATVAL value, PMC *dest)>
Divide the complex number C<SELF> by C<value> inplace.
@@ -906,7 +906,7 @@ http://docs.sun.com/source/806-3568/ncg_goldberg.html
*/
- PMC* divide(PMC* value, PMC* dest) {
+ PMC *divide(PMC *value, PMC *dest) {
MMD_Complex: {
FLOATVAL mod, re, im;
@@ -939,7 +939,7 @@ MMD_DEFAULT: {
}
}
- PMC* divide_int(INTVAL value, PMC* dest) {
+ PMC *divide_int(INTVAL value, PMC *dest) {
int_check_divide_zero(INTERP, value);
if (dest)
VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
@@ -951,7 +951,7 @@ MMD_DEFAULT: {
return dest;
}
- PMC* divide_float(FLOATVAL value, PMC* dest) {
+ PMC *divide_float(FLOATVAL value, PMC *dest) {
float_check_divide_zero(INTERP, value);
if (dest)
VTABLE_morph(INTERP, dest, SELF->vtable->base_type);
@@ -963,7 +963,7 @@ MMD_DEFAULT: {
return dest;
}
- void i_divide(PMC* value) {
+ void i_divide(PMC *value) {
MMD_Complex: {
FLOATVAL mod, re, im;
@@ -999,7 +999,7 @@ MMD_DEFAULT: {
/*
-=item C<PMC* neg(PMC *dest)>
+=item C<PMC *neg(PMC *dest)>
=item C<void neg()>
@@ -1009,7 +1009,7 @@ Set C<dest> to the negated value of C<SELF>.
*/
- PMC* neg(PMC* dest) {
+ PMC *neg(PMC *dest) {
if (!dest)
dest = pmc_new(INTERP, SELF->vtable->base_type);
else
@@ -1026,7 +1026,7 @@ Set C<dest> to the negated value of C<SELF>.
/*
-=item C<INTVAL is_equal(PMC* value)>
+=item C<INTVAL is_equal(PMC *value)>
Compares the complex number with C<value> and returns true if they are equal.
@@ -1034,7 +1034,7 @@ Compares the complex number with C<value> and returns true if they are equal.
*/
- INTVAL is_equal(PMC* value) {
+ INTVAL is_equal(PMC *value) {
MMD_Complex: {
return (INTVAL)(
RE(SELF) == RE(value) &&
@@ -1049,7 +1049,7 @@ MMD_DEFAULT: {
/*
-=item C<PMC* absolute(PMC* dest)>
+=item C<PMC *absolute(PMC *dest)>
=item C<void i_absolute()>
@@ -1071,7 +1071,7 @@ Sets C<dest> to the absolute value of SELF that is the distance from (0.0).
*/
- PMC* absolute(PMC *dest) {
+ PMC *absolute(PMC *dest) {
FLOATVAL d = sqrt(RE(SELF)*RE(SELF) + IM(SELF)*IM(SELF));
if (!dest)
dest = pmc_new(INTERP,
@@ -1088,7 +1088,7 @@ Sets C<dest> to the absolute value of SELF that is the distance from (0.0).
/*
-=item C<METHOD PMC* ln()>
+=item C<METHOD PMC *ln()>
Returns the natural logorithm of SELF.
@@ -1107,7 +1107,7 @@ ln(+-i) = +- (pi i)/2
*/
- METHOD PMC* ln() {
+ METHOD PMC *ln() {
FLOATVAL re, im;
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
re = RE(SELF);
@@ -1121,7 +1121,7 @@ ln(+-i) = +- (pi i)/2
/*
-=item C<METHOD PMC* exp()>
+=item C<METHOD PMC *exp()>
Returns e ^ SELF.
@@ -1131,7 +1131,7 @@ exp(a + bi) = exp(a) * (cos(b) + i * sin(b))
*/
- METHOD PMC* exp() {
+ METHOD PMC *exp() {
FLOATVAL re, im, f;
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
re = RE(SELF);
@@ -1148,17 +1148,17 @@ exp(a + bi) = exp(a) * (cos(b) + i * sin(b))
/*
-=item C<METHOD PMC* sin()>
+=item C<METHOD PMC *sin()>
-=item C<METHOD PMC* cos()>
+=item C<METHOD PMC *cos()>
-=item C<METHOD PMC* tan()>
+=item C<METHOD PMC *tan()>
-=item C<METHOD PMC* csc()>
+=item C<METHOD PMC *csc()>
-=item C<METHOD PMC* sec()>
+=item C<METHOD PMC *sec()>
-=item C<METHOD PMC* cot()>
+=item C<METHOD PMC *cot()>
Returns C<FUNC>(SELF).
@@ -1179,7 +1179,7 @@ Returns C<FUNC>(SELF).
*/
- METHOD PMC* sin() {
+ METHOD PMC *sin() {
FLOATVAL re, im;
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
re = RE(SELF);
@@ -1202,7 +1202,7 @@ Returns C<FUNC>(SELF).
return d;
}
- METHOD PMC* cos() {
+ METHOD PMC *cos() {
FLOATVAL re, im;
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
re = RE(SELF);
@@ -1222,7 +1222,7 @@ Returns C<FUNC>(SELF).
return d;
}
- METHOD PMC* tan() {
+ METHOD PMC *tan() {
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
PMC *e = pmc_new(INTERP, SELF->vtable->base_type);
d = Parrot_Complex_nci_sin(INTERP, SELF);
@@ -1231,7 +1231,7 @@ Returns C<FUNC>(SELF).
return d;
}
- METHOD PMC* cot() {
+ METHOD PMC *cot() {
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
PMC *e = pmc_new(INTERP, SELF->vtable->base_type);
d = Parrot_Complex_nci_cos(INTERP, SELF);
@@ -1240,7 +1240,7 @@ Returns C<FUNC>(SELF).
return d;
}
- METHOD PMC* sec() {
+ METHOD PMC *sec() {
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
PMC *e = pmc_new(INTERP, SELF->vtable->base_type);
RE(d) = 1.0;
@@ -1250,7 +1250,7 @@ Returns C<FUNC>(SELF).
return d;
}
- METHOD PMC* csc() {
+ METHOD PMC *csc() {
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
PMC *e = pmc_new(INTERP, SELF->vtable->base_type);
RE(d) = 1.0;
@@ -1262,17 +1262,17 @@ Returns C<FUNC>(SELF).
/*
-=item C<METHOD PMC* asin()>
+=item C<METHOD PMC *asin()>
-=item C<METHOD PMC* acos()>
+=item C<METHOD PMC *acos()>
-=item C<METHOD PMC* atan()>
+=item C<METHOD PMC *atan()>
-=item C<METHOD PMC* acsc()>
+=item C<METHOD PMC *acsc()>
-=item C<METHOD PMC* asec()>
+=item C<METHOD PMC *asec()>
-=item C<METHOD PMC* acot()>
+=item C<METHOD PMC *acot()>
Returns the inverse function of SELF.
@@ -1293,7 +1293,7 @@ Returns the inverse function of SELF.
*/
- METHOD PMC* asin() {
+ METHOD PMC *asin() {
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
PMC *e = pmc_new(INTERP, SELF->vtable->base_type);
e = Parrot_Complex_multiply_Complex(INTERP, SELF, SELF, e);
@@ -1308,7 +1308,7 @@ Returns the inverse function of SELF.
return e;
}
- METHOD PMC* acos() {
+ METHOD PMC *acos() {
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
PMC *e = pmc_new(INTERP, SELF->vtable->base_type);
e = Parrot_Complex_multiply_Complex(INTERP, SELF, SELF, e);
@@ -1323,7 +1323,7 @@ Returns the inverse function of SELF.
return d;
}
- METHOD PMC* atan() {
+ METHOD PMC *atan() {
FLOATVAL re, im;
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
PMC *e = pmc_new(INTERP, SELF->vtable->base_type);
@@ -1341,7 +1341,7 @@ Returns the inverse function of SELF.
}
- METHOD PMC* acot() {
+ METHOD PMC *acot() {
FLOATVAL a, b;
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
a = RE(SELF);
@@ -1352,7 +1352,7 @@ Returns the inverse function of SELF.
return d;
}
- METHOD PMC* acsc() {
+ METHOD PMC *acsc() {
FLOATVAL a, b;
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
a = RE(SELF);
@@ -1363,7 +1363,7 @@ Returns the inverse function of SELF.
return d;
}
- METHOD PMC* asec() {
+ METHOD PMC *asec() {
FLOATVAL a, b;
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
a = RE(SELF);
@@ -1376,15 +1376,15 @@ Returns the inverse function of SELF.
/*
-=item C<METHOD PMC* sinh()>
+=item C<METHOD PMC *sinh()>
Returns the arctangent of SELF.
-=item C<METHOD PMC* cosh()>
+=item C<METHOD PMC *cosh()>
Returns the arcsine of SELF.
-=item C<METHOD PMC* tanh()>
+=item C<METHOD PMC *tanh()>
Returns the arccosine of SELF.
@@ -1394,7 +1394,7 @@ tanh(z) = sinh(z) / cosh(z)
*/
- METHOD PMC* sinh() {
+ METHOD PMC *sinh() {
FLOATVAL a, b;
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
a = RE(SELF);
@@ -1404,7 +1404,7 @@ tanh(z) = sinh(z) / cosh(z)
return d;
}
- METHOD PMC* cosh() {
+ METHOD PMC *cosh() {
FLOATVAL a, b;
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
a = RE(SELF);
@@ -1414,7 +1414,7 @@ tanh(z) = sinh(z) / cosh(z)
return d;
}
- METHOD PMC* tanh() {
+ METHOD PMC *tanh() {
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
PMC *e = pmc_new(INTERP, SELF->vtable->base_type);
d = Parrot_Complex_nci_sinh(INTERP, SELF);
@@ -1423,7 +1423,7 @@ tanh(z) = sinh(z) / cosh(z)
return d;
}
- METHOD PMC* coth() {
+ METHOD PMC *coth() {
FLOATVAL a, b;
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
d = Parrot_Complex_nci_tanh(INTERP, SELF);
@@ -1434,7 +1434,7 @@ tanh(z) = sinh(z) / cosh(z)
return d;
}
- METHOD PMC* csch() {
+ METHOD PMC *csch() {
FLOATVAL a, b;
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
d = Parrot_Complex_nci_sinh(INTERP, SELF);
@@ -1445,7 +1445,7 @@ tanh(z) = sinh(z) / cosh(z)
return d;
}
- METHOD PMC* sech() {
+ METHOD PMC *sech() {
FLOATVAL a, b;
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
d = Parrot_Complex_nci_cosh(INTERP, SELF);
@@ -1458,17 +1458,17 @@ tanh(z) = sinh(z) / cosh(z)
/*
-=item C<METHOD PMC* asinh()>
+=item C<METHOD PMC *asinh()>
-=item C<METHOD PMC* acosh()>
+=item C<METHOD PMC *acosh()>
-=item C<METHOD PMC* atanh()>
+=item C<METHOD PMC *atanh()>
-=item C<METHOD PMC* acsch()>
+=item C<METHOD PMC *acsch()>
-=item C<METHOD PMC* asech()>
+=item C<METHOD PMC *asech()>
-=item C<METHOD PMC* acoth()>
+=item C<METHOD PMC *acoth()>
The inverse hyperbolic functions. Currently all broken, but for
C<func(a+bi) = c+di>, C<|c|> and C<|d|> will be correct, confusingly enough.
@@ -1484,7 +1484,7 @@ atanh = i atan(-ix)
*/
- METHOD PMC* asinh() {
+ METHOD PMC *asinh() {
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
PMC *e = pmc_new(INTERP, SELF->vtable->base_type);
RE(d) = IM(SELF);
@@ -1495,7 +1495,7 @@ atanh = i atan(-ix)
return e;
}
- METHOD PMC* acosh() {
+ METHOD PMC *acosh() {
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
PMC *e = pmc_new(INTERP, SELF->vtable->base_type);
d = Parrot_Complex_nci_acos(INTERP, SELF);
@@ -1504,7 +1504,7 @@ atanh = i atan(-ix)
return e;
}
- METHOD PMC* atanh() {
+ METHOD PMC *atanh() {
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
PMC *e = pmc_new(INTERP, SELF->vtable->base_type);
RE(d) = IM(SELF);
@@ -1515,7 +1515,7 @@ atanh = i atan(-ix)
return e;
}
- METHOD PMC* acoth() {
+ METHOD PMC *acoth() {
FLOATVAL a, b;
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
a = RE(SELF);
@@ -1526,7 +1526,7 @@ atanh = i atan(-ix)
return d;
}
- METHOD PMC* acsch() {
+ METHOD PMC *acsch() {
FLOATVAL a, b;
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
a = RE(SELF);
@@ -1537,7 +1537,7 @@ atanh = i atan(-ix)
return d;
}
- METHOD PMC* asech() {
+ METHOD PMC *asech() {
FLOATVAL a, b;
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
a = RE(SELF);
@@ -1550,11 +1550,11 @@ atanh = i atan(-ix)
/*
-=item C<PMC* pow(PMC* value, PMC* dest)>
+=item C<PMC *pow(PMC *value, PMC *dest)>
Return SELF to the C<value>th power and return result in C<dest>.
-=item C<METHOD PMC* sqrt()>
+=item C<METHOD PMC *sqrt()>
Return the square root of SELF.
@@ -1567,7 +1567,7 @@ x ^ y = exp(y * ln x))
*/
- PMC* pow(PMC* value, PMC* dest) {
+ PMC *pow(PMC *value, PMC *dest) {
MMD_Complex: {
PMC *l = pmc_new(INTERP, SELF->vtable->base_type);
if (dest)
@@ -1593,7 +1593,7 @@ MMD_DEFAULT: {
}
/* sqrt(x) = exp(ln(x)/2) */
- METHOD PMC* sqrt() {
+ METHOD PMC *sqrt() {
PMC *d = pmc_new(INTERP, SELF->vtable->base_type);
d = Parrot_Complex_nci_ln(INTERP, SELF);
RE(d) *= 0.5;
View
24 src/pmc/continuation.pmc
@@ -125,10 +125,10 @@ Creates and returns a clone of the continuation.
*/
- PMC* clone() {
+ PMC *clone() {
struct Parrot_cont * cc;
struct Parrot_cont *cc_self = PMC_cont(SELF);
- PMC* ret = pmc_new_noinit(INTERP, enum_class_Continuation);
+ PMC *ret = pmc_new_noinit(INTERP, enum_class_Continuation);
PObj_custom_mark_destroy_SETALL(ret);
cc = new_continuation(INTERP, cc_self);
@@ -148,7 +148,7 @@ Assign context.
=cut
*/
- void set_pmc(PMC* src) {
+ void set_pmc(PMC *src) {
struct Parrot_cont * const cc_self = PMC_cont(SELF);
struct Parrot_cont * const cc_src = PMC_cont(src);
@@ -190,7 +190,7 @@ Returns the pointer to the return instruction.
*/
- void* get_pointer() {
+ void *get_pointer() {
return PMC_cont(SELF)->address;
}
/*
@@ -224,7 +224,7 @@ destination to continue execution.
*/
- opcode_t* invoke(void* next) {
+ opcode_t *invoke(void *next) {
struct Parrot_cont * cc = PMC_cont(SELF);
Stack_Chunk_t *stack_target = cc->dynamic_state;
Stack_Chunk_t *corresponding_target;
@@ -383,7 +383,7 @@ destination to continue execution.
/*
-=item C<STRING* get_string()>
+=item C<STRING *get_string()>
Experimental: return caller info as a STRING.
@@ -391,13 +391,13 @@ Experimental: return caller info as a STRING.
*/
- STRING* get_string() {
+ STRING *get_string() {
return Parrot_Context_infostr(INTERP, PMC_cont(SELF)->to_ctx);
}
/*
-=item C<METHOD PMC* "caller"()>
+=item C<METHOD PMC *"caller"()>
Experimental: return caller PMC or Undef if none.
@@ -405,8 +405,8 @@ Experimental: return caller PMC or Undef if none.
*/
- METHOD PMC* caller() {
- struct Parrot_cont * cc = PMC_cont(SELF);
+ METHOD PMC *caller() {
+ struct Parrot_cont *cc = PMC_cont(SELF);
PMC *caller = cc->to_ctx->current_sub;
if (!caller || !PMC_sub(caller)->seg) {
caller = pmc_new(INTERP, enum_class_Undef);
@@ -416,7 +416,7 @@ Experimental: return caller PMC or Undef if none.
}
/*
-=item C<METHOD PMC* "continuation"()>
+=item C<METHOD PMC *"continuation"()>
Experimental: return continuation PMC of this Continuation or Undef if none.
@@ -424,7 +424,7 @@ Experimental: return continuation PMC of this Continuation or Undef if none.
*/
- METHOD PMC* continuation() {
+ METHOD PMC *continuation() {
struct Parrot_cont * cc = PMC_cont(SELF);
PMC *cont = cc->to_ctx->current_cont;
if (cont)
View
8 src/pmc/coroutine.pmc
@@ -62,7 +62,7 @@ stopped. See the L<Glossary|docs/glossary.pod> for more information.
} while (0)
static void
-print_sub_name(Interp* interp, PMC* sub)
+print_sub_name(Interp *interp, PMC *sub)
{
Parrot_coro *co = PMC_coro(sub);
Interp *tracer = interp->debugger ? interp->debugger : interp;
@@ -89,7 +89,7 @@ pmclass Coroutine extends Sub need_ext {
Initializes the co-routine.
-=item C<PMC* clone()>
+=item C<PMC *clone()>
Clone the couroutine.
@@ -119,7 +119,7 @@ Destroys the coroutine.
SUPER();
}
- PMC* clone() {
+ PMC *clone() {
Parrot_coro *sub;
PMC *ret = pmc_new_noinit(INTERP, SELF->vtable->base_type);
@@ -146,7 +146,7 @@ Swaps the "context".
*/
- opcode_t* invoke(void *next) {
+ opcode_t *invoke(void *next) {
parrot_context_t *caller_ctx;
PackFile_ByteCode *wanted_seg;
struct Stack_Chunk *state;
View
104 src/pmc/default.pmc
@@ -219,7 +219,7 @@ make_prop_hash(PARROT_INTERP, PMC *self) {
/*
=item C<static INTVAL
-does_isa(Interp* interp, STRING *method, STRING *what)>
+does_isa(Interp *interp, STRING *method, STRING *what)>
Compares C<*method> and C<*what>.
Returns true (1) if B<method> is found in B<what>, false (0) otherwise.
@@ -229,7 +229,7 @@ Returns true (1) if B<method> is found in B<what>, false (0) otherwise.
*/
static INTVAL
-does_isa(Interp* interp, const STRING *method, const STRING *what)
+does_isa(Interp *interp, const STRING *method, const STRING *what)
{
INTVAL pos = 0;
do {
@@ -287,7 +287,7 @@ With a null C<initializer>, calls C<init()>, else throws an exception.
*/
- void init_pmc(PMC* initializer) {
+ void init_pmc(PMC *initializer) {
if (PMC_IS_NULL(initializer))
DYNSELF.init();
else
@@ -298,7 +298,7 @@ With a null C<initializer>, calls C<init()>, else throws an exception.
/*
-=item C<PMC* instantiate(PMC* sig)>
+=item C<PMC *instantiate(PMC *sig)>
Default fallback. Creates a new PMC of the type of the class SELF and
calls init().
@@ -307,9 +307,9 @@ calls init().
*/
- PMC* instantiate(PMC* sig) {
+ PMC *instantiate(PMC *sig) {
const INTVAL type = SELF->vtable->base_type;
- PMC* const ret = pmc_new_noinit(INTERP, type);
+ PMC *const ret = pmc_new_noinit(INTERP, type);
VTABLE_init(INTERP, ret);
return ret;
}
@@ -339,7 +339,7 @@ NULL PMC is returned.
*/
- PMC* getprop(STRING* key) {
+ PMC *getprop(STRING *key) {
if (SELF->pmc_ext && PMC_metadata(SELF)) {
return VTABLE_get_pmc_keyed_str(INTERP, PMC_metadata(SELF), key);
}
@@ -358,7 +358,7 @@ Sets the property for C<*key> to C<*value>.
*/
- void setprop(STRING* key, PMC* value) {
+ void setprop(STRING *key, PMC *value) {
if (check_set_std_props(INTERP, SELF, key, value)) {
return;
}
@@ -388,7 +388,7 @@ Deletes the property for C<*key>.
*/
- void delprop(STRING* key) {
+ void delprop(STRING *key) {
if (SELF->pmc_ext && PMC_metadata(SELF)) {
VTABLE_delete_keyed_str(INTERP, PMC_metadata(SELF), key);
}
@@ -405,7 +405,7 @@ Returns the PMC's properties or the NULL PMC if no properties exist.
*/
- PMC* getprops() {
+ PMC *getprops() {
if (!SELF->pmc_ext)
add_pmc_ext(INTERP, SELF);
if (!PMC_metadata(SELF)) {
@@ -443,7 +443,7 @@ C<type_keyed()> with it.
*/
INTVAL type_keyed_int(INTVAL key) {
- PMC* const r_key = INT2KEY(INTERP, key);
+ PMC *const r_key = INT2KEY(INTERP, key);
return DYNSELF.type_keyed(r_key);
}
@@ -457,14 +457,14 @@ Returns the name of the PMC.
*/
- STRING* name() {
+ STRING *name() {
return SELF->vtable->whoami;
}
/*
-=item C<PMC* pmc_namespace>
+=item C<PMC *pmc_namespace>
Return the namespace for this PMC.
@@ -481,12 +481,12 @@ Store the method as a global in the namespace of this class.
*/
- PMC* pmc_namespace() {
+ PMC *pmc_namespace() {
return SELF->vtable->_namespace;
}
- PMC* find_method(STRING *method_name) {
+ PMC *find_method(STRING *method_name) {
return Parrot_find_method_with_cache(INTERP, SELF, method_name);
}
@@ -507,7 +507,7 @@ C<get_integer_keyed()> with it.
*/
INTVAL get_integer_keyed_int(INTVAL key) {
- PMC* const r_key = INT2KEY(INTERP, key);
+ PMC *const r_key = INT2KEY(INTERP, key);
return DYNSELF.get_integer_keyed(r_key);
}
@@ -523,7 +523,7 @@ C<get_number_keyed()> with it.
*/
FLOATVAL get_number_keyed_int(INTVAL key) {
- PMC* const r_key = INT2KEY(INTERP, key);
+ PMC *const r_key = INT2KEY(INTERP, key);
return DYNSELF.get_number_keyed(r_key);
}
@@ -539,8 +539,8 @@ C<get_string_keyed()> with it.
*/
- STRING* get_string_keyed_int(INTVAL key) {
- PMC* const r_key = INT2KEY(INTERP, key);
+ STRING *get_string_keyed_int(INTVAL key) {
+ PMC *const r_key = INT2KEY(INTERP, key);
return DYNSELF.get_string_keyed(r_key);
}
@@ -556,7 +556,7 @@ C<get_bool_keyed()> with it.
*/
INTVAL get_bool_keyed_int(INTVAL key) {
- PMC* const r_key = INT2KEY(INTERP, key);
+ PMC *const r_key = INT2KEY(INTERP, key);
return DYNSELF.get_bool_keyed(r_key);
}
@@ -572,7 +572,7 @@ C<elements_keyed()> with it.
*/
INTVAL elements_keyed_int(INTVAL key) {
- PMC* const r_key = INT2KEY(INTERP, key);
+ PMC *const r_key = INT2KEY(INTERP, key);
return DYNSELF.elements_keyed(r_key);
}
@@ -588,8 +588,8 @@ C<get_pmc_keyed()> with it.
*/
- PMC* get_pmc_keyed_int(INTVAL key) {
- PMC* const r_key = INT2KEY(INTERP, key);
+ PMC *get_pmc_keyed_int(INTVAL key) {
+ PMC *const r_key = INT2KEY(INTERP, key);
return DYNSELF.get_pmc_keyed(r_key);
}
@@ -603,7 +603,7 @@ Returns the address of the PMC.
*/
- void* get_pointer() {
+ void *get_pointer() {
return SELF;
}
@@ -617,15 +617,15 @@ Returns whether the PMC is numerically equal to C<value>.
*/
- INTVAL is_same(PMC* value) {
+ INTVAL is_same(PMC *value) {
return SELF == value;
}
/*
-=item C<void assign_pmc(PMC* value)>
+=item C<void assign_pmc(PMC *value)>
-=item C<void assign_string_native(PMC* value)>
+=item C<void assign_string_native(PMC *value)>
Defaults fall back to C<set_pmc> and C<set_string_native>.
@@ -633,7 +633,7 @@ Defaults fall back to C<set_pmc> and C<set_string_native>.
*/
- void assign_pmc(PMC* value) {
+ void assign_pmc(PMC *value) {
STRING * const undef = string_from_cstring(INTERP, "Undef", 5);
if (VTABLE_isa(INTERP, value, undef))
@@ -642,7 +642,7 @@ Defaults fall back to C<set_pmc> and C<set_string_native>.
DYNSELF.set_pmc(value);
}
- void assign_string_native(STRING* value) {
+ void assign_string_native(STRING *value) {
DYNSELF.set_string_native(value);
}
@@ -672,7 +672,7 @@ and C<value>.
*/
void set_integer_keyed_int(INTVAL key, INTVAL value) {
- PMC* const r_key = INT2KEY(INTERP, key);
+ PMC *const r_key = INT2KEY(INTERP, key);
DYNSELF.set_integer_keyed(r_key, value);
}
@@ -688,7 +688,7 @@ and C<value>.
*/
void set_number_keyed_int(INTVAL key, FLOATVAL value) {
- PMC* const r_key = INT2KEY(INTERP, key);
+ PMC *const r_key = INT2KEY(INTERP, key);
DYNSELF.set_number_keyed(r_key, value);
}
@@ -704,8 +704,8 @@ and C<value>.
*/
- void set_string_keyed_int(INTVAL key, STRING* string) {
- PMC* const r_key = INT2KEY(INTERP, key);
+ void set_string_keyed_int(INTVAL key, STRING *string) {
+ PMC *const r_key = INT2KEY(INTERP, key);
DYNSELF.set_string_keyed(r_key, string);
}
@@ -721,7 +721,7 @@ and C<value>.
*/
void set_bool_keyed_int(INTVAL key, INTVAL value) {
- PMC* const r_key = INT2KEY(INTERP, key);
+ PMC *const r_key = INT2KEY(INTERP, key);
DYNSELF.set_bool_keyed(r_key, value);
}
@@ -736,8 +736,8 @@ and C<value>.
*/
- void set_pmc_keyed_int(INTVAL key, PMC* value) {
- PMC* const r_key = INT2KEY(INTERP, key);
+ void set_pmc_keyed_int(INTVAL key, PMC *value) {
+ PMC *const r_key = INT2KEY(INTERP, key);
DYNSELF.set_pmc_keyed(r_key, value);
}
@@ -751,7 +751,7 @@ Returns whether the PMC is equal to C<*value>.
*/
- INTVAL is_equal(PMC* value) {
+ INTVAL is_equal(PMC *value) {
return (SELF->vtable == value->vtable
&& PMC_struct_val(SELF) == PMC_struct_val(value)
&& PMC_data(SELF) == PMC_data(value));
@@ -767,7 +767,7 @@ Returns whether the PMC is numerically equal to C<*value>.
*/
- INTVAL is_equal_num(PMC* value) {
+ INTVAL is_equal_num(PMC *value) {
return (VTABLE_get_number(INTERP, SELF) ==
VTABLE_get_number(INTERP, value));
}
@@ -782,7 +782,7 @@ Returns whether the PMC is numerically equal to C<*value>.
*/
- INTVAL is_equal_str(PMC* value) {
+ INTVAL is_equal_str(PMC *value) {
return (0 == string_equal(INTERP, VTABLE_get_string(INTERP, SELF),
VTABLE_get_string(INTERP, value)));
}
@@ -801,7 +801,7 @@ C<exists_keyed()> with it.
*/
INTVAL exists_keyed_int(INTVAL key) {
- PMC* const r_key = INT2KEY(INTERP, key);
+ PMC *const r_key = INT2KEY(INTERP, key);
return DYNSELF.exists_keyed(r_key);
}
@@ -832,7 +832,7 @@ C<defined_keyed()> with it.
*/
INTVAL defined_keyed_int(INTVAL key) {
- PMC* const r_key = INT2KEY(INTERP, key);
+ PMC *const r_key = INT2KEY(INTERP, key);
return DYNSELF.defined_keyed(r_key);
}
@@ -847,7 +847,7 @@ Converts C<key> to a PMC key and calls C<delete_keyed()> with it.
*/
void delete_keyed_int(INTVAL key) {
- PMC* const r_key = INT2KEY(INTERP, key);
+ PMC *const r_key = INT2KEY(INTERP, key);
DYNSELF.delete_keyed(r_key);
}
@@ -862,8 +862,8 @@ C<nextkey_keyed()> with it.
*/
- PMC* nextkey_keyed_int(INTVAL key, INTVAL w) {
- PMC* const r_key = INT2KEY(INTERP, key);
+ PMC *nextkey_keyed_int(INTVAL key, INTVAL w) {
+ PMC *const r_key = INT2KEY(INTERP, key);
return DYNSELF.nextkey_keyed(r_key, w);
}
@@ -897,7 +897,7 @@ true (1) is returned; otherwise, false (0) is returned.
*/
- INTVAL does(STRING* _interface) {
+ INTVAL does(STRING *_interface) {
return does_isa(INTERP, _interface, SELF->vtable->does_str);
}
@@ -914,7 +914,7 @@ true (1) is returned; otherwise, false (0) is returned.
*/
- INTVAL isa(STRING* _class) {
+ INTVAL isa(STRING *_class) {
/* TODO FIXME - walk mro */
return does_isa(INTERP, _class, SELF->vtable->isa_str);
}
@@ -922,7 +922,7 @@ true (1) is returned; otherwise, false (0) is returned.
/*
-=item C<PMC* subclass(PMC* name)>
+=item C<PMC *subclass(PMC *name)>
Creates a subclass, optionally with a given C<name>.
@@ -930,28 +930,28 @@ Creates a subclass, optionally with a given C<name>.
*/
- PMC* subclass(PMC *name) {
+ PMC *subclass(PMC *name) {
return Parrot_single_subclass(INTERP, SELF, name);
}
/*
-=item C<PMC* get_class()>
+=item C<PMC *get_class()>
Returns SELF. A PMC is it's own class.
-=item C<PMC* get_attr_str(STRING* attr)>
+=item C<PMC *get_attr_str(STRING *attr)>
Look for NCI methods and properties.
=cut
*/
- PMC* get_class() {
+ PMC *get_class() {
return SELF;
}
- PMC* get_attr_str(STRING *name) {
+ PMC *get_attr_str(STRING *name) {
PMC *p = NULL;
/* let's look for props first
View
10 src/pmc/deleg_pmc.pmc
@@ -38,7 +38,7 @@ pmclass deleg_pmc no_ro {
void init() {
}
- void init_pmc(PMC* _class) {
+ void init_pmc(PMC *_class) {
}
void mark() {
@@ -53,7 +53,7 @@ pmclass deleg_pmc no_ro {
/* don't pass that on */
}
- PMC* clone() {
+ PMC *clone() {
PMC *res = pmc_new(INTERP, SELF->vtable->base_type);
SLOTTYPE *attrib_array = PMC_data_typed(res, SLOTTYPE *);
INTVAL i;
@@ -64,7 +64,7 @@ pmclass deleg_pmc no_ro {
return res;
}
- STRING* name() {
+ STRING *name() {
return SELF->vtable->whoami;
}
@@ -76,11 +76,11 @@ pmclass deleg_pmc no_ro {
SUPER(method_name, sub_pmc);
}
- PMC* find_method(STRING* method_name) {
+ PMC *find_method(STRING *method_name) {
return SUPER(method_name);
}
- PMC* pmc_namespace() {
+ PMC *pmc_namespace() {
return SELF->vtable->_namespace;
}
View
28 src/pmc/delegate.pmc
@@ -63,7 +63,7 @@ pmclass delegate {
=over 4
-=item C<PMC* instantiate(PMC* sig)>
+=item C<PMC *instantiate(PMC *sig)>
Calls the delegated C<__instantiate> method if it exists.
@@ -77,22 +77,22 @@ useful defaults and don't throw exceptions.
void init() {
- STRING* const meth = CONST_STRING(interp, "init");
- PMC* const sub = Parrot_find_vtable_meth(INTERP, SELF, meth);
+ STRING *const meth = CONST_STRING(interp, "init");
+ PMC *const sub = Parrot_find_vtable_meth(INTERP, SELF, meth);
if (!PMC_IS_NULL(sub))
Parrot_run_meth_fromc(interp, sub, SELF, meth);
}
- void init_pmc(PMC* initializer) {
- STRING* const meth = CONST_STRING(interp, "init_pmc");
- PMC* const sub = Parrot_find_vtable_meth(INTERP, SELF, meth);
+ void init_pmc(PMC *initializer) {
+ STRING *const meth = CONST_STRING(interp, "init_pmc");
+ PMC *const sub = Parrot_find_vtable_meth(INTERP, SELF, meth);
if (!PMC_IS_NULL(sub))
Parrot_run_meth_fromc_args(interp, sub, pmc, meth, "vP", initializer);
}
- PMC* instantiate(PMC* sig) {
- STRING* const meth = CONST_STRING(interp, "instantiate");
- PMC* const sub = Parrot_find_vtable_meth(INTERP, SELF, meth);
+ PMC *instantiate(PMC *sig) {
+ STRING *const meth = CONST_STRING(interp, "instantiate");
+ PMC *const sub = Parrot_find_vtable_meth(INTERP, SELF, meth);
if (PMC_IS_NULL(sub))
return SUPER(sig);
return (PMC*) Parrot_run_meth_fromc(INTERP, sub, SELF, meth);
@@ -110,11 +110,11 @@ useful defaults and don't throw exceptions.
SUPER(method_name, sub_pmc);
}
- STRING* name() {
+ STRING *name() {
return SELF->vtable->whoami;
}
- PMC* pmc_namespace() {
+ PMC *pmc_namespace() {
return SELF->vtable->_namespace;
}
@@ -139,9 +139,9 @@ Invokes a subroutine.
*/
- opcode_t* invoke(void *next) {
- STRING* const meth = CONST_STRING(interp, "invoke");
- PMC* const sub = Parrot_find_vtable_meth(INTERP, SELF, meth);
+ opcode_t *invoke(void *next) {
+ STRING *const meth = CONST_STRING(interp, "invoke");
+ PMC *const sub = Parrot_find_vtable_meth(INTERP, SELF, meth);
if (PMC_IS_NULL(sub))
vtable_meth_not_found(INTERP, SELF, "invoke");
INTERP->current_object = SELF;
View
8 src/pmc/enumerate.pmc
@@ -22,7 +22,7 @@ These is an Iterator return [idx, item] tuples.
pmclass Enumerate extends Iterator no_ro {
- void init_pmc(PMC* iterable) {
+ void init_pmc(PMC *iterable) {
SUPER(iterable);
PMC_struct_val(SELF) = key_new_integer(INTERP, 0);
PMC_pmc_val(SELF) = VTABLE_get_iter(INTERP, iterable);
@@ -30,7 +30,7 @@ pmclass Enumerate extends Iterator no_ro {
/*
-=item C<PMC* shift_pmc()>
+=item C<PMC *shift_pmc()>
Returns [idx, element] for the current idx/key and sets the idx/key to
the next one.
@@ -50,7 +50,7 @@ the next one.
return ok;
}
- PMC* shift_pmc() {
+ PMC *shift_pmc() {
PMC *item, *tupl, *val;
PMC *key = (PMC *)PMC_struct_val(SELF);
PMC *iter = (PMC *)PMC_pmc_val(SELF);
@@ -74,7 +74,7 @@ the next one.
return tupl;
}
- PMC* get_iter() {
+ PMC *get_iter() {
return SELF;
}
View
22 src/pmc/env.pmc
@@ -34,7 +34,7 @@ pmclass Env singleton does hash {
/*
-=item C<void* get_pointer()>
+=item C<void *get_pointer()>
=item C<void set_pointer(void *ptr)>
@@ -45,17 +45,17 @@ information see F<src/pmc.c>.
*/
- void* get_pointer() {
+ void *get_pointer() {
return Env_PMC;
}
- void set_pointer(void* ptr) {
+ void set_pointer(void *ptr) {
Env_PMC = (PMC*) ptr;
}
/*
-=item C<PMC* get_iter()>
+=item C<PMC *get_iter()>
Returns a new iterator for the environment.
This method is questionable, as environ in not in ISO-C.
@@ -64,7 +64,7 @@ This method is questionable, as environ in not in ISO-C.