]> Cypherpunks repositories - gostls13.git/commit
misc/swig/stdio: fix broken nil pointer test
authorShenghou Ma <minux@golang.org>
Wed, 7 Jan 2015 06:23:45 +0000 (01:23 -0500)
committerMinux Ma <minux@golang.org>
Wed, 7 Jan 2015 23:24:23 +0000 (23:24 +0000)
commit583293349bccd62341f53941ccc68556563efd76
tree8d538d51ca0a8b7091776b827d63399d49de2a30
parent8c69ce0b90d15e35d6f03f6af530fd6af47e276c
misc/swig/stdio: fix broken nil pointer test

SWIG has always returned a typed interface value for a C++ class,
so the interface value will never be nil even if the pointer itself
is NULL. ptr == NULL in C/C++ should be ptr.Swigcptr() == 0 in Go.

Fixes #9514.

Change-Id: I3778b91acf54d2ff22d7427fbf2b6ec9b9ce3b43
Reviewed-on: https://go-review.googlesource.com/2440
Reviewed-by: Ian Lance Taylor <iant@golang.org>
misc/swig/stdio/file_test.go