Browse files

Replace a couple of calls to

make_interpreter() with Parrot_new().


git-svn-id: https://svn.parrot.org/parrot/trunk@12076 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information...
1 parent a725410 commit a25ee79ae13827bbef3778d487b9e314f5ad5888 @bschmalhofer bschmalhofer committed Mar 29, 2006
Showing with 13 additions and 16 deletions.
  1. +3 −3 docs/embed.pod
  2. +1 −1 docs/tests.pod
  3. +0 −2 examples/c/test_main.c
  4. +1 −1 include/parrot/interpreter.h
  5. +0 −1 src/embed.c
  6. +2 −2 src/exec.c
  7. +2 −2 src/pbc_info.c
  8. +1 −1 src/pbc_merge.c
  9. +1 −1 src/pdump.c
  10. +2 −2 src/runops_cores.c
View
6 docs/embed.pod
@@ -12,18 +12,18 @@ embed.pod - Parrot embedding system
int main(int argc, char *argv[]) {
Parrot_Interp interp;
Parrot_PackFile pf;
- char *bcfile="program.pbc";
+ char * bcfile = "program.pbc";
argc--; argv++; /* skip the program name */
- interp=Parrot_new(0);
+ interp=Parrot_new(NULL);
Parrot_init(interp);
if(PARROT_JIT_CAPABLE) {
Parrot_set_run_core(interp, PARROT_JIT_CORE); /* activate JIT */
}
- pf=Parrot_readbc(interp, bcfile);
+ pf = Parrot_readbc(interp, bcfile);
Parrot_loadbc(interp, pf);
Parrot_runcode(interp, argc, argv); /* argc and argv as seen by the bytecode file */
View
2 docs/tests.pod
@@ -105,7 +105,7 @@ C source tests are usually located in F<t/src/*.t>. A simple test looks like:
interpreter = Parrot_new(NULL);
if (!interpreter)
- return 1;
+ return 1;
Parrot_init(interpreter);
Parrot_run_native(interpreter, the_test);
View
2 examples/c/test_main.c
@@ -74,11 +74,9 @@ main(int argc, char *argv[])
Parrot_PackFile pf;
interpreter = Parrot_new(NULL);
-
if (!interpreter) {
return 1;
}
-
Parrot_init(interpreter);
filename = parseflags(interpreter, &argc, &argv);
View
2 include/parrot/interpreter.h
@@ -1,5 +1,5 @@
/* interpreter.h
- * Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
+ * Copyright: 2001-2006 The Perl Foundation. All Rights Reserved.
* SVN Info
* $Id$
* Overview:
View
1 src/embed.c
@@ -75,7 +75,6 @@ Use this function when you call into Parrot before entering a run loop.
void
Parrot_init(Interp *interpreter)
{
-
if (!interpreter->world_inited) {
/* global_setup.c:init_world sets up some vtable stuff.
* It must only be called once.
View
4 src/exec.c
@@ -1,5 +1,5 @@
/*
-Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
+Copyright: 2001-2006 The Perl Foundation. All Rights Reserved.
$Id$
=head1 NAME
@@ -35,7 +35,7 @@ static int symbol_list_find(Parrot_exec_objfile_t *obj, const char *func_name);
* Parrot_exec_run must be 0 while the program runs.
* It will be set to 2 inside eval (s. eval.pmc)
* to switch to runops_jit (s. interpreter.c:runops_exec()).
- * Must be 1 while starting the compiled code to have make_interpreter
+ * Must be 1 while starting the compiled code to have Parrot_new()
* return the address of the global interpreter (s. interpreter.c)
* and PackFile_ConstTable_unpack use the global const_table (s. packfile.c).
* Must also be 1 while generating the executable.
View
4 src/pbc_info.c
@@ -60,13 +60,13 @@ the directory using PackFile_map_segments() and iter().
*/
int
-main(int argc, char **argv)
+main(int argc, char * argv[] )
{
struct PackFile *pf;
Interp *interpreter;
struct PackFile_Segment *seg;
- interpreter = make_interpreter(NULL, PARROT_NO_FLAGS);
+ interpreter = Parrot_new(NULL);
Parrot_init(interpreter);
pf = Parrot_readbc(interpreter, argv[1]);
View
2 src/pbc_merge.c
@@ -722,7 +722,7 @@ main(int argc, char **argv)
int i;
/* Create a Parrot interpreter. */
- interpreter = make_interpreter(NULL, PARROT_NO_FLAGS);
+ interpreter = Parrot_new(NULL);
Parrot_init(interpreter);
Parrot_block_DOD(interpreter);
View
2 src/pdump.c
@@ -209,7 +209,7 @@ main(int argc, char **argv)
if (argc < 2) {
help();
}
- interpreter = make_interpreter(NULL, PARROT_NO_FLAGS);
+ interpreter = Parrot_new(NULL);
/* init and set top of stack */
Parrot_init_stacktop(interpreter, &status);
while ((status = longopt_get(interpreter,
View
4 src/runops_cores.c
@@ -1,5 +1,5 @@
/*
-Copyright: 2001-2003 The Perl Foundation. All Rights Reserved.
+Copyright: 2001-2006 The Perl Foundation. All Rights Reserved.
$Id$
=head1 NAME
@@ -120,7 +120,7 @@ runops_trace_core(Interp *interpreter, opcode_t *pc)
debugger = interpreter->debugger =
/*
- * using a distinc interpreter for tracing should be ok
+ * using a distinct interpreter for tracing should be ok
* - just in case, make it easy to switch
*/
#if 1

0 comments on commit a25ee79

Please sign in to comment.