Skip to content
Browse files

remove the ASSERT_ARGS stuff, and other things that are borking thebu…

…ild.
  • Loading branch information...
1 parent 2042095 commit 6be2b4aa79b3bb9ea5640a2dbac9dde9f9c00dfa @Whiteknight Whiteknight committed Dec 5, 2010
Showing with 41 additions and 39 deletions.
  1. +22 −22 include/parrot/api.h
  2. +19 −17 src/embed/api.c
View
44 include/parrot/api.h
@@ -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,
@@ -170,6 +155,15 @@ Parrot_Int Parrot_api_load_bytecode_bytes(
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,
Parrot_Int flags,
@@ -179,6 +173,14 @@ Parrot_Int Parrot_api_make_interpreter(
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,
Parrot_PMC pbc,
@@ -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
36 src/embed/api.c
@@ -59,7 +59,7 @@ Parrot_Int
Parrot_api_make_interpreter(Parrot_PMC parent, Parrot_Int flags,
ARGIN_NULLOK(Parrot_Init_Args *args), ARGOUT(Parrot_PMC *interp))
{
- ASSERT_ARGS(Parrot_api_make_interpreter)
+ //ASSERT_ARGS(Parrot_api_make_interpreter)
int alt_stacktop;
Parrot_Interp interp_raw;
void *stacktop_ptr = &alt_stacktop;
@@ -88,7 +88,7 @@ Parrot_Int
Parrot_api_set_runcore(Parrot_PMC interp_pmc, ARGIN(const char * corename),
Parrot_UInt trace)
{
- ASSERT_ARGS(Parrot_api_set_runcore)
+ //ASSERT_ARGS(Parrot_api_set_runcore)
EMBED_API_CALLIN(interp_pmc, interp)
if (trace) {
Parrot_pcc_trace_flags_on(interp, interp->ctx, trace);
@@ -118,7 +118,7 @@ PARROT_API
Parrot_Int
Parrot_api_debug_flag(Parrot_PMC interp_pmc, Parrot_Int flags, Parrot_Int set)
{
- ASSERT_ARGS(Parrot_api_debug_flag)
+ //ASSERT_ARGS(Parrot_api_debug_flag)
EMBED_API_CALLIN(interp_pmc, interp)
if (set)
interp->debug_flags |= flags;
@@ -131,7 +131,7 @@ PARROT_API
Parrot_Int
Parrot_api_flag(Parrot_PMC interp_pmc, Parrot_Int flags, Parrot_Int set)
{
- ASSERT_ARGS(Parrot_api_flag)
+ //ASSERT_ARGS(Parrot_api_flag)
EMBED_API_CALLIN(interp_pmc, interp)
if (set) {
Interp_flags_SET(interp, flags);
@@ -147,7 +147,7 @@ PARROT_API
Parrot_Int
Parrot_api_set_executable_name(Parrot_PMC interp_pmc, ARGIN(const char * name))
{
- ASSERT_ARGS(Parrot_api_set_executable_name)
+ //ASSERT_ARGS(Parrot_api_set_executable_name)
EMBED_API_CALLIN(interp_pmc, interp)
STRING * const name_str = Parrot_str_new(interp, name, 0);
PMC * const name_pmc = Parrot_pmc_new(interp, enum_class_String);
@@ -161,7 +161,7 @@ PARROT_API
Parrot_Int
Parrot_api_destroy_interpreter(Parrot_PMC interp_pmc)
{
- ASSERT_ARGS(Parrot_api_destroy_interpreter)
+ //ASSERT_ARGS(Parrot_api_destroy_interpreter)
EMBED_API_CALLIN(interp_pmc, interp)
Parrot_destroy(interp);
Parrot_x_exit(interp, 0);
@@ -181,14 +181,15 @@ Load a bytecode file and return a bytecode PMC.
*/
-// TODO: This only works with the inital bytecode. After this we should use
-// Parrot_append_bytecode or something similar
+/* 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))
{
- ASSERT_ARGS(Parrot_api_load_bytecode_file)
+ //ASSERT_ARGS(Parrot_api_load_bytecode_file)
EMBED_API_CALLIN(interp_pmc, interp)
PackFile * const pf = Parrot_pbc_read(interp, filename, 0);
if (!pf)
@@ -218,9 +219,10 @@ 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
+/* 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,
@@ -252,7 +254,7 @@ Parrot_Int
Parrot_api_run_bytecode(Parrot_PMC interp_pmc, Parrot_PMC pbc,
Parrot_PMC mainargs)
{
- ASSERT_ARGS(Parrot_api_run_bytecode)
+ //ASSERT_ARGS(Parrot_api_run_bytecode)
EMBED_API_CALLIN(interp_pmc, interp)
PMC * main_sub = NULL;
@@ -306,7 +308,7 @@ Parrot_Int
Parrot_api_build_argv_array(Parrot_PMC interp_pmc, Parrot_Int argc,
ARGIN(char ** argv), ARGOUT(Parrot_PMC * args))
{
- ASSERT_ARGS(Parrot_api_build_argv_array)
+ //ASSERT_ARGS(Parrot_api_build_argv_array)
EMBED_API_CALLIN(interp_pmc, interp)
PMC * const userargv = Parrot_pmc_new(interp, enum_class_ResizableStringArray);
Parrot_Int i;
@@ -325,7 +327,7 @@ PARROT_API
Parrot_Int
Parrot_api_set_warnings(Parrot_PMC interp_pmc, Parrot_Int flags)
{
- ASSERT_ARGS(Parrot_api_set_warnings)
+ //ASSERT_ARGS(Parrot_api_set_warnings)
EMBED_API_CALLIN(interp_pmc, interp)
/* Activates the given warnings. (Macro from warnings.h.) */
PARROT_WARNINGS_on(interp, flags);
@@ -337,7 +339,7 @@ Parrot_Int
Parrot_api_set_output_file(Parrot_PMC interp_pmc,
ARGIN_NULLOK(const char * filename))
{
- ASSERT_ARGS(Parrot_api_set_output_file)
+ //ASSERT_ARGS(Parrot_api_set_output_file)
EMBED_API_CALLIN(interp_pmc, interp)
if (!filename && !interp->output_file)
interp->output_file = "-";
@@ -396,7 +398,7 @@ Parrot_Int
Parrot_api_set_stdhandles(Parrot_PMC interp_pmc, Parrot_Int stdin,
Parrot_Int stdout, Parrot_Int stderr)
{
- ASSERT_ARGS(Parrot_api_set_stdhandles)
+ //ASSERT_ARGS(Parrot_api_set_stdhandles)
EMBED_API_CALLIN(interp_pmc, interp)
void *dummy;

0 comments on commit 6be2b4a

Please sign in to comment.
Something went wrong with that request. Please try again.