Skip to content

Commit

Permalink
Merge pull request lukeroth#63 from bayuemu/patch-2
Browse files Browse the repository at this point in the history
Update gdal.go
  • Loading branch information
martende authored Jan 15, 2021
2 parents 4c5dda2 + 6f20053 commit 635e469
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions gdal.go
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,28 @@ func goGDALProgressFuncProxyA(complete C.double, message *C.char, data unsafe.Po
)
}

// CPLSetConfigOption
func CPLSetConfigOption(key, val string) {

cKey := C.CString(key)
defer C.free(unsafe.Pointer(cKey))
cVal := C.CString(val)
defer C.free(unsafe.Pointer(cVal))
C.CPLSetConfigOption(cKey, cVal)
}

// CPLGetConfigOption
func CPLGetConfigOption(key, val string) string {

cKey := C.CString(key)
defer C.free(unsafe.Pointer(cKey))

cVal := C.CString(val)
defer C.free(unsafe.Pointer(cVal))
return C.GoString(C.CPLGetConfigOption(cKey, cVal))

}

/* ==================================================================== */
/* Registration/driver related. */
/* ==================================================================== */
Expand Down

0 comments on commit 635e469

Please sign in to comment.