Skip to content

Commit 10eb001

Browse files
authored
API: safe variable get for long variables
1 parent a7e07da commit 10eb001

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

isc/py/Main.cls

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ ClassMethod GetVariable(variable As %String, serialization As %Integer = {##clas
449449
if ((length<=$$$MaxStringLength) && useString) {
450450
set sc = ..SimpleString("zzzvar = " _ variable, "zzzvar", serialization, .stream)
451451
} else {
452-
set step = $$$MaxStringLength \ 2
452+
set step = $$$MaxStringLength \ 4
453453
set:'$isObject($g(stream)) stream = ##class(%Stream.GlobalCharacter).%New()
454454

455455
if (length<=step) {
@@ -511,6 +511,8 @@ ClassMethod GetVariableInfo(variable As %String = "", serialization As %Integer
511511
}
512512
quit:$$$ISERR(sc) sc
513513

514+
set length = +length
515+
514516
set sc = ..SimpleString("del zzzlen")
515517
}
516518
quit:$$$ISERR(sc) sc

0 commit comments

Comments
 (0)