Skip to content

Commit

Permalink
always run :load subs, no matter how something has been loaded
Browse files Browse the repository at this point in the history
  • Loading branch information
plobsing committed Dec 30, 2010
1 parent 4896bc7 commit 51ac88d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/packfile/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -734,12 +734,11 @@ do_1_sub_pragma(PARROT_INTERP, ARGMOD(PMC *sub_pmc), pbc_action_enum_t action)
break;

case PBC_MAIN:
/* run :init tagged functions */
if (Sub_comp_INIT_TEST(sub)) {
/* if loaded no need for init */
/* run :init/:load tagged functions */
if (Sub_comp_INIT_TEST(sub)
|| PObj_get_FLAGS(sub_pmc) & SUB_FLAG_PF_LOAD) {
/* only run :init/:load subs once */
Sub_comp_INIT_CLEAR(sub);

/* if inited no need for load */
PObj_get_FLAGS(sub_pmc) &= ~SUB_FLAG_PF_LOAD;

run_sub(interp, sub_pmc);
Expand Down

0 comments on commit 51ac88d

Please sign in to comment.