Author: petdance
Date: Tue Jun 5 22:34:01 2007
New Revision: 18838
Modified:
trunk/include/parrot/register.h
trunk/src/gc/register.c
Log:
adding some manual attributes rather than doing the entire headerizer thing
Modified: trunk/include/parrot/register.h
==============================================================================
--- trunk/include/parrot/register.h (original)
+++ trunk/include/parrot/register.h Tue Jun 5 22:34:01 2007
@@ -14,6 +14,7 @@
#define PARROT_REGISTER_H_GUARD
#include "parrot/string.h"
+#include "parrot/compiler.h"
/*
* Macros to make accessing registers more convenient/readable.
@@ -75,9 +76,11 @@
struct Parrot_Context; /* parrot/interpreter.h */
-struct Parrot_Context * Parrot_alloc_context(Interp *, INTVAL *n_regs_used);
+struct Parrot_Context * Parrot_alloc_context(Interp *, INTVAL *n_regs_used)
+ __attribute__nonnull__(2);
struct Parrot_Context * Parrot_dup_context(Interp *, const struct
Parrot_Context *old);
-PARROT_API struct Parrot_Context * Parrot_push_context(Interp *, INTVAL
*n_regs_used);
+PARROT_API struct Parrot_Context * Parrot_push_context(Interp *, INTVAL
*n_regs_used)
+ __attribute__nonnull__(2);
PARROT_API void Parrot_pop_context(Interp *);
PARROT_API void Parrot_free_context(Interp *, struct Parrot_Context *, int
re_use);
PARROT_API void Parrot_set_context_threshold(Interp *, struct Parrot_Context
*);
Modified: trunk/src/gc/register.c
==============================================================================
--- trunk/src/gc/register.c (original)
+++ trunk/src/gc/register.c Tue Jun 5 22:34:01 2007
@@ -121,7 +121,7 @@
/* clear active contexts all the way back to the initial context */
context = CONTEXT(interp->ctx);
while (context) {
- Parrot_Context * prev = context->caller_ctx;
+ Parrot_Context * const prev = context->caller_ctx;
mem_sys_free(context);
context = prev;
}
@@ -308,7 +308,7 @@
}
Parrot_Context *
-Parrot_push_context(Interp *interp, INTVAL *n_regs_used)
+Parrot_push_context(Interp *interp, INTVAL *n_regs_used /*NN*/)
{
Parrot_Context * const old = CONTEXT(interp->ctx);
Parrot_Context * const ctx =
@@ -335,7 +335,7 @@
Parrot_Context *
-Parrot_alloc_context(Interp *interp, INTVAL *n_regs_used)
+Parrot_alloc_context(Interp *interp, INTVAL *n_regs_used /*NN*/)
{
Parrot_Context *old, *ctx;
void *ptr, *p;