mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
cmd/cgo: declare _GoString{Len,Ptr} in _cgo_export.h
Fixes #71226 Change-Id: I91c46a4310a9c7a9fcd1e3a131ca16e46949edb3 Reviewed-on: https://go-review.googlesource.com/c/go/+/642235 Auto-Submit: Ian Lance Taylor <iant@golang.org> Reviewed-by: David Chase <drchase@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Ian Lance Taylor <iant@google.com>
This commit is contained in:
parent
bf351677c4
commit
6adf54a3eb
2 changed files with 31 additions and 0 deletions
|
|
@ -1938,6 +1938,8 @@ const builtinExportProlog = `
|
|||
|
||||
#ifndef GO_CGO_GOSTRING_TYPEDEF
|
||||
typedef struct { const char *p; ptrdiff_t n; } _GoString_;
|
||||
extern size_t _GoStringLen(_GoString_ s);
|
||||
extern const char *_GoStringPtr(_GoString_ s);
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue