var g = require("../lib/glob")
  , gt = new g.glob_t()

console.log(g.globSync("*", 0, gt))
console.log(g.globSync("*/*.js", g.GLOB_APPEND, gt))

g.glob("*/*/*.js", g.GLOB_APPEND, gt, function (er, ok) {
  console.log(er, ok)
})

// var g = require("../lib/glob")
var g = require("../build/default/glob")

// console.log(g.globSync("*", 0))
// console.log(g.globSync("*/*.js", 0))
// console.log(g.globSync("lib/*", 0))
// console.log(g.globSync("~/*", g.GLOB_TILDE))


g.glob("*", 0, function (er, m) {
  console.log(er, m)
  g.glob("*/*.js", 0, function (er, m) {
    console.log(er, m)
    g.glob("lib/*", 0, function (er, m) {
      console.log(er, m)
      g.glob("~/*", 0 | g.GLOB_TILDE, function(er, m) {
        console.log(er, m)
        console.log("ok")
      })
    })
  })
})

Make seg faults happen. Don't quite grok why.