Skip to content

Commit

Permalink
fix a decorator. Assign NULLs to pointers, not zeroes.
Browse files Browse the repository at this point in the history
  • Loading branch information
petdance committed Mar 11, 2011
1 parent a8d50a5 commit f31d6e9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
8 changes: 3 additions & 5 deletions include/parrot/scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,9 +47,8 @@ INTVAL Parrot_cx_count_handlers_typed(PARROT_INTERP,

PARROT_EXPORT
void Parrot_cx_delete_handler_local(PARROT_INTERP,
ARGIN(STRING *handler_type))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
ARGIN_NULLOK(STRING *handler_type))
__attribute__nonnull__(1);

PARROT_EXPORT
void Parrot_cx_delete_handler_typed(PARROT_INTERP,
Expand Down Expand Up @@ -185,8 +184,7 @@ void Parrot_cx_timer_invoke(PARROT_INTERP, ARGIN(PMC *timer))
, PARROT_ASSERT_ARG(handler_type))
#define ASSERT_ARGS_Parrot_cx_delete_handler_local \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(handler_type))
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_cx_delete_handler_typed \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
Expand Down
6 changes: 3 additions & 3 deletions src/gc/fixed_allocator.c
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,9 @@ Parrot_gc_pool_new(SHIM_INTERP, size_t object_size)
newpool->free_list = NULL;
newpool->top_arena = NULL;
newpool->lo_arena_ptr = (void *)((size_t)-1);
newpool->hi_arena_ptr = 0;
newpool->newfree = 0;
newpool->newlast = 0;
newpool->hi_arena_ptr = NULL;
newpool->newfree = NULL;
newpool->newlast = NULL;

return newpool;
}
Expand Down
2 changes: 1 addition & 1 deletion src/scheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ handlers.

PARROT_EXPORT
void
Parrot_cx_delete_handler_local(PARROT_INTERP, ARGIN(STRING *handler_type))
Parrot_cx_delete_handler_local(PARROT_INTERP, ARGIN_NULLOK(STRING *handler_type))
{
ASSERT_ARGS(Parrot_cx_delete_handler_local)
PMC *handlers = Parrot_pcc_get_handlers(interp, interp->ctx);
Expand Down

0 comments on commit f31d6e9

Please sign in to comment.