Skip to content

Commit

Permalink
File is now a dynpmc, so load it
Browse files Browse the repository at this point in the history
  • Loading branch information
fperrad committed May 31, 2010
1 parent 0222330 commit c84be84
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/classes/File.pir
Expand Up @@ -20,6 +20,7 @@ Perform initializations and create the File class
.namespace ['CardinalFile']

.sub 'onload' :anon :init :load
$P0 = loadlib 'file'
.local pmc cardinalmeta
$P0 = get_hll_global ['CardinalObject'], '!CARDINALMETA'
cardinalmeta = $P0.'new_class'('CardinalFile', 'parent'=>'parrot;File IO CardinalObject', 'attr'=>'!path')
Expand Down Expand Up @@ -82,7 +83,7 @@ Perform initializations and create the File class
.local string parrot_io_mode
.local pmc jmpstack
jmpstack = new 'ResizableIntegerArray'

$S0 = self.'!to_path'(path)
local_branch jmpstack, parse_mode
open $P1, $S0, parrot_io_mode
Expand Down

0 comments on commit c84be84

Please sign in to comment.