Skip to content

Commit

Permalink
[pirc] fix some Parrot API invocations, particularly passing STRINGs …
Browse files Browse the repository at this point in the history
…instead of C strings

git-svn-id: https://svn.parrot.org/parrot/trunk@42059 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
  • Loading branch information
kjs committed Oct 24, 2009
1 parent 8bd1f34 commit 8e08162
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/bcgen.c
Expand Up @@ -481,7 +481,7 @@ new_bytecode(PARROT_INTERP, ARGIN(char const * const filename))

/* create segments */
PARROT_ASSERT(filename != NULL);
interp->code = PF_create_default_segs(interp, filename, 1);
interp->code = PF_create_default_segs(interp, Parrot_str_new(interp, filename, strlen(filename)), 1);

/* add interpreter globals to bytecode. XXX Why is this? */
self = VTABLE_get_pmc_keyed_int(interp, interp->iglobals, IGLOBALS_INTERPRETER);
Expand Down Expand Up @@ -578,7 +578,10 @@ create_annotations_segment(ARGIN(bytecode * const bc), ARGIN(char const * const
bc->interp->code->annotations = (PackFile_Annotations*)
PackFile_Segment_new_seg(bc->interp,
bc->interp->code->base.dir,
PF_ANNOTATIONS_SEG, segment_name, 1);
PF_ANNOTATIONS_SEG,
Parrot_str_new(bc->interp, segment_name,
strlen(segment_name)),
1);

bc->interp->code->annotations->code = bc->interp->code;

Expand Down

0 comments on commit 8e08162

Please sign in to comment.