Skip to content

Instantly share code, notes, and snippets.

@vbatts
Created August 4, 2015 19:35
Show Gist options
  • Save vbatts/fddc81848e510b9c56de to your computer and use it in GitHub Desktop.
Save vbatts/fddc81848e510b9c56de to your computer and use it in GitHub Desktop.
package main
/*
#include <inttypes.h>
struct dm_deps {
uint32_t count;
uint32_t filler;
uint64_t device[0];
};
*/
import "C"
import "fmt"
func main() {
deps := &C.struct_dm_deps{}
fmt.Printf("%#v\n", deps)
// go version go1.4.2 linux/amd64
// &main._Ctype_struct_dm_deps{count:0x0, filler:0x0, device:[0]main._Ctype_uint64_t{}}
// go version devel +d3ffc97 Wed Jul 29 23:50:20 2015 +0000 linux/amd64
// &main._Ctype_struct_dm_deps{count:0x0, filler:0x0}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment