diff options
author | Jan Mercl <0xjnml@gmail.com> | 2020-08-26 23:31:54 +0200 |
---|---|---|
committer | Jan Mercl <0xjnml@gmail.com> | 2020-08-26 23:31:54 +0200 |
commit | e662a135d139be00d9539517df0976318adbdfa1 (patch) | |
tree | a3f39f3ad0b653020dbd24f23ca5e32ac86fce3b /internal/testfixture/main.go | |
parent | 43c865ce5d35eb463e4a05f65e8e388364480711 (diff) |
release 1.4.0v1.4.0
Diffstat (limited to 'internal/testfixture/main.go')
-rw-r--r-- | internal/testfixture/main.go | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/internal/testfixture/main.go b/internal/testfixture/main.go deleted file mode 100644 index 02acb67..0000000 --- a/internal/testfixture/main.go +++ /dev/null @@ -1,34 +0,0 @@ -// Copyright 2020 The Sqlite Authors. All rights reserved. -// Use of this source code is governed by a BSD-style -// license that can be found in the LICENSE file. - -package testfixture - -import ( - "fmt" - "os" - "unsafe" - - "modernc.org/crt/v3" -) - -func Main() { - crt.Watch(fmt.Sprint(os.Args)) - tls := crt.NewTLS() - argv := crt.Xcalloc(tls, crt.Size_t(len(os.Args)+1), crt.Size_t(unsafe.Sizeof(uintptr(0)))) - a := []uintptr{argv} - p := argv - for _, v := range os.Args { - s := crt.Xcalloc(tls, crt.Size_t(len(v)+1), 1) - a = append(a, s) - copy((*(*[1 << 20]byte)(unsafe.Pointer(s)))[:], v) - *(*uintptr)(unsafe.Pointer(p)) = s - p += unsafe.Sizeof(uintptr(0)) - } - crt.SetEnviron(os.Environ()) - rc := main(tls, int32(len(os.Args)), argv) - for _, p := range a { - crt.Xfree(tls, p) - } - crt.Xexit(tls, rc) -} |