-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
internal/reflect: expose stubs funcs for reflect2
Yikes. For etcd.
- Loading branch information
1 parent
9437bff
commit f1bc358
Showing
1 changed file
with
58 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
package reflect | ||
|
||
import "unsafe" | ||
|
||
// link names used by the reflect2 package, used indirectly by etcd. expose them | ||
// to let the package compile. make all of them panic to prevent usage. | ||
|
||
func unsafe_New(rtype unsafe.Pointer) unsafe.Pointer { | ||
panic("no") | ||
} | ||
|
||
func typedmemmove(rtype unsafe.Pointer, dst, src unsafe.Pointer) { | ||
panic("no") | ||
} | ||
|
||
func unsafe_NewArray(rtype unsafe.Pointer, length int) unsafe.Pointer { | ||
panic("no") | ||
} | ||
|
||
type noSliceHeader struct { | ||
Data unsafe.Pointer | ||
Len int | ||
Cap int | ||
} | ||
|
||
func typedslicecopy(elemType unsafe.Pointer, dst, src noSliceHeader) int { | ||
panic("no") | ||
} | ||
|
||
func mapassign(rtype unsafe.Pointer, m unsafe.Pointer, key, val unsafe.Pointer) { | ||
panic("no") | ||
} | ||
|
||
func mapaccess(rtype unsafe.Pointer, m unsafe.Pointer, key unsafe.Pointer) (val unsafe.Pointer) { | ||
panic("no") | ||
} | ||
|
||
type noHiter struct { | ||
key unsafe.Pointer // Must be in first position. Write nil to indicate iteration end (see cmd/internal/gc/range.go). | ||
value unsafe.Pointer // Must be in second position (see cmd/internal/gc/range.go). | ||
// rest fields are ignored | ||
} | ||
|
||
func mapiterinit(rtype unsafe.Pointer, m unsafe.Pointer) *noHiter { | ||
panic("no") | ||
} | ||
|
||
func mapiternext(it *noHiter) { | ||
panic("no") | ||
} | ||
|
||
func ifaceE2I(rtype unsafe.Pointer, src interface{}, dst unsafe.Pointer) { | ||
panic("no") | ||
} | ||
|
||
func makemap(rtype unsafe.Pointer, cap int) (m unsafe.Pointer) { | ||
panic("no") | ||
} |