nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3364c49
)
lib/re: fix invalid malloc
author
Alexis Laferrière
<alexis.laf@xymus.net>
Tue, 23 Sep 2014 19:23:47 +0000
(15:23 -0400)
committer
Alexis Laferrière
<alexis.laf@xymus.net>
Tue, 23 Sep 2014 19:23:47 +0000
(15:23 -0400)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
lib/standard/re.nit
patch
|
blob
|
history
diff --git
a/lib/standard/re.nit
b/lib/standard/re.nit
index
7baabd2
..
97cb7cb
100644
(file)
--- a/
lib/standard/re.nit
+++ b/
lib/standard/re.nit
@@
-180,7
+180,7
@@
class Regex
private var native: nullable NativeRegex = null
# Cache of a single `regmatch_t` to prevent many calls to `malloc`
- private var native_match = new NativeMatchArray.malloc(0) is lazy
+ private var native_match = new NativeMatchArray.malloc(1) is lazy
# `cflags` of the last successful `compile`
private var cflags_cache = 0