Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
21c65e8f
Commit
21c65e8f
authored
Jan 27, 2012
by
Rémy Oudompheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cgo: accept null pointers in gccgo flavour of C.GoString.
R=golang-dev, rsc CC=golang-dev
https://golang.org/cl/5569074
parent
75397e65
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
src/cmd/cgo/out.go
src/cmd/cgo/out.go
+2
-1
No files found.
src/cmd/cgo/out.go
View file @
21c65e8f
...
@@ -786,7 +786,8 @@ const char *CString(struct __go_string s) {
...
@@ -786,7 +786,8 @@ const char *CString(struct __go_string s) {
}
}
struct __go_string GoString(char *p) {
struct __go_string GoString(char *p) {
return __go_byte_array_to_string(p, strlen(p));
int len = (p != NULL) ? strlen(p) : 0;
return __go_byte_array_to_string(p, len);
}
}
struct __go_string GoStringN(char *p, int n) {
struct __go_string GoStringN(char *p, int n) {
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment