Permalink
Browse files

proper format

  • Loading branch information...
1 parent a5ebb1b commit 58d73aeb62b0a82550ffe68e3e9b72678905a8d0 @FROGGS committed Sep 18, 2012
Showing with 11 additions and 15 deletions.
  1. +11 −15 README.md
View
26 README.md
@@ -1,20 +1,16 @@
p6-Inline-C
===========
-# these days on irc.freenode.net/#perl6
-23:29:59 - jnthn: FROGGS: Note that you can programatically apply the is native trait also by calling trait_mod:<is>(...) directly
-23:31:11 - jnthn: So I'd guess the inline trait can just wrap the sub. On the first call it does callsame, and the sub returns the C code (so it just contains a quote).
- It goes off and compiles this into some temporary library, then applies the native trait to the sub, which again wraps it with the native calling stuff.
+USAGE
+-----
-# this is how it should look (and work) like in the end:
+ #!/usr/bin/env perl6
-#!/usr/bin/perl6
-
-use soft; # for now
-use Inline;
-
-my sub a_plus_b( Int $a, Int $b ) is inline('C') returns Int {'
- DLLEXPORT int a_plus_b (int a, int b) {
- return a + b;
- }
-'}
+ use soft; # for now
+ use Inline;
+
+ my sub a_plus_b( Int $a, Int $b ) is inline('C') returns Int {'
+ DLLEXPORT int a_plus_b (int a, int b) {
+ return a + b;
+ }
+ '}

0 comments on commit 58d73ae

Please sign in to comment.