Changeset 7518 for src/Pugs/Embed

Show
Ignore:
Timestamp:
10/10/05 02:24:16 (3 years ago)
Author:
autrijus
Message:

* Use the newer parrot_load_bytecode API to load PGE

code and avoid the bogus "eval". This only helps in
post-0.3.0 parrot though. sigh.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • src/Pugs/Embed/Parrot.hsc

    r6793 r7518  
    186186    cwd     <- getCurrentDirectory 
    187187    setCurrentDirectory path 
    188     evalParrot ".sub main\nload_bytecode 'PGE.pbc'\nload_bytecode 'PGE/Hs.pir'\n.end\n" 
     188    withCString "PGE.pbc" $ parrot_load_bytecode interp 
     189    withCString "PGE/Hs.pir" $ parrot_load_bytecode interp 
    189190    setCurrentDirectory cwd 
    190191    loadPGE interp path 
     
    264265    parrot_compreg :: ParrotInterp -> ParrotString -> FunPtr ParrotCompilerFunc -> IO () 
    265266 
     267foreign import ccall "Parrot_load_bytecode" 
     268    parrot_load_bytecode :: ParrotInterp -> CString -> IO () 
     269 
    266270foreign import ccall "Parrot_call_sub" 
    267271    parrot_call_sub_vv :: ParrotInterp -> ParrotPMC -> CString -> IO ()