[svn:parrot] r45220 - trunk/src/pmc
petdance at svn.parrot.org
petdance at svn.parrot.org
Sun Mar 28 01:37:48 UTC 2010
Author: petdance
Date: Sun Mar 28 01:37:48 2010
New Revision: 45220
URL: https://trac.parrot.org/parrot/changeset/45220
Log:
protecting args with ARG* macros
Modified:
trunk/src/pmc/parrotinterpreter.pmc
trunk/src/pmc/role.pmc
Modified: trunk/src/pmc/parrotinterpreter.pmc
==============================================================================
--- trunk/src/pmc/parrotinterpreter.pmc Sun Mar 28 01:11:50 2010 (r45219)
+++ trunk/src/pmc/parrotinterpreter.pmc Sun Mar 28 01:37:48 2010 (r45220)
@@ -40,8 +40,13 @@
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-static void create_interp(PMC *self, Parrot_Interp parent);
-#define ASSERT_ARGS_create_interp __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+static void create_interp(
+ ARGIN(PMC *self),
+ ARGIN_NULLOK(Parrot_Interp parent))
+ __attribute__nonnull__(1);
+
+#define ASSERT_ARGS_create_interp __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(self))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
@@ -167,7 +172,7 @@
*/
static void
-create_interp(PMC *self, Parrot_Interp parent)
+create_interp(ARGIN(PMC *self), ARGIN_NULLOK(Parrot_Interp parent))
{
Interp_flags flag = PARROT_NO_FLAGS;
Parrot_Interp new_interp;
Modified: trunk/src/pmc/role.pmc
==============================================================================
--- trunk/src/pmc/role.pmc Sun Mar 28 01:11:50 2010 (r45219)
+++ trunk/src/pmc/role.pmc Sun Mar 28 01:37:48 2010 (r45220)
@@ -54,17 +54,23 @@
/* HEADERIZER BEGIN: static */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-static void init_role_from_hash(PARROT_INTERP, PMC *self, PMC *info)
- __attribute__nonnull__(1);
+static void init_role_from_hash(PARROT_INTERP,
+ ARGIN(PMC *self),
+ ARGIN(PMC *info))
+ __attribute__nonnull__(1)
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
#define ASSERT_ARGS_init_role_from_hash __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(interp))
+ PARROT_ASSERT_ARG(interp) \
+ , PARROT_ASSERT_ARG(self) \
+ , PARROT_ASSERT_ARG(info))
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
/* HEADERIZER END: static */
/* Takes a hash and initializes the role based on it. */
static void
-init_role_from_hash(PARROT_INTERP, PMC *self, PMC *info)
+init_role_from_hash(PARROT_INTERP, ARGIN(PMC *self), ARGIN(PMC *info))
{
Parrot_Role_attributes * const role = PARROT_ROLE(self);
STRING * const ns_string = CONST_STRING(interp, "NameSpace");
More information about the parrot-commits
mailing list