wintun: do not load dll in init()
This prevents linking to wintun.dll until it's actually needed, which should improve startup time. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
347ce76bbc
commit
ca9edf1c63
5 changed files with 21 additions and 14 deletions
|
|
@ -12,8 +12,8 @@ import (
|
|||
"unsafe"
|
||||
)
|
||||
|
||||
func newLazyDLL(name string) *lazyDLL {
|
||||
return &lazyDLL{Name: name}
|
||||
func newLazyDLL(name string, onLoad func(d *lazyDLL)) *lazyDLL {
|
||||
return &lazyDLL{Name: name, onLoad: onLoad}
|
||||
}
|
||||
|
||||
func (d *lazyDLL) NewProc(name string) *lazyProc {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue