mirror of
https://github.com/golang/go
synced 2024-11-24 04:40:24 -07:00
e13a4d9586
When translating C types, cache the in-progress type under its parent names, so that anonymous structs can also be translated for multiple typedefs, without clashing. Standalone types are not affected by this change. Also updated the test for issue 9026 because the C struct name generation algorithm has changed. Fixes #31891 Change-Id: I00cc64852a2617ce33da13f74caec886af05b9f2 Reviewed-on: https://go-review.googlesource.com/c/go/+/181857 Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
14 lines
299 B
C
14 lines
299 B
C
// Copyright 2019 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
#include "_cgo_export.h"
|
|
|
|
void callIssue31891() {
|
|
Issue31891A a;
|
|
useIssue31891A(&a);
|
|
|
|
Issue31891B b;
|
|
useIssue31891B(&b);
|
|
}
|