[svn:parrot] r45995 - trunk/src
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Sat Apr 24 19:43:06 UTC 2010
Author: NotFound
Date: Sat Apr 24 19:43:05 2010
New Revision: 45995
URL: https://trac.parrot.org/parrot/changeset/45995
Log:
make sure initial_pf exists in PackFile_append_pbc
Modified:
trunk/src/packfile.c
Modified: trunk/src/packfile.c
==============================================================================
--- trunk/src/packfile.c Sat Apr 24 18:51:44 2010 (r45994)
+++ trunk/src/packfile.c Sat Apr 24 19:43:05 2010 (r45995)
@@ -4800,6 +4800,12 @@
PackFile * const pf = Parrot_pbc_read(interp, filename, 0);
if (pf) {
+ /* An embedder can try to load_bytecode without having an initial_pf */
+ if (!interp->initial_pf) {
+ interp->initial_pf = PackFile_new_dummy(interp, CONST_STRING(interp, "dummy"));
+ /* PackFile_new_dummy must never fail */
+ PARROT_ASSERT(interp->initial_pf);
+ }
PackFile_add_segment(interp, &interp->initial_pf->directory,
&pf->directory.base);
More information about the parrot-commits
mailing list