Re: [go-nuts] cgo godefs questions

2020-09-01 Thread 'Dan Kortschak' via golang-nuts
On Tue, 2020-09-01 at 17:03 -0700, Ian Lance Taylor wrote: > > This is a bug. Sent https://golang.org/cl/252378. > > I think that currently cgo -godefs ignores #cgo lines. This was > recently reported at https://golang.org/issue/41072. > > Ian Thanks, Ian for both of those. Dan -- You

Re: [go-nuts] Re: Efficient bitmask twiddling

2020-09-01 Thread Rob Pike
It's not a bit array, it's a bool array. Can you make it a bit array and use bit != 0 for the boolean elsewhere? -rob On Wed, Sep 2, 2020 at 5:55 AM Oliver Smith < oliver.sm...@superevilmegacorp.com> wrote: > Do godbolt links get eaten? https://godbolt.org/z/vbeobs > > On Tuesday, September 1,

Re: [go-nuts] cgo godefs questions

2020-09-01 Thread Ian Lance Taylor
On Tue, Sep 1, 2020 at 12:10 AM 'Dan Kortschak' via golang-nuts wrote: > > I am working on some C/Go interop code that includes this horror on the > C side (TYPE_BITS is 5 and NAMED_BITS is 16): > > ``` > struct sxpinfo_struct { > SEXPTYPE type : TYPE_BITS; >

[go-nuts] Re: Efficient bitmask twiddling

2020-09-01 Thread Oliver Smith
Do godbolt links get eaten? https://godbolt.org/z/vbeobs On Tuesday, September 1, 2020 at 12:53:57 PM UTC-7 Oliver Smith wrote: > In the process of developing a piece of middleware, I need to translate > from a bit-array into a bitmask. I am struggling to find a way to express > this in go

[go-nuts] Efficient bitmask twiddling

2020-09-01 Thread Oliver Smith
In the process of developing a piece of middleware, I need to translate from a bit-array into a bitmask. I am struggling to find a way to express this in go that doesn't result in terrible performance. The approaches I would try in most other languages were along the lines of: ``` mask =

[go-nuts] [security] Go 1.15.1 and Go 1.14.8 are released

2020-09-01 Thread Filippo Valsorda
Hi gophers, We have just released Go 1.15.1 and Go 1.14.8 to address a recently reported security issue. We recommend that all affected users update to one of these releases (if you’re not sure which, choose Go 1.15.1). When a Handler does not explicitly set the Content-Type header, the

[go-nuts] Re: [generics] Bugs + something else

2020-09-01 Thread Jake Montgomery
On Monday, August 31, 2020 at 8:49:00 PM UTC-4, p...@pjebs.com.au wrote: > > 1. > For this Go 2 snippet: https://go2goplay.golang.org/p/vbfBBmjxaMi > > Why can't I use square brackets when calling the constructor? > This seems to be fixed now: https://go2goplay.golang.org/p/cpKKg5qG5Ve --

[go-nuts] cgo godefs questions

2020-09-01 Thread 'Dan Kortschak' via golang-nuts
I am working on some C/Go interop code that includes this horror on the C side (TYPE_BITS is 5 and NAMED_BITS is 16): ``` struct sxpinfo_struct { SEXPTYPE type : TYPE_BITS; /* ==> (FUNSXP == 99) %% 2^5 == 3 == CLOSXP * -> warning:

Re: [go-nuts] Any way to exclude testcase(s) from 'go test'?

2020-09-01 Thread xiangdong...@gmail.com
The issue happens at building time of 'go test' for misc/cgo/test, I was expecting 'go test' is powerful enough to skip building a specific case given a negation pattern and without involving tags, but just realized it's a wrong way, 'go test' always builds all dependency stuff. Now the