Skip to content

Commit

Permalink
function annotations
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.parrot.org/parrot/trunk@47931 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
petdance committed Jun 30, 2010
1 parent 4ec33b0 commit b12ac0b
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
10 changes: 9 additions & 1 deletion include/parrot/extend.h
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ void Parrot_ext_call(PARROT_INTERP,
__attribute__nonnull__(3);

PARROT_EXPORT
PARROT_PURE_FUNCTION
PARROT_WARN_UNUSED_RESULT
Parrot_Language Parrot_find_language(SHIM_INTERP, SHIM(char *language));
Parrot_Language Parrot_find_language(SHIM_INTERP,
SHIM(const char *language));

PARROT_EXPORT
int Parrot_fprintf(PARROT_INTERP,
Expand All @@ -89,22 +91,27 @@ PARROT_EXPORT
void Parrot_free_cstring(ARGFREE(char *string));

PARROT_EXPORT
PARROT_PURE_FUNCTION
Parrot_Int Parrot_get_intreg(PARROT_INTERP, Parrot_Int regnum)
__attribute__nonnull__(1);

PARROT_EXPORT
PARROT_PURE_FUNCTION
Parrot_Float Parrot_get_numreg(PARROT_INTERP, Parrot_Int regnum)
__attribute__nonnull__(1);

PARROT_EXPORT
PARROT_PURE_FUNCTION
Parrot_PMC Parrot_get_pmcreg(PARROT_INTERP, Parrot_Int regnum)
__attribute__nonnull__(1);

PARROT_EXPORT
PARROT_PURE_FUNCTION
Parrot_PMC Parrot_get_root_namespace(PARROT_INTERP)
__attribute__nonnull__(1);

PARROT_EXPORT
PARROT_PURE_FUNCTION
Parrot_String Parrot_get_strreg(PARROT_INTERP, Parrot_Int regnum)
__attribute__nonnull__(1);

Expand All @@ -127,6 +134,7 @@ Parrot_PMC Parrot_PMC_newclass(PARROT_INTERP, Parrot_PMC classtype)
__attribute__nonnull__(1);

PARROT_EXPORT
PARROT_PURE_FUNCTION
Parrot_PMC Parrot_PMC_null(void);

PARROT_EXPORT
Expand Down
12 changes: 10 additions & 2 deletions src/extend.c
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,7 @@ Return the root namespace
*/

PARROT_EXPORT
PARROT_PURE_FUNCTION
Parrot_PMC
Parrot_get_root_namespace(PARROT_INTERP)
{
Expand Down Expand Up @@ -243,6 +244,7 @@ Returns the special C<NULL> PMC.
*/

PARROT_EXPORT
PARROT_PURE_FUNCTION
Parrot_PMC
Parrot_PMC_null(void)
{
Expand Down Expand Up @@ -337,6 +339,7 @@ Return the value of an integer register.
*/

PARROT_EXPORT
PARROT_PURE_FUNCTION
Parrot_Int
Parrot_get_intreg(PARROT_INTERP, Parrot_Int regnum)
{
Expand All @@ -355,6 +358,7 @@ Return the value of a numeric register.
*/

PARROT_EXPORT
PARROT_PURE_FUNCTION
Parrot_Float
Parrot_get_numreg(PARROT_INTERP, Parrot_Int regnum)
{
Expand All @@ -373,6 +377,7 @@ Return the value of a string register.
*/

PARROT_EXPORT
PARROT_PURE_FUNCTION
Parrot_String
Parrot_get_strreg(PARROT_INTERP, Parrot_Int regnum)
{
Expand All @@ -391,6 +396,7 @@ Return the value of a PMC register.
*/

PARROT_EXPORT
PARROT_PURE_FUNCTION
Parrot_PMC
Parrot_get_pmcreg(PARROT_INTERP, Parrot_Int regnum)
{
Expand Down Expand Up @@ -513,7 +519,8 @@ Parrot_new_string(PARROT_INTERP, ARGIN_NULLOK(const char *buffer),

/*
=item C<Parrot_Language Parrot_find_language(PARROT_INTERP, char *language)>
=item C<Parrot_Language Parrot_find_language(PARROT_INTERP, const char
*language)>
Find the magic language token for a language, by language name.
Expand All @@ -522,9 +529,10 @@ Find the magic language token for a language, by language name.
*/

PARROT_EXPORT
PARROT_PURE_FUNCTION
PARROT_WARN_UNUSED_RESULT
Parrot_Language
Parrot_find_language(SHIM_INTERP, SHIM(char *language))
Parrot_find_language(SHIM_INTERP, SHIM(const char *language))
{
ASSERT_ARGS(Parrot_find_language)
return 0;
Expand Down

0 comments on commit b12ac0b

Please sign in to comment.