From b8fccaa364d117c46bb34bd6fa4ae3d84a142b30 Mon Sep 17 00:00:00 2001 From: Alan Donovan Date: Sun, 22 Nov 2015 16:39:41 -0500 Subject: [PATCH] errata: gopl.io/ch13/bzip on p.362 --- errata.html | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/errata.html b/errata.html index 32a6a2b..97cc74a 100644 --- a/errata.html +++ b/errata.html @@ -69,5 +69,20 @@ pre { p.166, ΒΆ2: for "way", read "a way".

+

+ p.362: the gopl.io/ch13/bzip program + does not comply with the + proposed rules for passing pointers between Go and C code + because the C function bz2compress temporarily stores a Go + pointer (in) into the Go heap + (the bzstream variable). + + The bz_stream variable should be allocated, and + explicitly freed after the call to + BZ2_bzCompressEnd, by C functions. + + (Thanks to Joe Tsai, 2015-11-18.) +

+