Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/cgo: why does generated code refer to Go's int and uint types #3585

Closed
rsc opened this issue May 1, 2012 · 2 comments

Comments

@rsc
Copy link
Contributor

commented May 1, 2012

From discussion about CL 6131060.
I'd like to understand why these are being used.

On Tue, May 1, 2012 at 12:00, Ian Lance Taylor <iant@google.com> wrote:
> No, it fails.  In misc/cgo/test I get
>
> exports.go:10:23: unrecognized Go type int
> exports.go:10:23: unrecognized Go type int
> issue1560.go:30:24: unrecognized Go type int
> issue1560.go:30:24: unrecognized Go type int
> issue2462.go:30:18: unrecognized Go type int
> issue2462.go:30:18: unrecognized Go type int
> issue2462.go:35:19: unrecognized Go type uint
> issue2462.go:35:19: unrecognized Go type uint
@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented May 1, 2012

Comment 1:

They are needed for //export.  If you //export a Go function that uses int, cgo needs to
know the C type to use.
@rsc

This comment has been minimized.

Copy link
Contributor Author

commented May 1, 2012

Comment 2:

Thanks.

Status changed to Done.

@rsc rsc added done labels May 1, 2012

@rsc rsc self-assigned this May 1, 2012

@golang golang locked and limited conversation to collaborators Jun 24, 2016

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
3 participants
You can’t perform that action at this time.