From 2af4e37727dc6da54cd20ad7f465fc1bcc268dcd Mon Sep 17 00:00:00 2001 From: xushiwei Date: Sun, 4 Oct 2026 12:11:09 +0800 Subject: [PATCH 1/2] c: int128_t, uint128_t --- c/ctypes_unix64.go | 4 ++++ c/llcppg.pub | 2 ++ c/ng.go | 30 ++++++++++++++++++++++++++++++ go.mod | 4 +++- go.sum | 2 ++ 5 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 c/ng.go create mode 100644 go.sum diff --git a/c/ctypes_unix64.go b/c/ctypes_unix64.go index 26b4139c..bbf2802c 100644 --- a/c/ctypes_unix64.go +++ b/c/ctypes_unix64.go @@ -25,3 +25,7 @@ type ( Long = int64 Ulong = uint64 ) + +type ( + WcharT = int32 +) diff --git a/c/llcppg.pub b/c/llcppg.pub index 0c538332..c1697308 100644 --- a/c/llcppg.pub +++ b/c/llcppg.pub @@ -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 diff --git a/c/ng.go b/c/ng.go new file mode 100644 index 00000000..b4633d26 --- /dev/null +++ b/c/ng.go @@ -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 +) + +// ----------------------------------------------------------------------------- diff --git a/go.mod b/go.mod index 5c33b2dd..a80befe1 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,5 @@ module github.com/goplus/lib -go 1.20 +go 1.23 + +require github.com/qiniu/x v1.18.3 diff --git a/go.sum b/go.sum new file mode 100644 index 00000000..ff93f97b --- /dev/null +++ b/go.sum @@ -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= From 4aea6390319a0566b7df86bfd70a0cc6d5ca80dd Mon Sep 17 00:00:00 2001 From: xushiwei Date: Sun, 4 Oct 2026 12:15:38 +0800 Subject: [PATCH 2/2] ci: go1.20 => go1.23 --- .github/workflows/go.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 295c9802..be41d1e2 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -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 ./...