Skip to content

Commit

Permalink
Fix type mismatch on Windows
Browse files Browse the repository at this point in the history
It's C.size_t and not C.ulong (apparently size_t is a ulonglong on
Windows).
  • Loading branch information
aykevl committed Sep 18, 2023
1 parent b1e2b88 commit 9edb640
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ir.go
Original file line number Diff line number Diff line change
Expand Up @@ -919,7 +919,7 @@ func (v Value) IsConstantString() bool {

// ConstGetAsString will return the string contained in a constant.
func (v Value) ConstGetAsString() string {
length := C.ulong(0)
length := C.size_t(0)
cstr := C.LLVMGetAsString(v.C, &length)
return C.GoStringN(cstr, C.int(length))
}
Expand Down

0 comments on commit 9edb640

Please sign in to comment.