• Keith Randall's avatar
    cmd/cgo: special case C ptr types to use uintptr · b868616b
    Keith Randall authored
    Some C types are declared as pointers, but C code
    stores non-pointers in them.  When the Go garbage
    collector sees such a pointer, it gets unhappy.
    
    Instead, for these types represent them on the Go
    side with uintptr.
    
    We need this change to handle Apple's CoreFoundation
    CF*Ref types. Users of these types might need to
    update their code like we do in root_cgo_darwin.go.
    The only change that is required under normal
    circumstances is converting some nils to 0.
    A go fix module is provided to help.
    
    Fixes #21897
    
    RELNOTE=yes
    
    Change-Id: I9716cfb255dc918792625f42952aa171cd31ec1b
    Reviewed-on: https://go-review.googlesource.com/66332
    Run-TryBot: Keith Randall <khr@golang.org>
    Reviewed-by: 's avatarRobert Griesemer <gri@golang.org>
    Reviewed-by: 's avatarIan Lance Taylor <iant@golang.org>
    b868616b
Name
Last commit
Last update
..
cftype.go Loading commit data...
cftype_test.go Loading commit data...
context.go Loading commit data...
context_test.go Loading commit data...
doc.go Loading commit data...
fix.go Loading commit data...
gotypes.go Loading commit data...
gotypes_test.go Loading commit data...
import_test.go Loading commit data...
main.go Loading commit data...
main_test.go Loading commit data...
netipv6zone.go Loading commit data...
netipv6zone_test.go Loading commit data...
printerconfig.go Loading commit data...
printerconfig_test.go Loading commit data...
typecheck.go Loading commit data...