Skip to content

Commit

Permalink
fixing up SHIM args
Browse files Browse the repository at this point in the history
  • Loading branch information
petdance committed May 16, 2011
1 parent 76a525f commit ca0e38c
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions include/parrot/debugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ void PDB_disable_breakpoint(PARROT_INTERP, ARGIN(const char *command))
__attribute__nonnull__(1)
__attribute__nonnull__(2);

void PDB_disassemble(PARROT_INTERP, const char *command)
void PDB_disassemble(PARROT_INTERP, ARGIN_NULLOK(const char *command))
__attribute__nonnull__(1);

size_t PDB_disassemble_op(PARROT_INTERP,
Expand Down Expand Up @@ -335,7 +335,7 @@ void PDB_help(PARROT_INTERP, ARGIN(const char *command))
void PDB_info(PARROT_INTERP)
__attribute__nonnull__(1);

void PDB_init(PARROT_INTERP, const char *command)
void PDB_init(PARROT_INTERP, ARGIN_NULLOK(const char *command))
__attribute__nonnull__(1);

void PDB_list(PARROT_INTERP, ARGIN(const char *command))
Expand Down
6 changes: 4 additions & 2 deletions include/parrot/encoding.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,9 @@ const STR_VTABLE * Parrot_load_encoding(PARROT_INTERP,

PARROT_EXPORT
INTVAL Parrot_make_default_encoding(PARROT_INTERP,
const char *encodingname,
ARGIN(const char *encodingname),
ARGIN(STR_VTABLE *encoding))
__attribute__nonnull__(2)
__attribute__nonnull__(3);

PARROT_EXPORT
Expand Down Expand Up @@ -145,7 +146,8 @@ void Parrot_str_internal_register_encoding_names(PARROT_INTERP)
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(encodingname))
#define ASSERT_ARGS_Parrot_make_default_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(encoding))
PARROT_ASSERT_ARG(encodingname)) \
, PARROT_ASSERT_ARG(encoding))
#define ASSERT_ARGS_Parrot_new_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_register_encoding __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
Expand Down
8 changes: 5 additions & 3 deletions include/parrot/scheduler.h
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,10 @@ void Parrot_cx_schedule_timer(PARROT_INTERP,
PARROT_EXPORT
void Parrot_cx_send_message(PARROT_INTERP,
ARGIN(STRING *messagetype),
PMC *payload)
ARGIN(PMC *payload))
__attribute__nonnull__(1)
__attribute__nonnull__(2);
__attribute__nonnull__(2)
__attribute__nonnull__(3);

void Parrot_cx_check_tasks(PARROT_INTERP, ARGMOD(PMC *scheduler))
__attribute__nonnull__(1)
Expand Down Expand Up @@ -228,7 +229,8 @@ void Parrot_cx_timer_invoke(PARROT_INTERP, ARGIN(PMC *timer))
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_cx_send_message __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(messagetype))
, PARROT_ASSERT_ARG(messagetype) \
, PARROT_ASSERT_ARG(payload)))
#define ASSERT_ARGS_Parrot_cx_check_tasks __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp) \
, PARROT_ASSERT_ARG(scheduler))
Expand Down
4 changes: 2 additions & 2 deletions src/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -1957,7 +1957,7 @@ Init the program.
*/

void
PDB_init(PARROT_INTERP, SHIM(const char *command))
PDB_init(PARROT_INTERP, ARGIN_NULLOK(SHIM(const char *command)))
{
ASSERT_ARGS(PDB_init)
PDB_t * const pdb = interp->pdb;
Expand Down Expand Up @@ -2894,7 +2894,7 @@ Disassemble the bytecode.
*/

void
PDB_disassemble(PARROT_INTERP, SHIM(const char *command))
PDB_disassemble(PARROT_INTERP, ARGIN_NULLOK(SHIM(const char *command)))
{
ASSERT_ARGS(PDB_disassemble)
PDB_t * const pdb = interp->pdb;
Expand Down
2 changes: 1 addition & 1 deletion src/scheduler.c
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ Send a message to a scheduler in a different interpreter/thread.

PARROT_EXPORT
void
Parrot_cx_send_message(PARROT_INTERP, ARGIN(STRING *messagetype), SHIM(PMC *payload))
Parrot_cx_send_message(PARROT_INTERP, ARGIN(STRING *messagetype), ARGIN(SHIM(PMC *payload)))
{
ASSERT_ARGS(Parrot_cx_send_message)
if (interp->scheduler) {
Expand Down
2 changes: 1 addition & 1 deletion src/string/encoding.c
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ Sets the default encoding to C<encoding> with name C<encodingname>.

PARROT_EXPORT
INTVAL
Parrot_make_default_encoding(SHIM_INTERP, SHIM(const char *encodingname),
Parrot_make_default_encoding(SHIM_INTERP, ARGIN(SHIM(const char *encodingname)),
ARGIN(STR_VTABLE *encoding))
{
ASSERT_ARGS(Parrot_make_default_encoding)
Expand Down

0 comments on commit ca0e38c

Please sign in to comment.