Permalink
Browse files

After fixing C++ comments, I re-ran headerizer and modified these fil…

…es. But 'make' still fails at src/embed/api.c on Darwin.
  • Loading branch information...
1 parent e21ab9d commit b9cdf9ce6ca9644b284ff242ed7ec62a9d59a23a @jkeenan jkeenan committed Dec 5, 2010
Showing with 35 additions and 28 deletions.
  1. +22 −22 include/parrot/api.h
  2. +13 −6 src/embed/api.c
View
@@ -62,21 +62,6 @@ typedef struct _Parrot_Init_Args {
/* HEADERIZER BEGIN: src/embed/api.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */
-// TODO: This only works with the inital bytecode. After this we should use // Parrot_append_bytecode or something similar PARROT_API Parrot_Int Parrot_api_load_bytecode_file(
- Parrot_PMC interp_pmc,
- ARGIN(const char *filename),
- ARGOUT(Parrot_PMC * pbc))
- __attribute__nonnull__(2)
- __attribute__nonnull__(3)
- FUNC_MODIFIES(* pbc);
-
-// Load the bytecode into the interpreter, but don't execute it // TODO: This only works with the inital bytecode. After this we should use // Parrot_append_bytecode or something similar PARROT_API Parrot_Int Parrot_api_ready_bytecode(
- Parrot_PMC interp_pmc,
- Parrot_PMC pbc,
- ARGOUT(Parrot_PMC *main_sub))
- __attribute__nonnull__(3)
- FUNC_MODIFIES(*main_sub);
-
PARROT_API
Parrot_Int Parrot_api_add_dynext_search_path(
Parrot_PMC interp_pmc,
@@ -169,6 +154,15 @@ Parrot_Int Parrot_api_load_bytecode_bytes(
__attribute__nonnull__(4)
FUNC_MODIFIES(* pbcpmc);
+PARROT_API
+Parrot_Int Parrot_api_load_bytecode_file(
+ Parrot_PMC interp_pmc,
+ ARGIN(const char *filename),
+ ARGOUT(Parrot_PMC * pbc))
+ __attribute__nonnull__(2)
+ __attribute__nonnull__(3)
+ FUNC_MODIFIES(* pbc);
+
PARROT_API
Parrot_Int Parrot_api_make_interpreter(
Parrot_PMC parent,
@@ -178,6 +172,14 @@ Parrot_Int Parrot_api_make_interpreter(
__attribute__nonnull__(4)
FUNC_MODIFIES(*interp);
+PARROT_API
+Parrot_Int Parrot_api_ready_bytecode(
+ Parrot_PMC interp_pmc,
+ Parrot_PMC pbc,
+ ARGOUT(Parrot_PMC *main_sub))
+ __attribute__nonnull__(3)
+ FUNC_MODIFIES(*main_sub);
+
PARROT_API
Parrot_Int Parrot_api_run_bytecode(
Parrot_PMC interp_pmc,
@@ -227,13 +229,6 @@ Parrot_Int Parrot_api_wrap_imcc_hack(
int *result,
imcc_hack_func_t func);
-#define ASSERT_ARGS_// Parrot_append_bytecode or something similar PARROT_API Parrot_Int Parrot_api_load_bytecode_file \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(filename) \
- , PARROT_ASSERT_ARG(pbc))
-#define ASSERT_ARGS_// TODO: This only works with the inital bytecode. After this we should use // Parrot_append_bytecode or something similar PARROT_API Parrot_Int Parrot_api_ready_bytecode \
- __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
- PARROT_ASSERT_ARG(main_sub))
#define ASSERT_ARGS_Parrot_api_add_dynext_search_path \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(path))
@@ -267,8 +262,13 @@ Parrot_Int Parrot_api_wrap_imcc_hack(
__attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(pbc) \
, PARROT_ASSERT_ARG(pbcpmc))
+#define ASSERT_ARGS_Parrot_api_load_bytecode_file __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(filename) \
+ , PARROT_ASSERT_ARG(pbc))
#define ASSERT_ARGS_Parrot_api_make_interpreter __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
PARROT_ASSERT_ARG(interp))
+#define ASSERT_ARGS_Parrot_api_ready_bytecode __attribute__unused__ int _ASSERT_ARGS_CHECK = (\
+ PARROT_ASSERT_ARG(main_sub))
#define ASSERT_ARGS_Parrot_api_run_bytecode __attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
#define ASSERT_ARGS_Parrot_api_set_configuration_hash \
__attribute__unused__ int _ASSERT_ARGS_CHECK = (0)
View
@@ -172,17 +172,19 @@ Parrot_api_destroy_interpreter(Parrot_PMC interp_pmc)
=over 4
-=item C<PARROT_API Parrot_Int Parrot_api_load_bytecode_file(Parrot_PMC
-interp_pmc, const char *filename, Parrot_PMC * pbc)>
+=item C<Parrot_Int Parrot_api_load_bytecode_file(Parrot_PMC interp_pmc, const
+char *filename, Parrot_PMC * pbc)>
Load a bytecode file and return a bytecode PMC.
=cut
-*/
-
// TODO: This only works with the inital bytecode. After this we should use
// Parrot_append_bytecode or something similar
+
+*/
+
+
PARROT_API
Parrot_Int
Parrot_api_load_bytecode_file(Parrot_PMC interp_pmc,
@@ -218,9 +220,14 @@ Parrot_api_load_bytecode_bytes(Parrot_PMC interp_pmc,
EMBED_API_CALLOUT(interp_pmc, interp);
}
+/*
+ *
// Load the bytecode into the interpreter, but don't execute it
// TODO: This only works with the inital bytecode. After this we should use
// Parrot_append_bytecode or something similar
+
+*/
+
PARROT_API
Parrot_Int
Parrot_api_ready_bytecode(Parrot_PMC interp_pmc, Parrot_PMC pbc,
@@ -381,8 +388,8 @@ Parrot_api_add_dynext_search_path(Parrot_PMC interp_pmc,
/*
-=item C<PARROT_API Parrot_Int Parrot_api_set_stdhandles(Parrot_PMC interp_pmc,
-Parrot_Int stdin, Parrot_Int stdout, Parrot_Int stderr)>
+=item C<Parrot_Int Parrot_api_set_stdhandles(Parrot_PMC interp_pmc, Parrot_Int
+stdin, Parrot_Int stdout, Parrot_Int stderr)>
Set the std file descriptors for the embedded interpreter. Any file descriptor
passed as argument and set to C<PIO_INVALID_HANDLE> is ignored.

0 comments on commit b9cdf9c

Please sign in to comment.