Skip to content

Commit f75a893

Browse files
committed
Changed maxmem argument from int32 to int64.
1 parent 5fc9239 commit f75a893

File tree

3 files changed

+12
-12
lines changed

3 files changed

+12
-12
lines changed

com.ibm.streamsx.regex/com.ibm.streamsx.regex.re2/native.function/function.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@
1010
</function>
1111
<function>
1212
<description>Compiles regex pattern and indexes it, additionally allows to control max memory allocated.</description>
13-
<prototype>&lt;enum E> public boolean regexCompile(rstring pattern, E patternIndex, int32 maxmem)</prototype>
13+
<prototype>&lt;enum E> public boolean regexCompile(rstring pattern, E patternIndex, int64 maxmem)</prototype>
1414
</function>
1515
<function>
1616
<description>Compiles regex pattern and indexes it - static version</description>
1717
<prototype>&lt;enum E> public boolean regexCompileStatic(rstring pattern, E patternIndex)</prototype>
1818
</function>
1919
<function>
2020
<description>Compiles regex pattern and indexes it - static version, additionally allows to control max memory allocated.</description>
21-
<prototype>&lt;enum E> public boolean regexCompileStatic(rstring pattern, E patternIndex, int32 maxmem)</prototype>
21+
<prototype>&lt;enum E> public boolean regexCompileStatic(rstring pattern, E patternIndex, int64 maxmem)</prototype>
2222
</function>
2323
<function>
2424
<description>Tries to match the whole string with the pattern - doesn't use compiled regex.</description>

com.ibm.streamsx.regex/impl/include/Regex.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,40 +23,40 @@ namespace regex {
2323
}
2424

2525
template<typename Index, typename OP>
26-
inline RE2::Options& getRE2Options(int maxmem){
26+
inline RE2::Options& getRE2Options(long maxmem){
2727
static RE2::Options options;
2828
options.set_log_errors(true);
2929
options.set_max_mem(maxmem);
3030
return options;
3131
}
3232

3333
template<typename Index>
34-
inline RE2::Options& getRE2OptionsStatic(int maxmem){
34+
inline RE2::Options& getRE2OptionsStatic(long maxmem){
3535
static RE2::Options options;
3636
options.set_log_errors(true);
3737
options.set_max_mem(maxmem);
3838
return options;
3939
}
4040

4141
template<typename Index, typename OP>
42-
inline RE2& getRE2(const SPL::rstring & pattern="", int maxmem=1000000){
42+
inline RE2& getRE2(const SPL::rstring & pattern="", long maxmem=1000000){
4343
static RE2 regex(re2::StringPiece(pattern.data(), pattern.size()), getRE2Options<Index,OP>(maxmem));
4444
return regex;
4545
}
4646

4747
template<typename Index>
48-
inline RE2& getRE2Static(const SPL::rstring & pattern="", int maxmem=1000000){
48+
inline RE2& getRE2Static(const SPL::rstring & pattern="", long maxmem=1000000){
4949
static RE2 regex(re2::StringPiece(pattern.data(), pattern.size()), getRE2OptionsStatic<Index>(maxmem));
5050
return regex;
5151
}
5252

5353
template<typename Index>
54-
inline void regexCompile(const SPL::rstring & pattern, const Index & patternIndex, int maxmem=1000000){
54+
inline void regexCompile(const SPL::rstring & pattern, const Index & patternIndex, long maxmem=1000000){
5555
getRE2<Index,OperatorInstance>(pattern, maxmem);
5656
}
5757

5858
template<typename Index>
59-
inline void regexCompileStatic(const SPL::rstring & pattern, const Index & patternIndex, int maxmem=1000000){
59+
inline void regexCompileStatic(const SPL::rstring & pattern, const Index & patternIndex, long maxmem=1000000){
6060
getRE2Static<Index>(pattern, maxmem);
6161
}
6262

com.ibm.streamsx.regex/toolkit.xml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -173,10 +173,10 @@ RegexMatch operator has three custom output functions:
173173
</function>
174174
<function modelUriIndex="2" name="regexCompile" native="true" public="true" returnType="boolean" uriIndex="0">
175175
<description>Compiles regex pattern and indexes it, additionally allows to control max memory allocated.</description>
176-
<prototype>&lt;enum E&gt; public boolean regexCompile(rstring pattern, E patternIndex, int32 maxmem)</prototype>
176+
<prototype>&lt;enum E&gt; public boolean regexCompile(rstring pattern, E patternIndex, int64 maxmem)</prototype>
177177
<parameter name="pattern" type="rstring"/>
178178
<parameter name="patternIndex" type="E"/>
179-
<parameter name="maxmem" type="int32"/>
179+
<parameter name="maxmem" type="int64"/>
180180
</function>
181181
<function modelUriIndex="2" name="regexCompileStatic" native="true" public="true" returnType="boolean" uriIndex="0">
182182
<description>Compiles regex pattern and indexes it - static version</description>
@@ -186,10 +186,10 @@ RegexMatch operator has three custom output functions:
186186
</function>
187187
<function modelUriIndex="2" name="regexCompileStatic" native="true" public="true" returnType="boolean" uriIndex="0">
188188
<description>Compiles regex pattern and indexes it - static version, additionally allows to control max memory allocated.</description>
189-
<prototype>&lt;enum E&gt; public boolean regexCompileStatic(rstring pattern, E patternIndex, int32 maxmem)</prototype>
189+
<prototype>&lt;enum E&gt; public boolean regexCompileStatic(rstring pattern, E patternIndex, int64 maxmem)</prototype>
190190
<parameter name="pattern" type="rstring"/>
191191
<parameter name="patternIndex" type="E"/>
192-
<parameter name="maxmem" type="int32"/>
192+
<parameter name="maxmem" type="int64"/>
193193
</function>
194194
<function modelUriIndex="2" name="regexFullMatch" native="true" public="true" returnType="boolean" uriIndex="0">
195195
<description>Tries to match the whole string with the pattern - doesn't use compiled regex.</description>

0 commit comments

Comments
 (0)