Skip to content

cmd/cgo: some cgo messages mention C.unsignedchar but that is not a valid type #13635

Closed
@bits01

Description

@bits01

When using C.uchar in code and getting some compilation errors, the error message mentions C.unsignedchar but that doesn't seem the be a valid type.

package main

import "C"

import "fmt"

func main() {
    var c C.uchar = "5"
    //var c C.unsignedchar = 5

    fmt.Println(c)
}


% go run main.go
# command-line-arguments
./main.go:8: cannot use "5" (type string) as type C.unsignedchar in assignment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions