- Sort Score
- Result 10 results
- Languages All
Results 1 - 5 of 5 for cftypefix (0.18 sec)
-
src/cmd/fix/cftype.go
// This fix finds nils initializing these types and replaces the nils with 0s. func cftypefix(f *ast.File) bool { return typefix(f, func(s string) bool { return strings.HasPrefix(s, "C.") && strings.HasSuffix(s, "Ref") && s != "C.CFAllocatorRef" }) } // typefix replaces nil with 0 for all nils whose type, when passed to badType, returns true. func typefix(f *ast.File, badType func(string) bool) bool { if !imports(f, "C") { return false
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Aug 07 00:25:49 UTC 2023 - 3.5K bytes - Viewed (0) -
src/cmd/fix/cftype_test.go
// Copyright 2017 The Go 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 main func init() { addTestCases(cftypeTests, cftypefix) } var cftypeTests = []testCase{ { Name: "cftype.localVariable", In: `package main // typedef const void *CFTypeRef; import "C" func f() { var x C.CFTypeRef = nil x = nil
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Wed Nov 16 22:02:42 UTC 2022 - 3.2K bytes - Viewed (0) -
src/cmd/fix/egltype.go
// // type EGLDisplay unsafe.Pointer // // New state: // // type EGLDisplay uintptr // // This fix finds nils initializing these types and replaces the nils with 0s. func eglfixDisp(f *ast.File) bool { return typefix(f, func(s string) bool { return s == "C.EGLDisplay" }) } var eglFixConfig = fix{ name: "eglconf", date: "2020-05-30", f: eglfixConfig, desc: `Fixes initializers of EGLConfig`,
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 1.1K bytes - Viewed (0) -
src/cmd/fix/jnitype.go
// // New state: // // type jobject uintptr // // and similar for subtypes of jobject. // This fix finds nils initializing these types and replaces the nils with 0s. func jnifix(f *ast.File) bool { return typefix(f, func(s string) bool { switch s { case "C.jobject": return true case "C.jclass": return true case "C.jthrowable": return true case "C.jstring": return true case "C.jarray":
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon Apr 11 16:34:30 UTC 2022 - 1.2K bytes - Viewed (0) -
src/cmd/cgo/gcc.go
if e.Tag != dwarf.TagCompileUnit { r.SkipChildren() } } // Record types and typedef information. for i, n := range names { if strings.HasSuffix(n.Go, "GetTypeID") && types[i].String() == "func() CFTypeID" { conv.getTypeIDs[n.Go[:len(n.Go)-9]] = true } } for i, n := range names { if types[i] == nil { continue } pos := f.NamePos[n] f, fok := types[i].(*dwarf.FuncType)
Registered: Wed Jun 12 16:32:35 UTC 2024 - Last Modified: Mon May 20 15:50:06 UTC 2024 - 97K bytes - Viewed (0)