Skip to content

Commit

Permalink
Merge pull request #79 from dominikh/unsafe-pointer
Browse files Browse the repository at this point in the history
Represent GLsync as uintptr, not unsafe.Pointer
  • Loading branch information
errcw authored May 9, 2017
2 parents 329acad + f816b66 commit 7ec9805
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion type.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ func (t Type) GoType() string {
// an integer type.
return t.pointers() + "uintptr"
case "GLsync":
return t.pointers() + "unsafe.Pointer"
// GLsync is an opaque pointer type and may not contain actual
// pointers but arbitrary numbers. Use uintptr instead of
// unsafe.Pointer, as the latter requires valid pointers.
return t.pointers() + "uintptr"
case "GLDEBUGPROC", "GLDEBUGPROCARB", "GLDEBUGPROCKHR":
// Special case mapping to the type defined in debug.tmpl
return "DebugProc"
Expand Down

0 comments on commit 7ec9805

Please sign in to comment.