Skip to content

Commit

Permalink
normalize C headers to match the rest of the codebase
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/trunk@47835 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
petdance committed Jun 25, 2010
1 parent ee6f0a5 commit 98b13a2
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions compilers/opsc/src/Ops/Trans/C.pm
Expand Up @@ -299,7 +299,10 @@ static void hop_deinit(PARROT_INTERP);
* returns >= 0 (found idx into info_table), -1 if not
*/
static size_t hash_str(const char *str) {
PARROT_PURE_FUNCTION
static
size_t hash_str(ARGIN(const char *str))
{
size_t key = 0;
const char *s = str;
Expand All @@ -311,7 +314,8 @@ static size_t hash_str(const char *str) {
return key;
}
static void store_op(PARROT_INTERP, op_info_t *info, int full) {
static void store_op(PARROT_INTERP, op_info_t *info, int full)
{
HOP * const p = mem_gc_allocate_zeroed_typed(interp, HOP);
const size_t hidx =
hash_str(full ? info->full_name : info->name) % OP_HASH_SIZE;
Expand All @@ -320,7 +324,9 @@ static void store_op(PARROT_INTERP, op_info_t *info, int full) {
p->next = hop[hidx];
hop[hidx] = p;
}
static int get_op(PARROT_INTERP, const char * name, int full) {
static int get_op(PARROT_INTERP, const char * name, int full)
{
const HOP * p;
const size_t hidx = hash_str(name) % OP_HASH_SIZE;
if (!hop) {
Expand All @@ -333,7 +339,9 @@ static int get_op(PARROT_INTERP, const char * name, int full) {
}
return -1;
}
static void hop_init(PARROT_INTERP) {
static void hop_init(PARROT_INTERP)
{
size_t i;
op_info_t * const info = [[BS]]op_lib.op_info_table;
/* store full names */
Expand All @@ -344,6 +352,7 @@ static void hop_init(PARROT_INTERP) {
if (get_op(interp, info[i].name, 0) == -1)
store_op(interp, info + i, 0);
}
static void hop_deinit(PARROT_INTERP)
{
if (hop) {
Expand Down

0 comments on commit 98b13a2

Please sign in to comment.