Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
go-version: '1.23'

- name: Build
run: go build -v ./...
Expand Down
4 changes: 4 additions & 0 deletions c/ctypes_unix64.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ type (
Long = int64
Ulong = uint64
)

type (
WcharT = int32

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This adds WcharT to unix64, so 32bit/windows/unix64 now all define it — but ctypes_wasm.go (wasip1 || js) still does not. llcppg.pub maps wchar_t WcharT platform-agnostically, so on wasm targets c.WcharT is undefined and any consumer (or generated binding) referencing it won't compile. This is a pre-existing gap that this PR partially closes; consider adding WcharT = int32 to ctypes_wasm.go as well to finish making it consistent across all platforms.

)
2 changes: 2 additions & 0 deletions c/llcppg.pub
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ T int8_t Int8T
T int16_t Int16T
T int32_t Int32T
T int64_t Int64T
T int128_t Int128T
T uint8_t Uint8T
T uint16_t Uint16T
T uint32_t Uint32T
T uint64_t Uint64T
T uint128_t Uint128T
T intmax_t IntmaxT
T uintmax_t UintmaxT
T div_t DivT
Expand Down
30 changes: 30 additions & 0 deletions c/ng.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright (c) 2026 The XGo Authors (xgo.dev). All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package c

import (
"github.com/qiniu/x/xgo/ng"
)

// -----------------------------------------------------------------------------

type (
Int128T = ng.Int128
Uint128T = ng.Uint128
)

// -----------------------------------------------------------------------------
4 changes: 3 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
module github.com/goplus/lib

go 1.20
go 1.23

require github.com/qiniu/x v1.18.3
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
github.com/qiniu/x v1.18.3 h1:trrBKBNszHGwV8XynnbddJr+A7Vca8/xlWP4F/Z4my8=
github.com/qiniu/x v1.18.3/go.mod h1:Sx3Wy+0GI9OsX4a53mYj6A0o7mHJ94PUvraqGYb4EIs=
Loading