[svn:parrot] r42059 - trunk/compilers/pirc/src
kjs at svn.parrot.org
kjs at svn.parrot.org
Sat Oct 24 00:50:58 UTC 2009
Author: kjs
Date: Sat Oct 24 00:50:57 2009
New Revision: 42059
URL: https://trac.parrot.org/parrot/changeset/42059
Log:
[pirc] fix some Parrot API invocations, particularly passing STRINGs instead of C strings
Modified:
trunk/compilers/pirc/src/bcgen.c
Modified: trunk/compilers/pirc/src/bcgen.c
==============================================================================
--- trunk/compilers/pirc/src/bcgen.c Sat Oct 24 00:45:51 2009 (r42058)
+++ trunk/compilers/pirc/src/bcgen.c Sat Oct 24 00:50:57 2009 (r42059)
@@ -481,7 +481,7 @@
/* 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);
@@ -578,7 +578,10 @@
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;
More information about the parrot-commits
mailing list