Skip to content

Instantly share code, notes, and snippets.

@cygx
Created November 1, 2015 09:42
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cygx/f03cf3083ded901ccb2a to your computer and use it in GitHub Desktop.
Save cygx/f03cf3083ded901ccb2a to your computer and use it in GitHub Desktop.
use NativeCall;
use Native::Types;
use TinyCC::Eval;
my $i := cref(longlong);
$i = 123;
EVAL q:to/__END__/, :lang<C>, :symbols(i => $i.VAR.ptr);
extern long long i;
int printf(const char *, ...);
int main() {
printf("%lli", i);
i = 45;
}
__END__
say $i;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment