[jruby-joni] 131/279: Be more thrifty wrt code buffer.
Hideki Yamane
henrich at moszumanska.debian.org
Mon Nov 16 11:27:14 UTC 2015
This is an automated email from the git hooks/post-receive script.
henrich pushed a commit to branch debian/sid
in repository jruby-joni.
commit 6407ffb6185af2f23b5c3505ccb4871a54824562
Author: Marcin Mielzynski <lopx at gazeta.pl>
Date: Sun Mar 11 15:38:36 2012 +0100
Be more thrifty wrt code buffer.
---
src/org/joni/ArrayCompiler.java | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/org/joni/ArrayCompiler.java b/src/org/joni/ArrayCompiler.java
index cbeec20..ac21d0e 100644
--- a/src/org/joni/ArrayCompiler.java
+++ b/src/org/joni/ArrayCompiler.java
@@ -56,7 +56,8 @@ final class ArrayCompiler extends Compiler {
@Override
protected final void prepare() {
- code = new int[(analyser.stop - analyser.p) * 2 + 1]; // (+1: empty regex)
+ int codeSize = Config.USE_STRING_TEMPLATES ? 8 : ((analyser.getEnd() - analyser.getBegin()) * 2 + 2);
+ code = new int[codeSize];
codeLength = 0;
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-java/jruby-joni.git
More information about the pkg-java-commits
mailing list