Advertisement
Guest User

Untitled

a guest
Apr 17th, 2014
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. struct gss_name_struct;
  2. typedef struct gss_name_struct * gss_name_t;
  3.  
  4. var output_name C.gss_name_t = &C.struct_gss_name_struct{}
  5.  
  6. // statement in the original .go file
  7. //var output_name C.gss_name_t = &C.struct_gss_name_struct{}
  8.  
  9. // output from cgo -godefs
  10. // var output_name *[0]byte = &[0]byte{}
  11.  
  12. // or more succinctly
  13. output_name := &[0]byte{}
  14.  
  15. // output_name can be converted directly to a C.gss_name_t
  16. fmt.Printf("%+vn", output_name)
  17. fmt.Printf("%+vn", C.gss_name_t(output_name))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement