Changeset 3961 for src/Pugs/Types/Hash.hs
- Timestamp:
- 05/27/05 05:22:52 (4 years ago)
- svk:copy_cache_prev:
- 5515
- Files:
-
- 1 modified
-
src/Pugs/Types/Hash.hs (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
src/Pugs/Types/Hash.hs
r3947 r3961 120 120 instance HashClass PerlSV where 121 121 hash_iType = const $ mkType "Hash::Perl" 122 hash_fetchVal sv key = do 123 keySV <- fromVal $ castV key 124 evalPerl5Sub "sub { $_[0]->{$_[1]} }" [sv, keySV] 122 125 hash_clear _ = retConstError undef 123 126 hash_store _ _ = retConstError undef 124 hash_storeVal _ _ _ = retConstError undef 127 hash_storeVal sv key val = do 128 keySV <- fromVal $ castV key 129 valSV <- fromVal val 130 evalPerl5Sub "sub { $_[0]->{$_[1]} = $_[2] }" [sv, keySV, valSV] 131 return () 125 132 hash_storeElem _ _ _ = retConstError undef 126 133 hash_deleteElem _ _ = retConstError undef
