Advertisement
Guest User

Untitled

a guest
Jul 28th, 2015
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.40 KB | None | 0 0
  1. #include "c.h"
  2. #include "_cgo_export.h"
  3. #include <string.h>
  4. #include <stdio.h>
  5. #include <stdlib.h>
  6.  
  7. struct A* echo(void) {
  8. const char* p = "hello world";
  9. GoString p2;
  10. p2.p = (char*)p;
  11. p2.n = strlen(p);
  12. struct MyFunction_return v = MyFunction(1, 2, p2);
  13. printf("%ld %s\n", v.r0, v.r1);
  14. struct A* a = malloc(sizeof(*a));
  15. strcpy(a->val, "foobar");
  16. a->tag = 92;
  17. return a;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement