forked from golang/go
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmd/cgo: map C unsigned char back to _Ctype_uchar in error messages
Fixes golang#13635. Change-Id: Icab4a45567f435f002a8f6c85db9538acf054a70 Reviewed-on: https://go-review.googlesource.com/17863 Run-TryBot: Minux Ma <[email protected]> TryBot-Result: Gobot Gobot <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]>
- Loading branch information
Showing
3 changed files
with
34 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright 2015 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. | ||
|
||
// issue 13635: used to output error about C.unsignedchar. | ||
// This test tests all such types. | ||
|
||
package pkg | ||
|
||
import "C" | ||
|
||
func main() { | ||
var ( | ||
_ C.uchar = "uc" // ERROR HERE | ||
_ C.schar = "sc" // ERROR HERE | ||
_ C.ushort = "us" // ERROR HERE | ||
_ C.uint = "ui" // ERROR HERE | ||
_ C.ulong = "ul" // ERROR HERE | ||
_ C.longlong = "ll" // ERROR HERE | ||
_ C.ulonglong = "ull" // ERROR HERE | ||
_ C.complexfloat = "cf" // ERROR HERE | ||
_ C.complexdouble = "cd" // ERROR HERE | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters