-
Notifications
You must be signed in to change notification settings - Fork 66
Open
Description
// Slice converts a Vector to a slice []T.
func (v Vector[T]) Slice() []T {
// We consider v.Data a pointer to 1st element of a slice []T
// of size v.Size and capacity v.Capacity
return unsafe.Slice(v.Data, v.Size)
}The problem is, that in most Vector implementations T is supposed to be a pointer to the Go-wrapped type, so converting it to the C slice makes no sense (and causes issues).
this should either refer to v.Data.CData or make T a C type pointer (need to design this somehow)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels