Skip to content
Browse files

Dynamagically load OS. Fixes t/file/dir.t

1 parent 4f96cac commit df0b3aaf0be746546fd6891fd185532c51d255ac @tadzik tadzik committed May 17, 2011
Showing with 6 additions and 0 deletions.
  1. +2 −0 src/classes/Dir.pir
  2. +2 −0 src/classes/File.pir
  3. +2 −0 src/classes/FileStat.pir
View
2 src/classes/Dir.pir
@@ -23,6 +23,8 @@ Perform initializations and create the Dir class
.local pmc cardinalmeta
$P0 = get_hll_global ['CardinalObject'], '!CARDINALMETA'
cardinalmeta = $P0.'new_class'('Dir', 'parent'=>'CardinalObject', 'attr'=>'!umask')
+ # XXX Throw some sort of runtime exception unless loadlib succeeded
+ $P1 = loadlib 'os'
.end
#.sub 'new' :method
View
2 src/classes/File.pir
@@ -25,6 +25,8 @@ Perform initializations and create the File class
$P0 = get_hll_global ['CardinalObject'], '!CARDINALMETA'
cardinalmeta = $P0.'new_class'('CardinalFile', 'parent'=>'parrot;File IO CardinalObject', 'attr'=>'!path')
$P0.'register'('File', 'parent'=>'CardinalObject', 'protoobject'=>cardinalmeta)
+ # XXX Throw some sort of runtime exception unless loadlib succeeded
+ $P1 = loadlib 'os'
.end
.sub 'get_bool' :vtable
View
2 src/classes/FileStat.pir
@@ -26,6 +26,8 @@ Perform initializations and create the File Stat class
$P0 = get_hll_global ['CardinalObject'], '!CARDINALMETA'
cardinalmeta = $P0.'new_class'('FileStat', 'parent'=>'CardinalObject', 'attr'=>'!path')
#$P0.'register'('File', 'parent'=>'CardinalObject', 'protoobject'=>cardinalmeta)
+ # XXX Throw some sort of runtime exception unless loadlib succeeded
+ $P1 = loadlib 'os'
.end
.sub 'get_bool' :vtable

0 comments on commit df0b3aa

Please sign in to comment.
Something went wrong with that request. Please try again.