Skip to content

Commit

Permalink
remove dangerous comment: this is never safe to use
Browse files Browse the repository at this point in the history
  • Loading branch information
evanj committed Feb 9, 2021
1 parent 88ff5e1 commit fb6ff35
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions zstd_ctx.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ func (c *ctx) CompressLevel(dst, src []byte, level int) ([]byte, error) {
srcPtr = &src[0]
}

// This does not use the dangerous uintptr trick because NewCtx returns a Ctx interface,
// which means that Go must assume all arguments escape to the heap.
cWritten := C.ZSTD_compressCCtx(
c.cctx,
unsafe.Pointer(&dst[0]),
Expand Down

0 comments on commit fb6ff35

Please sign in to comment.