1. binet
  2. go-ffi

Commits

Sebastien Binet  committed bc34897

fix doc: call lib.Close()

  • Participants
  • Parent commits 5e93a04
  • Branches default

Comments (0)

Files changed (1)

File README.rst

View file
   // dl-open a library: here, libm on macosx
   lib, err := ffi.NewLibrary("libm.dylib")
   handle_err(err)
-  
+
   // get a handle to 'cos', with the correct signature
   cos, err := lib.Fct("cos", ffi.Double, []Type{ffi.Double})
   handle_err(err)
   out := cos(0.).Float()
   println("cos(0.)=", out)
 
+  err = lib.Close()
+  handle_err(err)
 
 Limitations/TODO
 -----------------