Skip to content
Permalink
Browse files

Extract Vips stuff into vips.go and CString stuff into c_strings.go

  • Loading branch information...
DarthSim committed Jun 6, 2019
1 parent 71e720c commit fa224981af230ad1b279524c57cbebe30fce0f96
Showing with 763 additions and 711 deletions.
  1. +16 −0 c_strings.go
  2. +70 −711 process.go
  3. +677 −0 vips.go
@@ -0,0 +1,16 @@
package main

import "C"

var cStringsCache = make(map[string]*C.char)

func cachedCString(str string) *C.char {
if cstr, ok := cStringsCache[str]; ok {
return cstr
}

cstr := C.CString(str)
cStringsCache[str] = cstr

return cstr
}

0 comments on commit fa22498

Please sign in to comment.
You can’t perform that action at this time.