Created
July 10, 2011 16:03
-
-
Save jnthn/1074649 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
method scalar_wrap($obj) { | |
my $scalar_type := self.find_symbol(['Scalar']); | |
my $scalar := nqp::create($scalar_type); | |
my $slot := self.add_object($scalar); | |
nqp::bindattr($scalar, $scalar_type, '$!value', $obj); | |
# XXX we do deserialization later... | |
$scalar; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment