package main /* #include <stdlib.h> */ import "C" import ( "unsafe" "fmt" ) type Slice struct { Data unsafe.Pointer //万能指针类型 对应C语言中的void* len int //有效的长度 cap int //有效的容量 } const TAG = 8 /* func main() { //定义一个切片 //1.数据内…
1.Python切片对象可以为任意类型 https://github.com/python/cpython/blob/master/Include/sliceobject.h /* Slice object interface */ /* A slice object containing start, stop, and step data members (the names are from range). After much talk with Guido, it was decid…