1
1
package goquic
2
2
3
- import "sync"
3
+ import (
4
+ "sync"
5
+ "math"
6
+ )
4
7
5
8
// Generated by `ptr_gen.py ProofSource ProofVerifier ProofVerifyJob TaskRunner ServerWriter ClientWriter QuicDispatcher QuicServerSession GoQuicAlarm QuicServerStream QuicClientStream`
6
9
// Do not edit manually!
7
10
8
- const MaxInt64 = 1 << 63 - 1
9
-
10
11
11
12
var proofSourcePtr = & ProofSourcePtr {pool : make (map [int64 ]* ProofSource )}
12
13
@@ -30,7 +31,7 @@ func (p *ProofSourcePtr) Set(pt *ProofSource) int64 {
30
31
break
31
32
}
32
33
p .index += 1
33
- if p .index == MaxInt64 {
34
+ if p .index == math . MaxInt64 {
34
35
p .index = 0
35
36
}
36
37
}
@@ -67,7 +68,7 @@ func (p *ProofVerifierPtr) Set(pt *ProofVerifier) int64 {
67
68
break
68
69
}
69
70
p .index += 1
70
- if p .index == MaxInt64 {
71
+ if p .index == math . MaxInt64 {
71
72
p .index = 0
72
73
}
73
74
}
@@ -104,7 +105,7 @@ func (p *ProofVerifyJobPtr) Set(pt *ProofVerifyJob) int64 {
104
105
break
105
106
}
106
107
p .index += 1
107
- if p .index == MaxInt64 {
108
+ if p .index == math . MaxInt64 {
108
109
p .index = 0
109
110
}
110
111
}
@@ -141,7 +142,7 @@ func (p *TaskRunnerPtr) Set(pt *TaskRunner) int64 {
141
142
break
142
143
}
143
144
p .index += 1
144
- if p .index == MaxInt64 {
145
+ if p .index == math . MaxInt64 {
145
146
p .index = 0
146
147
}
147
148
}
@@ -178,7 +179,7 @@ func (p *ServerWriterPtr) Set(pt *ServerWriter) int64 {
178
179
break
179
180
}
180
181
p .index += 1
181
- if p .index == MaxInt64 {
182
+ if p .index == math . MaxInt64 {
182
183
p .index = 0
183
184
}
184
185
}
@@ -215,7 +216,7 @@ func (p *ClientWriterPtr) Set(pt *ClientWriter) int64 {
215
216
break
216
217
}
217
218
p .index += 1
218
- if p .index == MaxInt64 {
219
+ if p .index == math . MaxInt64 {
219
220
p .index = 0
220
221
}
221
222
}
@@ -252,7 +253,7 @@ func (p *QuicDispatcherPtr) Set(pt *QuicDispatcher) int64 {
252
253
break
253
254
}
254
255
p .index += 1
255
- if p .index == MaxInt64 {
256
+ if p .index == math . MaxInt64 {
256
257
p .index = 0
257
258
}
258
259
}
@@ -289,7 +290,7 @@ func (p *QuicServerSessionPtr) Set(pt *QuicServerSession) int64 {
289
290
break
290
291
}
291
292
p .index += 1
292
- if p .index == MaxInt64 {
293
+ if p .index == math . MaxInt64 {
293
294
p .index = 0
294
295
}
295
296
}
@@ -326,7 +327,7 @@ func (p *GoQuicAlarmPtr) Set(pt *GoQuicAlarm) int64 {
326
327
break
327
328
}
328
329
p .index += 1
329
- if p .index == MaxInt64 {
330
+ if p .index == math . MaxInt64 {
330
331
p .index = 0
331
332
}
332
333
}
@@ -363,7 +364,7 @@ func (p *QuicServerStreamPtr) Set(pt *QuicServerStream) int64 {
363
364
break
364
365
}
365
366
p .index += 1
366
- if p .index == MaxInt64 {
367
+ if p .index == math . MaxInt64 {
367
368
p .index = 0
368
369
}
369
370
}
@@ -400,7 +401,7 @@ func (p *QuicClientStreamPtr) Set(pt *QuicClientStream) int64 {
400
401
break
401
402
}
402
403
p .index += 1
403
- if p .index == MaxInt64 {
404
+ if p .index == math . MaxInt64 {
404
405
p .index = 0
405
406
}
406
407
}
0 commit comments