Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
golang
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
golang
Commits
7ffe938f
Commit
7ffe938f
authored
Mar 26, 2010
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
regexp: don't return non-nil *Regexp if there is an error.
R=gri CC=golang-dev
https://golang.org/cl/787041
parent
baf53840
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
0 deletions
+6
-0
regexp.go
src/pkg/regexp/regexp.go
+3
-0
regexp.go
src/pkg/testing/regexp.go
+3
-0
No files found.
src/pkg/regexp/regexp.go
View file @
7ffe938f
...
...
@@ -664,6 +664,9 @@ func Compile(str string) (regexp *Regexp, error os.Error) {
regexp
.
expr
=
str
regexp
.
inst
=
new
(
vector
.
Vector
)
error
=
regexp
.
doParse
()
if
error
!=
nil
{
regexp
=
nil
}
return
}
...
...
src/pkg/testing/regexp.go
View file @
7ffe938f
...
...
@@ -615,6 +615,9 @@ func CompileRegexp(str string) (regexp *Regexp, error string) {
regexp
.
expr
=
str
regexp
.
inst
=
make
([]
instr
,
0
,
20
)
error
=
regexp
.
doParse
()
if
error
!=
nil
{
regexp
=
nil
}
return
}
...
...
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