|
|
Author: chromatic
Date: Sun Dec 16 23:20:07 2007
New Revision: 24001
Modified:
trunk/src/pmc/nci.pmc
trunk/src/sub.c
Log:
[PDD 07] Fix C parenthesis spacing and a compilation warning.
Modified: trunk/src/pmc/nci.pmc
==============================================================================
--- trunk/src/pmc/nci.pmc (original)
+++ trunk/src/pmc/nci.pmc Sun Dec 16 23:20:07 2007
@@ -74,7 +74,7 @@
void init() {
PMC_struct_val(SELF) = NULL;
PMC_pmc_val(SELF) = PMCNULL;
- PMC_data(SELF) = mem_sys_allocate_zeroed(sizeof(Parrot_NCI));
+ PMC_data(SELF) = mem_allocate_zeroed_typed(Parrot_NCI);
/* Mark that we're not a raw NCI. */
PObj_flag_CLEAR(private2, SELF);
@@ -101,7 +101,8 @@
nci_info->arity = string_length(INTERP, key) - 1;
/* Build call function. */
- nci_info->func = build_call_func(INTERP, SELF, key);
+ nci_info->func =
+ (void (**)(void))(build_call_func(INTERP, SELF, key));
}
/*
@@ -140,7 +141,7 @@
PMC * const ret = pmc_new_noinit(INTERP, SELF->vtable->base_type);
PMC_struct_val(ret) = PMC_struct_val(SELF);
PMC_pmc_val(ret) = PMCNULL;
- PMC_data(ret) = mem_sys_allocate_zeroed(sizeof(Parrot_NCI));
+ PMC_data(ret) = mem_allocate_zeroed_typed(Parrot_NCI);
nci_info_ret = PARROT_NCI(ret);
/* FIXME if data is malloced (JIT/i386!) then we need
Modified: trunk/src/sub.c
==============================================================================
--- trunk/src/sub.c (original)
+++ trunk/src/sub.c Sun Dec 16 23:20:07 2007
@@ -445,7 +445,7 @@
info.fullname, info.pc, file, info.line);
/* free the non-constant string, but not the constant one */
- if (strncmp(unknown_file, file, sizeof(unknown_file)-1) < 0)
+ if (strncmp(unknown_file, file, sizeof (unknown_file) - 1) < 0)
string_cstring_free((char *)const_cast(info.file));
/* XXX This is probably a source of mis-freeing. */
}
|
|