File tree Expand file tree Collapse file tree 2 files changed +23
-0
lines changed
Expand file tree Collapse file tree 2 files changed +23
-0
lines changed Original file line number Diff line number Diff line change 8585 dotnet-version : ' 9.x'
8686 if : matrix.lang == 'csharp'
8787
88+ - name : Setup Go
89+ uses : actions/setup-go@v5
90+ with :
91+ go-version : 1.25.4
92+ if : matrix.lang == 'go'
93+
8894 # Hacky work-around for https://github.com/dotnet/runtime/issues/80619
8995 - run : dotnet new console -o /tmp/foo
9096 if : matrix.os != 'windows-latest' && matrix.lang == 'csharp'
Original file line number Diff line number Diff line change @@ -6,6 +6,23 @@ import (
66 "unsafe"
77)
88
9+ type Handle struct {
10+ value int32
11+ }
12+
13+ func (self * Handle ) Use () int32 {
14+ if self .value == 0 {
15+ panic ("nil handle" )
16+ }
17+ return self .value
18+ }
19+
20+ func (self * Handle ) Take () int32 {
21+ value := self .value
22+ self .value = 0
23+ return value
24+ }
25+
926func Allocate (pinner * runtime.Pinner , size , align uintptr ) unsafe.Pointer {
1027 pointer := allocateRaw (size , align )
1128 pinner .Pin (pointer )
You can’t perform that action at this time.
0 commit comments