File: go1_21_hash.go

package info (click to toggle)
golang-github-traefik-yaegi 0.16.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 24,608 kB
  • sloc: sh: 457; makefile: 39
file content (111 lines) | stat: -rw-r--r-- 2,448 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
// Code generated by 'yaegi extract hash'. DO NOT EDIT.

//go:build go1.21 && !go1.22
// +build go1.21,!go1.22

package stdlib

import (
	"hash"
	"reflect"
)

func init() {
	Symbols["hash/hash"] = map[string]reflect.Value{
		// type definitions
		"Hash":   reflect.ValueOf((*hash.Hash)(nil)),
		"Hash32": reflect.ValueOf((*hash.Hash32)(nil)),
		"Hash64": reflect.ValueOf((*hash.Hash64)(nil)),

		// interface wrapper definitions
		"_Hash":   reflect.ValueOf((*_hash_Hash)(nil)),
		"_Hash32": reflect.ValueOf((*_hash_Hash32)(nil)),
		"_Hash64": reflect.ValueOf((*_hash_Hash64)(nil)),
	}
}

// _hash_Hash is an interface wrapper for Hash type
type _hash_Hash struct {
	IValue     interface{}
	WBlockSize func() int
	WReset     func()
	WSize      func() int
	WSum       func(b []byte) []byte
	WWrite     func(p []byte) (n int, err error)
}

func (W _hash_Hash) BlockSize() int {
	return W.WBlockSize()
}
func (W _hash_Hash) Reset() {
	W.WReset()
}
func (W _hash_Hash) Size() int {
	return W.WSize()
}
func (W _hash_Hash) Sum(b []byte) []byte {
	return W.WSum(b)
}
func (W _hash_Hash) Write(p []byte) (n int, err error) {
	return W.WWrite(p)
}

// _hash_Hash32 is an interface wrapper for Hash32 type
type _hash_Hash32 struct {
	IValue     interface{}
	WBlockSize func() int
	WReset     func()
	WSize      func() int
	WSum       func(b []byte) []byte
	WSum32     func() uint32
	WWrite     func(p []byte) (n int, err error)
}

func (W _hash_Hash32) BlockSize() int {
	return W.WBlockSize()
}
func (W _hash_Hash32) Reset() {
	W.WReset()
}
func (W _hash_Hash32) Size() int {
	return W.WSize()
}
func (W _hash_Hash32) Sum(b []byte) []byte {
	return W.WSum(b)
}
func (W _hash_Hash32) Sum32() uint32 {
	return W.WSum32()
}
func (W _hash_Hash32) Write(p []byte) (n int, err error) {
	return W.WWrite(p)
}

// _hash_Hash64 is an interface wrapper for Hash64 type
type _hash_Hash64 struct {
	IValue     interface{}
	WBlockSize func() int
	WReset     func()
	WSize      func() int
	WSum       func(b []byte) []byte
	WSum64     func() uint64
	WWrite     func(p []byte) (n int, err error)
}

func (W _hash_Hash64) BlockSize() int {
	return W.WBlockSize()
}
func (W _hash_Hash64) Reset() {
	W.WReset()
}
func (W _hash_Hash64) Size() int {
	return W.WSize()
}
func (W _hash_Hash64) Sum(b []byte) []byte {
	return W.WSum(b)
}
func (W _hash_Hash64) Sum64() uint64 {
	return W.WSum64()
}
func (W _hash_Hash64) Write(p []byte) (n int, err error) {
	return W.WWrite(p)
}