@@ -9,7 +9,7 @@ Property %Variable As %String(MAXLEN = 1000);
9
9
Property %Type As %String (MAXLEN = 1000 );
10
10
11
11
/// Default serialization for methods
12
- Property %Serialization As %Integer ;
12
+ Property %Serialization As %Integer [ InitialExpression = { ##class ( isc.py.Callout ).#SerializationStr} ] ;
13
13
14
14
/// Automatically escape values on property set
15
15
Property %EscapeOnSet As %Boolean [ InitialExpression = {$$$YES} ];
@@ -25,10 +25,9 @@ Property %EscapeOnCall As %Boolean [ InitialExpression = {$$$NO} ];
25
25
/// w obj.age
26
26
/// w obj.getAge()
27
27
/// w obj.getAgePlus(10)
28
- Method %OnNew (type As %String = " " , variable As %String , serialization As %Integer = { ##class ( isc.py.Callout ).#SerializationStr}, args ...) As %Status [ Private , ServerOnly = 1 ]
28
+ Method %OnNew (type As %String = " " , variable As %String , args ...) As %Status [ Private , ServerOnly = 1 ]
29
29
{
30
30
set ..%Variable = variable
31
- set ..%Serialization = serialization
32
31
33
32
if type '=" " {
34
33
// Create variable of type
@@ -134,9 +133,9 @@ Method %ToPickle(ByRef stream As %Stream.Object, useString As %Boolean = {$$$NO}
134
133
}
135
134
136
135
/// Convert Python object to string
137
- Method %ToStream (serialization As %Integer = {.. %Serialization }, ByRef stream As %Stream .Object , useString As %Boolean = {$$$NO}) As %Status [ CodeMode = expression ]
136
+ Method %ToStream (ByRef stream As %Stream .Object , useString As %Boolean = {$$$NO}) As %Status [ CodeMode = expression ]
138
137
{
139
- ##class (isc.py.Main ).GetVariable (..%Variable , serialization , .stream , useString )
138
+ ##class (isc.py.Main ).GetVariable (..%Variable , .. %Serialization , .stream , useString )
140
139
}
141
140
142
141
Method %Destroy () [ CodeMode = expression ]
@@ -145,9 +144,9 @@ Method %Destroy() [ CodeMode = expression ]
145
144
}
146
145
147
146
/// Get object as serialized string
148
- Method %GetString (serialization As %Integer = {.. %Serialization } ) As %String
147
+ Method %GetString () As %String
149
148
{
150
- set sc = ..%ToStream (serialization , .stream , $$$YES)
149
+ set sc = ..%ToStream (.stream , $$$YES)
151
150
quit :$$$ISERR(sc ) " "
152
151
if $isObject (stream ) {
153
152
set stream = stream .Read ($$$MaxStringLength)
0 commit comments