Permalink
Browse files

Decorate some embed api functions and rerun headerizer

  • Loading branch information...
1 parent 7c4b6f8 commit c9c5a00e65f88a45e7114bcc211c1cfc508aa00e @leto leto committed Jun 19, 2011
Showing with 25 additions and 14 deletions.
  1. +20 −9 include/parrot/api.h
  2. +5 −5 src/embed/api.c
View
@@ -109,8 +109,9 @@ Parrot_Int Parrot_api_flag(
PARROT_API
Parrot_Int Parrot_api_get_compiler(
Parrot_PMC interp_pmc,
- Parrot_String type,
+ ARGIN(Parrot_String type),
ARGOUT(Parrot_PMC *compiler))
+ __attribute__nonnull__(2)
__attribute__nonnull__(3)
FUNC_MODIFIES(*compiler);
@@ -148,7 +149,8 @@ Parrot_Int Parrot_api_get_runtime_path(
PARROT_API
Parrot_Int Parrot_api_load_language(
Parrot_PMC interp_pmc,
- Parrot_String lang);
+ ARGIN(Parrot_String lang))
+ __attribute__nonnull__(2);
PARROT_API
Parrot_Int Parrot_api_make_interpreter(
@@ -162,13 +164,17 @@ Parrot_Int Parrot_api_make_interpreter(
PARROT_API
Parrot_Int Parrot_api_reset_call_signature(
Parrot_PMC interp_pmc,
- Parrot_PMC ctx);
+ ARGMOD(Parrot_PMC ctx))
+ __attribute__nonnull__(2)
+ FUNC_MODIFIES(ctx);
PARROT_API
Parrot_Int Parrot_api_set_compiler(
Parrot_PMC interp_pmc,
- Parrot_String type,
- Parrot_PMC compiler);
+ ARGIN(Parrot_String type),
+ ARGIN(Parrot_PMC compiler))
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3);
PARROT_API
Parrot_Int Parrot_api_set_configuration_hash(
@@ -228,7 +234,8 @@ Parrot_Int Parrot_api_wrap_pointer(
__attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_flag __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_get_compiler __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(compiler))
+ PARROT_ASSERT_ARG(type) \
+ , PARROT_ASSERT_ARG(compiler))
#define ASSERT_ARGS_Parrot_api_get_exception_backtrace \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(bt))
@@ -239,12 +246,16 @@ Parrot_Int Parrot_api_wrap_pointer(
, PARROT_ASSERT_ARG(errmsg))
#define ASSERT_ARGS_Parrot_api_get_runtime_path __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(runtime))
-#define ASSERT_ARGS_Parrot_api_load_language __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+#define ASSERT_ARGS_Parrot_api_load_language __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(lang))
#define ASSERT_ARGS_Parrot_api_make_interpreter __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
#define ASSERT_ARGS_Parrot_api_reset_call_signature \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
-#define ASSERT_ARGS_Parrot_api_set_compiler __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
+ __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(ctx))
+#define ASSERT_ARGS_Parrot_api_set_compiler __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(type) \
+ , PARROT_ASSERT_ARG(compiler))
#define ASSERT_ARGS_Parrot_api_set_configuration_hash \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_set_executable_name \
View
@@ -524,7 +524,7 @@ otherwise.
PARROT_API
Parrot_Int
-Parrot_api_load_language(Parrot_PMC interp_pmc, Parrot_String lang)
+Parrot_api_load_language(Parrot_PMC interp_pmc, ARGIN(Parrot_String lang))
{
ASSERT_ARGS(Parrot_api_load_language)
EMBED_API_CALLIN(interp_pmc, interp)
@@ -546,7 +546,7 @@ value if this call is successful and false value otherwise.
PARROT_API
Parrot_Int
-Parrot_api_get_compiler(Parrot_PMC interp_pmc, Parrot_String type,
+Parrot_api_get_compiler(Parrot_PMC interp_pmc, ARGIN(Parrot_String type),
ARGOUT(Parrot_PMC *compiler))
{
ASSERT_ARGS(Parrot_api_get_compiler)
@@ -569,8 +569,8 @@ value if this call is successful and false value otherwise.
PARROT_API
Parrot_Int
-Parrot_api_set_compiler(Parrot_PMC interp_pmc, Parrot_String type,
- Parrot_PMC compiler)
+Parrot_api_set_compiler(Parrot_PMC interp_pmc, ARGIN(Parrot_String type),
+ ARGIN(Parrot_PMC compiler))
{
ASSERT_ARGS(Parrot_api_set_compiler)
EMBED_API_CALLIN(interp_pmc, interp)
@@ -618,7 +618,7 @@ Reset the call signature
PARROT_API
Parrot_Int
-Parrot_api_reset_call_signature(Parrot_PMC interp_pmc, Parrot_PMC ctx)
+Parrot_api_reset_call_signature(Parrot_PMC interp_pmc, ARGMOD(Parrot_PMC ctx))
{
ASSERT_ARGS(Parrot_api_reset_call_signature)
EMBED_API_CALLIN(interp_pmc, interp)

0 comments on commit c9c5a00

Please sign in to comment.