nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
beb2f19
)
core: fix warnings in re
author
Alexandre Terrasa
<alexandre@moz-code.org>
Wed, 20 Apr 2016 05:54:21 +0000
(
01:54
-0400)
committer
Alexandre Terrasa
<alexandre@moz-code.org>
Tue, 31 May 2016 23:43:20 +0000
(19:43 -0400)
Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
lib/core/re.nit
patch
|
blob
|
history
diff --git
a/lib/core/re.nit
b/lib/core/re.nit
index
917ec4f
..
0ac109c
100644
(file)
--- a/
lib/core/re.nit
+++ b/
lib/core/re.nit
@@
-183,7
+183,7
@@
class Regex
# Cache of a single `regmatch_t` to prevent many calls to `malloc`
private var native_match: NativeMatchArray is lazy do
native_match_is_init = true
- return new NativeMatchArray.malloc(native.re_nsub+1)
+ return new NativeMatchArray.malloc(native.as(not null).re_nsub+1)
end
private var native_match_is_init = false