objective-lol 0.0.1__cp312-cp312-macosx_11_0_arm64.whl → 0.0.2__cp312-cp312-macosx_11_0_arm64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- objective_lol/_api.cpython-312-darwin.h +58 -58
- objective_lol/_api.cpython-312-darwin.so +0 -0
- objective_lol/api.c +838 -838
- objective_lol/api.go +317 -317
- objective_lol/api.py +423 -423
- objective_lol/api_go.h +58 -58
- objective_lol/build.py +45 -45
- {objective_lol-0.0.1.dist-info → objective_lol-0.0.2.dist-info}/METADATA +17 -1
- objective_lol-0.0.2.dist-info/RECORD +14 -0
- objective_lol-0.0.1.dist-info/RECORD +0 -14
- {objective_lol-0.0.1.dist-info → objective_lol-0.0.2.dist-info}/WHEEL +0 -0
- {objective_lol-0.0.1.dist-info → objective_lol-0.0.2.dist-info}/top_level.txt +0 -0
objective_lol/api.py
CHANGED
@@ -953,9 +953,9 @@ class ClassVariable(go.GoClass):
|
|
953
953
|
else:
|
954
954
|
_api.api_ClassVariable_Locked_Set(self.handle, value)
|
955
955
|
|
956
|
-
# Python type for struct api.
|
957
|
-
class
|
958
|
-
"""
|
956
|
+
# Python type for struct api.GoValue
|
957
|
+
class GoValue(go.GoClass):
|
958
|
+
""""""
|
959
959
|
def __init__(self, *args, **kwargs):
|
960
960
|
"""
|
961
961
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
@@ -969,25 +969,13 @@ class ExecutionResult(go.GoClass):
|
|
969
969
|
self.handle = args[0].handle
|
970
970
|
_api.IncRef(self.handle)
|
971
971
|
else:
|
972
|
-
self.handle = _api.
|
972
|
+
self.handle = _api.api_GoValue_CTor()
|
973
973
|
_api.IncRef(self.handle)
|
974
|
-
if 0 < len(args):
|
975
|
-
self.Value = args[0]
|
976
|
-
if "Value" in kwargs:
|
977
|
-
self.Value = kwargs["Value"]
|
978
|
-
if 1 < len(args):
|
979
|
-
self.RawValue = args[1]
|
980
|
-
if "RawValue" in kwargs:
|
981
|
-
self.RawValue = kwargs["RawValue"]
|
982
|
-
if 2 < len(args):
|
983
|
-
self.Output = args[2]
|
984
|
-
if "Output" in kwargs:
|
985
|
-
self.Output = kwargs["Output"]
|
986
974
|
def __del__(self):
|
987
975
|
_api.DecRef(self.handle)
|
988
976
|
def __str__(self):
|
989
977
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
990
|
-
sv = 'api.
|
978
|
+
sv = 'api.GoValue{'
|
991
979
|
first = True
|
992
980
|
for v in pr:
|
993
981
|
if callable(v[1]):
|
@@ -1000,44 +988,41 @@ class ExecutionResult(go.GoClass):
|
|
1000
988
|
return sv + '}'
|
1001
989
|
def __repr__(self):
|
1002
990
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1003
|
-
sv = 'api.
|
991
|
+
sv = 'api.GoValue ( '
|
1004
992
|
for v in pr:
|
1005
993
|
if not callable(v[1]):
|
1006
994
|
sv += v[0] + '=' + str(v[1]) + ', '
|
1007
995
|
return sv + ')'
|
1008
|
-
|
1009
|
-
|
1010
|
-
|
1011
|
-
|
1012
|
-
|
1013
|
-
|
1014
|
-
def
|
1015
|
-
|
1016
|
-
|
1017
|
-
|
1018
|
-
|
1019
|
-
|
1020
|
-
def
|
1021
|
-
"""
|
1022
|
-
|
1023
|
-
|
1024
|
-
|
1025
|
-
|
1026
|
-
|
1027
|
-
|
1028
|
-
|
1029
|
-
|
1030
|
-
|
1031
|
-
|
1032
|
-
|
1033
|
-
"""
|
1034
|
-
return _api.
|
1035
|
-
|
1036
|
-
|
1037
|
-
|
1038
|
-
_api.api_ExecutionResult_Output_Set(self.handle, value.handle)
|
1039
|
-
else:
|
1040
|
-
_api.api_ExecutionResult_Output_Set(self.handle, value)
|
996
|
+
def ID(self):
|
997
|
+
"""ID() str"""
|
998
|
+
return _api.api_GoValue_ID(self.handle)
|
999
|
+
def MarshalJSON(self):
|
1000
|
+
"""MarshalJSON() []int, str"""
|
1001
|
+
return go.Slice_byte(handle=_api.api_GoValue_MarshalJSON(self.handle))
|
1002
|
+
def Type(self):
|
1003
|
+
"""Type() str"""
|
1004
|
+
return _api.api_GoValue_Type(self.handle)
|
1005
|
+
def Int(self):
|
1006
|
+
"""Int() long, str"""
|
1007
|
+
return _api.api_GoValue_Int(self.handle)
|
1008
|
+
def Float(self):
|
1009
|
+
"""Float() float, str"""
|
1010
|
+
return _api.api_GoValue_Float(self.handle)
|
1011
|
+
def String(self):
|
1012
|
+
"""String() str, str"""
|
1013
|
+
return _api.api_GoValue_String(self.handle)
|
1014
|
+
def Bool(self):
|
1015
|
+
"""Bool() bool, str"""
|
1016
|
+
return _api.api_GoValue_Bool(self.handle)
|
1017
|
+
def Slice(self):
|
1018
|
+
"""Slice() []object, str"""
|
1019
|
+
return Slice_api_GoValue(handle=_api.api_GoValue_Slice(self.handle))
|
1020
|
+
def Map(self):
|
1021
|
+
"""Map() object, str"""
|
1022
|
+
return Map_string_api_GoValue(handle=_api.api_GoValue_Map(self.handle))
|
1023
|
+
def Object(self):
|
1024
|
+
"""Object() object, str"""
|
1025
|
+
return go.Ptr_environment_ObjectInstance(handle=_api.api_GoValue_Object(self.handle))
|
1041
1026
|
|
1042
1027
|
# Python type for struct api.SourceLocation
|
1043
1028
|
class SourceLocation(go.GoClass):
|
@@ -1119,9 +1104,9 @@ class SourceLocation(go.GoClass):
|
|
1119
1104
|
else:
|
1120
1105
|
_api.api_SourceLocation_Column_Set(self.handle, value)
|
1121
1106
|
|
1122
|
-
# Python type for struct api.
|
1123
|
-
class
|
1124
|
-
"""
|
1107
|
+
# Python type for struct api.VM
|
1108
|
+
class VM(go.GoClass):
|
1109
|
+
"""VM represents an Objective-LOL virtual machine instance\n"""
|
1125
1110
|
def __init__(self, *args, **kwargs):
|
1126
1111
|
"""
|
1127
1112
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
@@ -1135,29 +1120,13 @@ class VMError(go.GoClass):
|
|
1135
1120
|
self.handle = args[0].handle
|
1136
1121
|
_api.IncRef(self.handle)
|
1137
1122
|
else:
|
1138
|
-
self.handle = _api.
|
1123
|
+
self.handle = _api.api_VM_CTor()
|
1139
1124
|
_api.IncRef(self.handle)
|
1140
|
-
if 0 < len(args):
|
1141
|
-
self.Type = args[0]
|
1142
|
-
if "Type" in kwargs:
|
1143
|
-
self.Type = kwargs["Type"]
|
1144
|
-
if 1 < len(args):
|
1145
|
-
self.Message = args[1]
|
1146
|
-
if "Message" in kwargs:
|
1147
|
-
self.Message = kwargs["Message"]
|
1148
|
-
if 2 < len(args):
|
1149
|
-
self.Source = args[2]
|
1150
|
-
if "Source" in kwargs:
|
1151
|
-
self.Source = kwargs["Source"]
|
1152
|
-
if 4 < len(args):
|
1153
|
-
self.Duration = args[4]
|
1154
|
-
if "Duration" in kwargs:
|
1155
|
-
self.Duration = kwargs["Duration"]
|
1156
1125
|
def __del__(self):
|
1157
1126
|
_api.DecRef(self.handle)
|
1158
1127
|
def __str__(self):
|
1159
1128
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1160
|
-
sv = 'api.
|
1129
|
+
sv = 'api.VM{'
|
1161
1130
|
first = True
|
1162
1131
|
for v in pr:
|
1163
1132
|
if callable(v[1]):
|
@@ -1170,87 +1139,69 @@ class VMError(go.GoClass):
|
|
1170
1139
|
return sv + '}'
|
1171
1140
|
def __repr__(self):
|
1172
1141
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1173
|
-
sv = 'api.
|
1142
|
+
sv = 'api.VM ( '
|
1174
1143
|
for v in pr:
|
1175
1144
|
if not callable(v[1]):
|
1176
1145
|
sv += v[0] + '=' + str(v[1]) + ', '
|
1177
1146
|
return sv + ')'
|
1178
|
-
|
1179
|
-
|
1180
|
-
return _api.api_VMError_Type_Get(self.handle)
|
1181
|
-
@Type.setter
|
1182
|
-
def Type(self, value):
|
1183
|
-
if isinstance(value, go.GoClass):
|
1184
|
-
_api.api_VMError_Type_Set(self.handle, value.handle)
|
1185
|
-
else:
|
1186
|
-
_api.api_VMError_Type_Set(self.handle, value)
|
1187
|
-
@property
|
1188
|
-
def Message(self):
|
1189
|
-
return _api.api_VMError_Message_Get(self.handle)
|
1190
|
-
@Message.setter
|
1191
|
-
def Message(self, value):
|
1192
|
-
if isinstance(value, go.GoClass):
|
1193
|
-
_api.api_VMError_Message_Set(self.handle, value.handle)
|
1194
|
-
else:
|
1195
|
-
_api.api_VMError_Message_Set(self.handle, value)
|
1196
|
-
@property
|
1197
|
-
def Source(self):
|
1198
|
-
return SourceLocation(handle=_api.api_VMError_Source_Get(self.handle))
|
1199
|
-
@Source.setter
|
1200
|
-
def Source(self, value):
|
1201
|
-
if isinstance(value, go.GoClass):
|
1202
|
-
_api.api_VMError_Source_Set(self.handle, value.handle)
|
1203
|
-
else:
|
1204
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1205
|
-
@property
|
1206
|
-
def Duration(self):
|
1207
|
-
return _api.api_VMError_Duration_Get(self.handle)
|
1208
|
-
@Duration.setter
|
1209
|
-
def Duration(self, value):
|
1210
|
-
if isinstance(value, go.GoClass):
|
1211
|
-
_api.api_VMError_Duration_Set(self.handle, value.handle)
|
1212
|
-
else:
|
1213
|
-
_api.api_VMError_Duration_Set(self.handle, value)
|
1214
|
-
def Error(self):
|
1215
|
-
"""Error() str"""
|
1216
|
-
return _api.api_VMError_Error(self.handle)
|
1217
|
-
def Unwrap(self):
|
1218
|
-
"""Unwrap() str"""
|
1219
|
-
return _api.api_VMError_Unwrap(self.handle)
|
1220
|
-
def IsCompileError(self):
|
1221
|
-
"""IsCompileError() bool
|
1147
|
+
def GetCompatibilityShim(self):
|
1148
|
+
"""GetCompatibilityShim() object
|
1222
1149
|
|
1223
|
-
|
1150
|
+
GetCompatibilityShim returns a compatibility shim for the VM
|
1224
1151
|
"""
|
1225
|
-
return _api.
|
1226
|
-
def
|
1227
|
-
"""
|
1152
|
+
return VMCompatibilityShim(handle=_api.api_VM_GetCompatibilityShim(self.handle))
|
1153
|
+
def Execute(self, code):
|
1154
|
+
"""Execute(str code) object, str
|
1228
1155
|
|
1229
|
-
|
1156
|
+
Execute executes Objective-LOL code from a string
|
1230
1157
|
"""
|
1231
|
-
return _api.
|
1232
|
-
def
|
1233
|
-
"""
|
1158
|
+
return ExecutionResult(handle=_api.api_VM_Execute(self.handle, code))
|
1159
|
+
def ExecuteWithContext(self, ctx, code):
|
1160
|
+
"""ExecuteWithContext(object ctx, str code) object, str
|
1234
1161
|
|
1235
|
-
|
1162
|
+
ExecuteWithContext executes code with a context for cancellation/timeout
|
1236
1163
|
"""
|
1237
|
-
return _api.
|
1238
|
-
def
|
1239
|
-
"""
|
1164
|
+
return ExecutionResult(handle=_api.api_VM_ExecuteWithContext(self.handle, ctx.handle, code))
|
1165
|
+
def NewObjectInstance(self, className):
|
1166
|
+
"""NewObjectInstance(str className) object, str"""
|
1167
|
+
return GoValue(handle=_api.api_VM_NewObjectInstance(self.handle, className))
|
1168
|
+
def Call(self, functionName, args):
|
1169
|
+
"""Call(str functionName, []object args) object, str
|
1240
1170
|
|
1241
|
-
|
1171
|
+
Call calls an Objective-LOL function with the given arguments
|
1242
1172
|
"""
|
1243
|
-
return _api.
|
1244
|
-
def
|
1245
|
-
"""
|
1173
|
+
return GoValue(handle=_api.api_VM_Call(self.handle, functionName, args.handle))
|
1174
|
+
def CallMethod(self, object, methodName, args):
|
1175
|
+
"""CallMethod(object object, str methodName, []object args) object, str
|
1246
1176
|
|
1247
|
-
|
1177
|
+
CallMethod calls a method on an Objective-LOL object
|
1248
1178
|
"""
|
1249
|
-
return _api.
|
1179
|
+
return GoValue(handle=_api.api_VM_CallMethod(self.handle, object.handle, methodName, args.handle))
|
1180
|
+
def DefineVariable(self, name, value, constant):
|
1181
|
+
"""DefineVariable(str name, object value, bool constant) str
|
1182
|
+
|
1183
|
+
DefineVariable defines a global variable in the VM
|
1184
|
+
"""
|
1185
|
+
return _api.api_VM_DefineVariable(self.handle, name, value.handle, constant)
|
1186
|
+
def SetVariable(self, variableName, value):
|
1187
|
+
"""SetVariable(str variableName, object value) str
|
1188
|
+
|
1189
|
+
SetVariable sets a variable in the global environment
|
1190
|
+
"""
|
1191
|
+
return _api.api_VM_SetVariable(self.handle, variableName, value.handle)
|
1192
|
+
def GetVariable(self, variableName):
|
1193
|
+
"""GetVariable(str variableName) object, str
|
1194
|
+
|
1195
|
+
Get gets a variable from the global environment
|
1196
|
+
"""
|
1197
|
+
return GoValue(handle=_api.api_VM_GetVariable(self.handle, variableName))
|
1198
|
+
def DefineClass(self, classDef):
|
1199
|
+
"""DefineClass(object classDef) str"""
|
1200
|
+
return _api.api_VM_DefineClass(self.handle, classDef.handle)
|
1250
1201
|
|
1251
|
-
# Python type for struct api.
|
1252
|
-
class
|
1253
|
-
""""""
|
1202
|
+
# Python type for struct api.VMCompatibilityShim
|
1203
|
+
class VMCompatibilityShim(go.GoClass):
|
1204
|
+
"""VMCompatibilityShim is a shim to provide compatibility for external\nlanguages that cannot interact with the standard VM interface through\nGo types. Message passing is done through JSON strings.\n"""
|
1254
1205
|
def __init__(self, *args, **kwargs):
|
1255
1206
|
"""
|
1256
1207
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
@@ -1264,21 +1215,13 @@ class ClassMethod(go.GoClass):
|
|
1264
1215
|
self.handle = args[0].handle
|
1265
1216
|
_api.IncRef(self.handle)
|
1266
1217
|
else:
|
1267
|
-
self.handle = _api.
|
1218
|
+
self.handle = _api.api_VMCompatibilityShim_CTor()
|
1268
1219
|
_api.IncRef(self.handle)
|
1269
|
-
if 0 < len(args):
|
1270
|
-
self.Name = args[0]
|
1271
|
-
if "Name" in kwargs:
|
1272
|
-
self.Name = kwargs["Name"]
|
1273
|
-
if 1 < len(args):
|
1274
|
-
self.Argc = args[1]
|
1275
|
-
if "Argc" in kwargs:
|
1276
|
-
self.Argc = kwargs["Argc"]
|
1277
1220
|
def __del__(self):
|
1278
1221
|
_api.DecRef(self.handle)
|
1279
1222
|
def __str__(self):
|
1280
1223
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1281
|
-
sv = 'api.
|
1224
|
+
sv = 'api.VMCompatibilityShim{'
|
1282
1225
|
first = True
|
1283
1226
|
for v in pr:
|
1284
1227
|
if callable(v[1]):
|
@@ -1291,103 +1234,54 @@ class ClassMethod(go.GoClass):
|
|
1291
1234
|
return sv + '}'
|
1292
1235
|
def __repr__(self):
|
1293
1236
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1294
|
-
sv = 'api.
|
1237
|
+
sv = 'api.VMCompatibilityShim ( '
|
1295
1238
|
for v in pr:
|
1296
1239
|
if not callable(v[1]):
|
1297
1240
|
sv += v[0] + '=' + str(v[1]) + ', '
|
1298
1241
|
return sv + ')'
|
1299
|
-
|
1300
|
-
|
1301
|
-
|
1302
|
-
|
1303
|
-
|
1304
|
-
|
1305
|
-
|
1306
|
-
|
1307
|
-
_api.api_ClassMethod_Name_Set(self.handle, value)
|
1308
|
-
@property
|
1309
|
-
def Argc(self):
|
1310
|
-
return _api.api_ClassMethod_Argc_Get(self.handle)
|
1311
|
-
@Argc.setter
|
1312
|
-
def Argc(self, value):
|
1313
|
-
if isinstance(value, go.GoClass):
|
1314
|
-
_api.api_ClassMethod_Argc_Set(self.handle, value.handle)
|
1315
|
-
else:
|
1316
|
-
_api.api_ClassMethod_Argc_Set(self.handle, value)
|
1317
|
-
|
1318
|
-
# Python type for struct api.GoValue
|
1319
|
-
class GoValue(go.GoClass):
|
1320
|
-
""""""
|
1321
|
-
def __init__(self, *args, **kwargs):
|
1322
|
-
"""
|
1323
|
-
handle=A Go-side object is always initialized with an explicit handle=arg
|
1324
|
-
otherwise parameters can be unnamed in order of field names or named fields
|
1325
|
-
in which case a new Go object is constructed first
|
1242
|
+
def DefineFunction(self, id, name, argc, function):
|
1243
|
+
"""DefineFunction(str id, str name, int argc, callable function) str
|
1244
|
+
|
1245
|
+
DefineFunction defines a global function with maximum compatibility,
|
1246
|
+
wrapping arguments and return values as JSON strings.
|
1247
|
+
An optional id cookie is passed back to the function to identify it.
|
1248
|
+
jsonArgs is a JSON array string of the arguments.
|
1249
|
+
The function should return a JSON object string with "result" and "error" fields.
|
1326
1250
|
"""
|
1327
|
-
|
1328
|
-
|
1329
|
-
|
1330
|
-
|
1331
|
-
|
1332
|
-
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
|
1337
|
-
|
1338
|
-
|
1339
|
-
|
1340
|
-
|
1341
|
-
|
1342
|
-
|
1343
|
-
|
1344
|
-
|
1345
|
-
|
1346
|
-
|
1347
|
-
|
1348
|
-
|
1349
|
-
|
1350
|
-
|
1351
|
-
|
1352
|
-
|
1353
|
-
|
1354
|
-
|
1355
|
-
|
1356
|
-
|
1357
|
-
return
|
1358
|
-
def ID(self):
|
1359
|
-
"""ID() str"""
|
1360
|
-
return _api.api_GoValue_ID(self.handle)
|
1361
|
-
def MarshalJSON(self):
|
1362
|
-
"""MarshalJSON() []int, str"""
|
1363
|
-
return go.Slice_byte(handle=_api.api_GoValue_MarshalJSON(self.handle))
|
1364
|
-
def Type(self):
|
1365
|
-
"""Type() str"""
|
1366
|
-
return _api.api_GoValue_Type(self.handle)
|
1367
|
-
def Int(self):
|
1368
|
-
"""Int() long, str"""
|
1369
|
-
return _api.api_GoValue_Int(self.handle)
|
1370
|
-
def Float(self):
|
1371
|
-
"""Float() float, str"""
|
1372
|
-
return _api.api_GoValue_Float(self.handle)
|
1373
|
-
def String(self):
|
1374
|
-
"""String() str, str"""
|
1375
|
-
return _api.api_GoValue_String(self.handle)
|
1376
|
-
def Bool(self):
|
1377
|
-
"""Bool() bool, str"""
|
1378
|
-
return _api.api_GoValue_Bool(self.handle)
|
1379
|
-
def Slice(self):
|
1380
|
-
"""Slice() []object, str"""
|
1381
|
-
return Slice_api_GoValue(handle=_api.api_GoValue_Slice(self.handle))
|
1382
|
-
def Map(self):
|
1383
|
-
"""Map() object, str"""
|
1384
|
-
return Map_string_api_GoValue(handle=_api.api_GoValue_Map(self.handle))
|
1385
|
-
def Object(self):
|
1386
|
-
"""Object() object, str"""
|
1387
|
-
return go.Ptr_environment_ObjectInstance(handle=_api.api_GoValue_Object(self.handle))
|
1251
|
+
return _api.api_VMCompatibilityShim_DefineFunction(self.handle, id, name, argc, function)
|
1252
|
+
def BuildNewClassVariableWithGetter(self, variable, getterID, getter):
|
1253
|
+
"""BuildNewClassVariableWithGetter(object variable, str getterID, callable getter) object"""
|
1254
|
+
return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithGetter(self.handle, variable.handle, getterID, getter))
|
1255
|
+
def BuildNewClassVariableWithSetter(self, variable, setterID, setter):
|
1256
|
+
"""BuildNewClassVariableWithSetter(object variable, str setterID, callable setter) object"""
|
1257
|
+
return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithSetter(self.handle, variable.handle, setterID, setter))
|
1258
|
+
def BuildNewClassMethod(self, method, id, function):
|
1259
|
+
"""BuildNewClassMethod(object method, str id, callable function) object"""
|
1260
|
+
return ClassMethod(handle=_api.api_VMCompatibilityShim_BuildNewClassMethod(self.handle, method.handle, id, function))
|
1261
|
+
def BuildNewUnknownFunctionHandler(self, id, function):
|
1262
|
+
"""BuildNewUnknownFunctionHandler(str id, callable function) object"""
|
1263
|
+
return UnknownFunctionHandler(handle=_api.api_VMCompatibilityShim_BuildNewUnknownFunctionHandler(self.handle, id, function))
|
1264
|
+
def IsClassDefined(self, name):
|
1265
|
+
"""IsClassDefined(str name) bool"""
|
1266
|
+
return _api.api_VMCompatibilityShim_IsClassDefined(self.handle, name)
|
1267
|
+
def LookupObject(self, id):
|
1268
|
+
"""LookupObject(str id) object, str"""
|
1269
|
+
return GoValue(handle=_api.api_VMCompatibilityShim_LookupObject(self.handle, id))
|
1270
|
+
def GetObjectMRO(self, id):
|
1271
|
+
"""GetObjectMRO(str id) []str, str"""
|
1272
|
+
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectMRO(self.handle, id))
|
1273
|
+
def GetObjectImmediateFunctions(self, id):
|
1274
|
+
"""GetObjectImmediateFunctions(str id) []str, str"""
|
1275
|
+
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateFunctions(self.handle, id))
|
1276
|
+
def GetObjectImmediateVariables(self, id):
|
1277
|
+
"""GetObjectImmediateVariables(str id) []str, str"""
|
1278
|
+
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateVariables(self.handle, id))
|
1279
|
+
def AddVariableToObject(self, id, variable):
|
1280
|
+
"""AddVariableToObject(str id, object variable) str"""
|
1281
|
+
return _api.api_VMCompatibilityShim_AddVariableToObject(self.handle, id, variable.handle)
|
1388
1282
|
|
1389
|
-
# Python type for struct api.
|
1390
|
-
class
|
1283
|
+
# Python type for struct api.ClassMethod
|
1284
|
+
class ClassMethod(go.GoClass):
|
1391
1285
|
""""""
|
1392
1286
|
def __init__(self, *args, **kwargs):
|
1393
1287
|
"""
|
@@ -1402,13 +1296,21 @@ class UnknownFunctionHandler(go.GoClass):
|
|
1402
1296
|
self.handle = args[0].handle
|
1403
1297
|
_api.IncRef(self.handle)
|
1404
1298
|
else:
|
1405
|
-
self.handle = _api.
|
1299
|
+
self.handle = _api.api_ClassMethod_CTor()
|
1406
1300
|
_api.IncRef(self.handle)
|
1301
|
+
if 0 < len(args):
|
1302
|
+
self.Name = args[0]
|
1303
|
+
if "Name" in kwargs:
|
1304
|
+
self.Name = kwargs["Name"]
|
1305
|
+
if 1 < len(args):
|
1306
|
+
self.Argc = args[1]
|
1307
|
+
if "Argc" in kwargs:
|
1308
|
+
self.Argc = kwargs["Argc"]
|
1407
1309
|
def __del__(self):
|
1408
1310
|
_api.DecRef(self.handle)
|
1409
1311
|
def __str__(self):
|
1410
1312
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1411
|
-
sv = 'api.
|
1313
|
+
sv = 'api.ClassMethod{'
|
1412
1314
|
first = True
|
1413
1315
|
for v in pr:
|
1414
1316
|
if callable(v[1]):
|
@@ -1421,15 +1323,33 @@ class UnknownFunctionHandler(go.GoClass):
|
|
1421
1323
|
return sv + '}'
|
1422
1324
|
def __repr__(self):
|
1423
1325
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1424
|
-
sv = 'api.
|
1326
|
+
sv = 'api.ClassMethod ( '
|
1425
1327
|
for v in pr:
|
1426
1328
|
if not callable(v[1]):
|
1427
1329
|
sv += v[0] + '=' + str(v[1]) + ', '
|
1428
1330
|
return sv + ')'
|
1331
|
+
@property
|
1332
|
+
def Name(self):
|
1333
|
+
return _api.api_ClassMethod_Name_Get(self.handle)
|
1334
|
+
@Name.setter
|
1335
|
+
def Name(self, value):
|
1336
|
+
if isinstance(value, go.GoClass):
|
1337
|
+
_api.api_ClassMethod_Name_Set(self.handle, value.handle)
|
1338
|
+
else:
|
1339
|
+
_api.api_ClassMethod_Name_Set(self.handle, value)
|
1340
|
+
@property
|
1341
|
+
def Argc(self):
|
1342
|
+
return _api.api_ClassMethod_Argc_Get(self.handle)
|
1343
|
+
@Argc.setter
|
1344
|
+
def Argc(self, value):
|
1345
|
+
if isinstance(value, go.GoClass):
|
1346
|
+
_api.api_ClassMethod_Argc_Set(self.handle, value.handle)
|
1347
|
+
else:
|
1348
|
+
_api.api_ClassMethod_Argc_Set(self.handle, value)
|
1429
1349
|
|
1430
|
-
# Python type for struct api.
|
1431
|
-
class
|
1432
|
-
"""
|
1350
|
+
# Python type for struct api.ExecutionResult
|
1351
|
+
class ExecutionResult(go.GoClass):
|
1352
|
+
"""ExecutionResult represents the result of executing Objective-LOL code\n"""
|
1433
1353
|
def __init__(self, *args, **kwargs):
|
1434
1354
|
"""
|
1435
1355
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
@@ -1443,13 +1363,25 @@ class VM(go.GoClass):
|
|
1443
1363
|
self.handle = args[0].handle
|
1444
1364
|
_api.IncRef(self.handle)
|
1445
1365
|
else:
|
1446
|
-
self.handle = _api.
|
1366
|
+
self.handle = _api.api_ExecutionResult_CTor()
|
1447
1367
|
_api.IncRef(self.handle)
|
1368
|
+
if 0 < len(args):
|
1369
|
+
self.Value = args[0]
|
1370
|
+
if "Value" in kwargs:
|
1371
|
+
self.Value = kwargs["Value"]
|
1372
|
+
if 1 < len(args):
|
1373
|
+
self.RawValue = args[1]
|
1374
|
+
if "RawValue" in kwargs:
|
1375
|
+
self.RawValue = kwargs["RawValue"]
|
1376
|
+
if 2 < len(args):
|
1377
|
+
self.Output = args[2]
|
1378
|
+
if "Output" in kwargs:
|
1379
|
+
self.Output = kwargs["Output"]
|
1448
1380
|
def __del__(self):
|
1449
1381
|
_api.DecRef(self.handle)
|
1450
1382
|
def __str__(self):
|
1451
1383
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1452
|
-
sv = 'api.
|
1384
|
+
sv = 'api.ExecutionResult{'
|
1453
1385
|
first = True
|
1454
1386
|
for v in pr:
|
1455
1387
|
if callable(v[1]):
|
@@ -1462,146 +1394,85 @@ class VM(go.GoClass):
|
|
1462
1394
|
return sv + '}'
|
1463
1395
|
def __repr__(self):
|
1464
1396
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1465
|
-
sv = 'api.
|
1397
|
+
sv = 'api.ExecutionResult ( '
|
1466
1398
|
for v in pr:
|
1467
1399
|
if not callable(v[1]):
|
1468
1400
|
sv += v[0] + '=' + str(v[1]) + ', '
|
1469
1401
|
return sv + ')'
|
1470
|
-
|
1471
|
-
|
1472
|
-
|
1473
|
-
GetCompatibilityShim returns a compatibility shim for the VM
|
1474
|
-
"""
|
1475
|
-
return VMCompatibilityShim(handle=_api.api_VM_GetCompatibilityShim(self.handle))
|
1476
|
-
def Execute(self, code):
|
1477
|
-
"""Execute(str code) object, str
|
1478
|
-
|
1479
|
-
Execute executes Objective-LOL code from a string
|
1480
|
-
"""
|
1481
|
-
return ExecutionResult(handle=_api.api_VM_Execute(self.handle, code))
|
1482
|
-
def ExecuteWithContext(self, ctx, code):
|
1483
|
-
"""ExecuteWithContext(object ctx, str code) object, str
|
1484
|
-
|
1485
|
-
ExecuteWithContext executes code with a context for cancellation/timeout
|
1486
|
-
"""
|
1487
|
-
return ExecutionResult(handle=_api.api_VM_ExecuteWithContext(self.handle, ctx.handle, code))
|
1488
|
-
def NewObjectInstance(self, className):
|
1489
|
-
"""NewObjectInstance(str className) object, str"""
|
1490
|
-
return GoValue(handle=_api.api_VM_NewObjectInstance(self.handle, className))
|
1491
|
-
def Call(self, functionName, args):
|
1492
|
-
"""Call(str functionName, []object args) object, str
|
1493
|
-
|
1494
|
-
Call calls an Objective-LOL function with the given arguments
|
1495
|
-
"""
|
1496
|
-
return GoValue(handle=_api.api_VM_Call(self.handle, functionName, args.handle))
|
1497
|
-
def CallMethod(self, object, methodName, args):
|
1498
|
-
"""CallMethod(object object, str methodName, []object args) object, str
|
1499
|
-
|
1500
|
-
CallMethod calls a method on an Objective-LOL object
|
1501
|
-
"""
|
1502
|
-
return GoValue(handle=_api.api_VM_CallMethod(self.handle, object.handle, methodName, args.handle))
|
1503
|
-
def DefineVariable(self, name, value, constant):
|
1504
|
-
"""DefineVariable(str name, object value, bool constant) str
|
1505
|
-
|
1506
|
-
DefineVariable defines a global variable in the VM
|
1402
|
+
@property
|
1403
|
+
def Value(self):
|
1404
|
+
"""Return value from the execution (e.g., from MAIN function)
|
1507
1405
|
"""
|
1508
|
-
return _api.
|
1509
|
-
|
1510
|
-
|
1511
|
-
|
1512
|
-
|
1406
|
+
return GoValue(handle=_api.api_ExecutionResult_Value_Get(self.handle))
|
1407
|
+
@Value.setter
|
1408
|
+
def Value(self, value):
|
1409
|
+
if isinstance(value, go.GoClass):
|
1410
|
+
_api.api_ExecutionResult_Value_Set(self.handle, value.handle)
|
1411
|
+
else:
|
1412
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1413
|
+
@property
|
1414
|
+
def RawValue(self):
|
1415
|
+
"""Raw Objective-LOL value (for advanced use)
|
1513
1416
|
"""
|
1514
|
-
return _api.
|
1515
|
-
|
1516
|
-
|
1517
|
-
|
1518
|
-
|
1417
|
+
return go.environment_Value(handle=_api.api_ExecutionResult_RawValue_Get(self.handle))
|
1418
|
+
@RawValue.setter
|
1419
|
+
def RawValue(self, value):
|
1420
|
+
if isinstance(value, go.GoClass):
|
1421
|
+
_api.api_ExecutionResult_RawValue_Set(self.handle, value.handle)
|
1422
|
+
else:
|
1423
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1424
|
+
@property
|
1425
|
+
def Output(self):
|
1426
|
+
"""Output captured during execution (if configured)
|
1519
1427
|
"""
|
1520
|
-
return
|
1521
|
-
|
1522
|
-
|
1523
|
-
|
1428
|
+
return _api.api_ExecutionResult_Output_Get(self.handle)
|
1429
|
+
@Output.setter
|
1430
|
+
def Output(self, value):
|
1431
|
+
if isinstance(value, go.GoClass):
|
1432
|
+
_api.api_ExecutionResult_Output_Set(self.handle, value.handle)
|
1433
|
+
else:
|
1434
|
+
_api.api_ExecutionResult_Output_Set(self.handle, value)
|
1524
1435
|
|
1525
|
-
# Python type for struct api.
|
1526
|
-
class
|
1527
|
-
"""
|
1436
|
+
# Python type for struct api.UnknownFunctionHandler
|
1437
|
+
class UnknownFunctionHandler(go.GoClass):
|
1438
|
+
""""""
|
1528
1439
|
def __init__(self, *args, **kwargs):
|
1529
1440
|
"""
|
1530
|
-
handle=A Go-side object is always initialized with an explicit handle=arg
|
1531
|
-
otherwise parameters can be unnamed in order of field names or named fields
|
1532
|
-
in which case a new Go object is constructed first
|
1533
|
-
"""
|
1534
|
-
if len(kwargs) == 1 and 'handle' in kwargs:
|
1535
|
-
self.handle = kwargs['handle']
|
1536
|
-
_api.IncRef(self.handle)
|
1537
|
-
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
1538
|
-
self.handle = args[0].handle
|
1539
|
-
_api.IncRef(self.handle)
|
1540
|
-
else:
|
1541
|
-
self.handle = _api.
|
1542
|
-
_api.IncRef(self.handle)
|
1543
|
-
def __del__(self):
|
1544
|
-
_api.DecRef(self.handle)
|
1545
|
-
def __str__(self):
|
1546
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1547
|
-
sv = 'api.
|
1548
|
-
first = True
|
1549
|
-
for v in pr:
|
1550
|
-
if callable(v[1]):
|
1551
|
-
continue
|
1552
|
-
if first:
|
1553
|
-
first = False
|
1554
|
-
else:
|
1555
|
-
sv += ', '
|
1556
|
-
sv += v[0] + '=' + str(v[1])
|
1557
|
-
return sv + '}'
|
1558
|
-
def __repr__(self):
|
1559
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1560
|
-
sv = 'api.
|
1561
|
-
for v in pr:
|
1562
|
-
if not callable(v[1]):
|
1563
|
-
sv += v[0] + '=' + str(v[1]) + ', '
|
1564
|
-
return sv + ')'
|
1565
|
-
def DefineFunction(self, id, name, argc, function):
|
1566
|
-
"""DefineFunction(str id, str name, int argc, callable function) str
|
1567
|
-
|
1568
|
-
DefineFunction defines a global function with maximum compatibility,
|
1569
|
-
wrapping arguments and return values as JSON strings.
|
1570
|
-
An optional id cookie is passed back to the function to identify it.
|
1571
|
-
jsonArgs is a JSON array string of the arguments.
|
1572
|
-
The function should return a JSON object string with "result" and "error" fields.
|
1573
|
-
"""
|
1574
|
-
return _api.api_VMCompatibilityShim_DefineFunction(self.handle, id, name, argc, function)
|
1575
|
-
def BuildNewClassVariableWithGetter(self, variable, getterID, getter):
|
1576
|
-
"""BuildNewClassVariableWithGetter(object variable, str getterID, callable getter) object"""
|
1577
|
-
return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithGetter(self.handle, variable.handle, getterID, getter))
|
1578
|
-
def BuildNewClassVariableWithSetter(self, variable, setterID, setter):
|
1579
|
-
"""BuildNewClassVariableWithSetter(object variable, str setterID, callable setter) object"""
|
1580
|
-
return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithSetter(self.handle, variable.handle, setterID, setter))
|
1581
|
-
def BuildNewClassMethod(self, method, id, function):
|
1582
|
-
"""BuildNewClassMethod(object method, str id, callable function) object"""
|
1583
|
-
return ClassMethod(handle=_api.api_VMCompatibilityShim_BuildNewClassMethod(self.handle, method.handle, id, function))
|
1584
|
-
def BuildNewUnknownFunctionHandler(self, id, function):
|
1585
|
-
"""BuildNewUnknownFunctionHandler(str id, callable function) object"""
|
1586
|
-
return UnknownFunctionHandler(handle=_api.api_VMCompatibilityShim_BuildNewUnknownFunctionHandler(self.handle, id, function))
|
1587
|
-
def IsClassDefined(self, name):
|
1588
|
-
"""IsClassDefined(str name) bool"""
|
1589
|
-
return _api.api_VMCompatibilityShim_IsClassDefined(self.handle, name)
|
1590
|
-
def LookupObject(self, id):
|
1591
|
-
"""LookupObject(str id) object, str"""
|
1592
|
-
return GoValue(handle=_api.api_VMCompatibilityShim_LookupObject(self.handle, id))
|
1593
|
-
def GetObjectMRO(self, id):
|
1594
|
-
"""GetObjectMRO(str id) []str, str"""
|
1595
|
-
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectMRO(self.handle, id))
|
1596
|
-
def GetObjectImmediateFunctions(self, id):
|
1597
|
-
"""GetObjectImmediateFunctions(str id) []str, str"""
|
1598
|
-
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateFunctions(self.handle, id))
|
1599
|
-
def GetObjectImmediateVariables(self, id):
|
1600
|
-
"""GetObjectImmediateVariables(str id) []str, str"""
|
1601
|
-
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateVariables(self.handle, id))
|
1602
|
-
def AddVariableToObject(self, id, variable):
|
1603
|
-
"""AddVariableToObject(str id, object variable) str"""
|
1604
|
-
return _api.api_VMCompatibilityShim_AddVariableToObject(self.handle, id, variable.handle)
|
1441
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
1442
|
+
otherwise parameters can be unnamed in order of field names or named fields
|
1443
|
+
in which case a new Go object is constructed first
|
1444
|
+
"""
|
1445
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
1446
|
+
self.handle = kwargs['handle']
|
1447
|
+
_api.IncRef(self.handle)
|
1448
|
+
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
1449
|
+
self.handle = args[0].handle
|
1450
|
+
_api.IncRef(self.handle)
|
1451
|
+
else:
|
1452
|
+
self.handle = _api.api_UnknownFunctionHandler_CTor()
|
1453
|
+
_api.IncRef(self.handle)
|
1454
|
+
def __del__(self):
|
1455
|
+
_api.DecRef(self.handle)
|
1456
|
+
def __str__(self):
|
1457
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1458
|
+
sv = 'api.UnknownFunctionHandler{'
|
1459
|
+
first = True
|
1460
|
+
for v in pr:
|
1461
|
+
if callable(v[1]):
|
1462
|
+
continue
|
1463
|
+
if first:
|
1464
|
+
first = False
|
1465
|
+
else:
|
1466
|
+
sv += ', '
|
1467
|
+
sv += v[0] + '=' + str(v[1])
|
1468
|
+
return sv + '}'
|
1469
|
+
def __repr__(self):
|
1470
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1471
|
+
sv = 'api.UnknownFunctionHandler ( '
|
1472
|
+
for v in pr:
|
1473
|
+
if not callable(v[1]):
|
1474
|
+
sv += v[0] + '=' + str(v[1]) + ', '
|
1475
|
+
return sv + ')'
|
1605
1476
|
|
1606
1477
|
# Python type for struct api.VMConfig
|
1607
1478
|
class VMConfig(go.GoClass):
|
@@ -1706,6 +1577,135 @@ class VMConfig(go.GoClass):
|
|
1706
1577
|
"""
|
1707
1578
|
return _api.api_VMConfig_Validate(self.handle)
|
1708
1579
|
|
1580
|
+
# Python type for struct api.VMError
|
1581
|
+
class VMError(go.GoClass):
|
1582
|
+
"""VMError represents errors that can occur in the VM API\n"""
|
1583
|
+
def __init__(self, *args, **kwargs):
|
1584
|
+
"""
|
1585
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
1586
|
+
otherwise parameters can be unnamed in order of field names or named fields
|
1587
|
+
in which case a new Go object is constructed first
|
1588
|
+
"""
|
1589
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
1590
|
+
self.handle = kwargs['handle']
|
1591
|
+
_api.IncRef(self.handle)
|
1592
|
+
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
1593
|
+
self.handle = args[0].handle
|
1594
|
+
_api.IncRef(self.handle)
|
1595
|
+
else:
|
1596
|
+
self.handle = _api.api_VMError_CTor()
|
1597
|
+
_api.IncRef(self.handle)
|
1598
|
+
if 0 < len(args):
|
1599
|
+
self.Type = args[0]
|
1600
|
+
if "Type" in kwargs:
|
1601
|
+
self.Type = kwargs["Type"]
|
1602
|
+
if 1 < len(args):
|
1603
|
+
self.Message = args[1]
|
1604
|
+
if "Message" in kwargs:
|
1605
|
+
self.Message = kwargs["Message"]
|
1606
|
+
if 2 < len(args):
|
1607
|
+
self.Source = args[2]
|
1608
|
+
if "Source" in kwargs:
|
1609
|
+
self.Source = kwargs["Source"]
|
1610
|
+
if 4 < len(args):
|
1611
|
+
self.Duration = args[4]
|
1612
|
+
if "Duration" in kwargs:
|
1613
|
+
self.Duration = kwargs["Duration"]
|
1614
|
+
def __del__(self):
|
1615
|
+
_api.DecRef(self.handle)
|
1616
|
+
def __str__(self):
|
1617
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1618
|
+
sv = 'api.VMError{'
|
1619
|
+
first = True
|
1620
|
+
for v in pr:
|
1621
|
+
if callable(v[1]):
|
1622
|
+
continue
|
1623
|
+
if first:
|
1624
|
+
first = False
|
1625
|
+
else:
|
1626
|
+
sv += ', '
|
1627
|
+
sv += v[0] + '=' + str(v[1])
|
1628
|
+
return sv + '}'
|
1629
|
+
def __repr__(self):
|
1630
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1631
|
+
sv = 'api.VMError ( '
|
1632
|
+
for v in pr:
|
1633
|
+
if not callable(v[1]):
|
1634
|
+
sv += v[0] + '=' + str(v[1]) + ', '
|
1635
|
+
return sv + ')'
|
1636
|
+
@property
|
1637
|
+
def Type(self):
|
1638
|
+
return _api.api_VMError_Type_Get(self.handle)
|
1639
|
+
@Type.setter
|
1640
|
+
def Type(self, value):
|
1641
|
+
if isinstance(value, go.GoClass):
|
1642
|
+
_api.api_VMError_Type_Set(self.handle, value.handle)
|
1643
|
+
else:
|
1644
|
+
_api.api_VMError_Type_Set(self.handle, value)
|
1645
|
+
@property
|
1646
|
+
def Message(self):
|
1647
|
+
return _api.api_VMError_Message_Get(self.handle)
|
1648
|
+
@Message.setter
|
1649
|
+
def Message(self, value):
|
1650
|
+
if isinstance(value, go.GoClass):
|
1651
|
+
_api.api_VMError_Message_Set(self.handle, value.handle)
|
1652
|
+
else:
|
1653
|
+
_api.api_VMError_Message_Set(self.handle, value)
|
1654
|
+
@property
|
1655
|
+
def Source(self):
|
1656
|
+
return SourceLocation(handle=_api.api_VMError_Source_Get(self.handle))
|
1657
|
+
@Source.setter
|
1658
|
+
def Source(self, value):
|
1659
|
+
if isinstance(value, go.GoClass):
|
1660
|
+
_api.api_VMError_Source_Set(self.handle, value.handle)
|
1661
|
+
else:
|
1662
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1663
|
+
@property
|
1664
|
+
def Duration(self):
|
1665
|
+
return _api.api_VMError_Duration_Get(self.handle)
|
1666
|
+
@Duration.setter
|
1667
|
+
def Duration(self, value):
|
1668
|
+
if isinstance(value, go.GoClass):
|
1669
|
+
_api.api_VMError_Duration_Set(self.handle, value.handle)
|
1670
|
+
else:
|
1671
|
+
_api.api_VMError_Duration_Set(self.handle, value)
|
1672
|
+
def Error(self):
|
1673
|
+
"""Error() str"""
|
1674
|
+
return _api.api_VMError_Error(self.handle)
|
1675
|
+
def Unwrap(self):
|
1676
|
+
"""Unwrap() str"""
|
1677
|
+
return _api.api_VMError_Unwrap(self.handle)
|
1678
|
+
def IsCompileError(self):
|
1679
|
+
"""IsCompileError() bool
|
1680
|
+
|
1681
|
+
IsCompileError returns true if the error is a compilation error
|
1682
|
+
"""
|
1683
|
+
return _api.api_VMError_IsCompileError(self.handle)
|
1684
|
+
def IsRuntimeError(self):
|
1685
|
+
"""IsRuntimeError() bool
|
1686
|
+
|
1687
|
+
IsRuntimeError returns true if the error is a runtime error
|
1688
|
+
"""
|
1689
|
+
return _api.api_VMError_IsRuntimeError(self.handle)
|
1690
|
+
def IsTimeoutError(self):
|
1691
|
+
"""IsTimeoutError() bool
|
1692
|
+
|
1693
|
+
IsTimeoutError returns true if the error is a timeout error
|
1694
|
+
"""
|
1695
|
+
return _api.api_VMError_IsTimeoutError(self.handle)
|
1696
|
+
def IsConversionError(self):
|
1697
|
+
"""IsConversionError() bool
|
1698
|
+
|
1699
|
+
IsConversionError returns true if the error is a type conversion error
|
1700
|
+
"""
|
1701
|
+
return _api.api_VMError_IsConversionError(self.handle)
|
1702
|
+
def IsConfigError(self):
|
1703
|
+
"""IsConfigError() bool
|
1704
|
+
|
1705
|
+
IsConfigError returns true if the error is a configuration error
|
1706
|
+
"""
|
1707
|
+
return _api.api_VMError_IsConfigError(self.handle)
|
1708
|
+
|
1709
1709
|
|
1710
1710
|
# ---- Slices ---
|
1711
1711
|
|
@@ -1717,60 +1717,30 @@ class VMConfig(go.GoClass):
|
|
1717
1717
|
def NewClassDefinition():
|
1718
1718
|
"""NewClassDefinition() object"""
|
1719
1719
|
return ClassDefinition(handle=_api.api_NewClassDefinition())
|
1720
|
-
def
|
1721
|
-
"""
|
1722
|
-
|
1723
|
-
NewCompileError creates a new compile error
|
1724
|
-
"""
|
1725
|
-
return VMError(handle=_api.api_NewCompileError(message, source.handle))
|
1726
|
-
def NewConversionError(message, wrapped):
|
1727
|
-
"""NewConversionError(str message, str wrapped) object
|
1728
|
-
|
1729
|
-
NewConversionError creates a new type conversion error
|
1730
|
-
"""
|
1731
|
-
return VMError(handle=_api.api_NewConversionError(message, wrapped))
|
1732
|
-
def NewRuntimeError(message, source):
|
1733
|
-
"""NewRuntimeError(str message, object source) object
|
1734
|
-
|
1735
|
-
NewRuntimeError creates a new runtime error
|
1736
|
-
"""
|
1737
|
-
return VMError(handle=_api.api_NewRuntimeError(message, source.handle))
|
1738
|
-
def NewConfigError(message, wrapped):
|
1739
|
-
"""NewConfigError(str message, str wrapped) object
|
1740
|
-
|
1741
|
-
NewConfigError creates a new configuration error
|
1742
|
-
"""
|
1743
|
-
return VMError(handle=_api.api_NewConfigError(message, wrapped))
|
1744
|
-
def NewTimeoutError(duration):
|
1745
|
-
"""NewTimeoutError(long duration) object
|
1720
|
+
def ToGoValue(val):
|
1721
|
+
"""ToGoValue(object val) object, str
|
1746
1722
|
|
1747
|
-
|
1723
|
+
ToGoValue converts an Objective-LOL value to a Go value
|
1748
1724
|
"""
|
1749
|
-
return
|
1750
|
-
def WrapAny(value):
|
1751
|
-
"""WrapAny(str value) object"""
|
1752
|
-
return GoValue(handle=_api.api_WrapAny(value))
|
1725
|
+
return GoValue(handle=_api.api_ToGoValue(val.handle))
|
1753
1726
|
def WrapFloat(value):
|
1754
1727
|
"""WrapFloat(float value) object"""
|
1755
1728
|
return GoValue(handle=_api.api_WrapFloat(value))
|
1729
|
+
def WrapObject(value):
|
1730
|
+
"""WrapObject(object value) object"""
|
1731
|
+
return GoValue(handle=_api.api_WrapObject(value.handle))
|
1756
1732
|
def WrapString(value):
|
1757
1733
|
"""WrapString(str value) object"""
|
1758
1734
|
return GoValue(handle=_api.api_WrapString(value))
|
1759
|
-
def ToGoValue(val):
|
1760
|
-
"""ToGoValue(object val) object, str
|
1761
|
-
|
1762
|
-
ToGoValue converts an Objective-LOL value to a Go value
|
1763
|
-
"""
|
1764
|
-
return GoValue(handle=_api.api_ToGoValue(val.handle))
|
1765
1735
|
def WrapBool(value):
|
1766
1736
|
"""WrapBool(bool value) object"""
|
1767
1737
|
return GoValue(handle=_api.api_WrapBool(value))
|
1768
1738
|
def WrapInt(value):
|
1769
1739
|
"""WrapInt(long value) object"""
|
1770
1740
|
return GoValue(handle=_api.api_WrapInt(value))
|
1771
|
-
def
|
1772
|
-
"""
|
1773
|
-
return GoValue(handle=_api.
|
1741
|
+
def WrapAny(value):
|
1742
|
+
"""WrapAny(str value) object"""
|
1743
|
+
return GoValue(handle=_api.api_WrapAny(value))
|
1774
1744
|
def NewVM(config):
|
1775
1745
|
"""NewVM(object config) object, str
|
1776
1746
|
|
@@ -1783,15 +1753,39 @@ def DefaultConfig():
|
|
1783
1753
|
DefaultConfig returns a default configuration
|
1784
1754
|
"""
|
1785
1755
|
return VMConfig(handle=_api.api_DefaultConfig())
|
1756
|
+
def NewConversionError(message, wrapped):
|
1757
|
+
"""NewConversionError(str message, str wrapped) object
|
1758
|
+
|
1759
|
+
NewConversionError creates a new type conversion error
|
1760
|
+
"""
|
1761
|
+
return VMError(handle=_api.api_NewConversionError(message, wrapped))
|
1762
|
+
def NewRuntimeError(message, source):
|
1763
|
+
"""NewRuntimeError(str message, object source) object
|
1764
|
+
|
1765
|
+
NewRuntimeError creates a new runtime error
|
1766
|
+
"""
|
1767
|
+
return VMError(handle=_api.api_NewRuntimeError(message, source.handle))
|
1768
|
+
def NewCompileError(message, source):
|
1769
|
+
"""NewCompileError(str message, object source) object
|
1770
|
+
|
1771
|
+
NewCompileError creates a new compile error
|
1772
|
+
"""
|
1773
|
+
return VMError(handle=_api.api_NewCompileError(message, source.handle))
|
1774
|
+
def NewConfigError(message, wrapped):
|
1775
|
+
"""NewConfigError(str message, str wrapped) object
|
1776
|
+
|
1777
|
+
NewConfigError creates a new configuration error
|
1778
|
+
"""
|
1779
|
+
return VMError(handle=_api.api_NewConfigError(message, wrapped))
|
1780
|
+
def NewTimeoutError(duration):
|
1781
|
+
"""NewTimeoutError(long duration) object
|
1782
|
+
|
1783
|
+
NewTimeoutError creates a new timeout error
|
1784
|
+
"""
|
1785
|
+
return VMError(handle=_api.api_NewTimeoutError(duration))
|
1786
1786
|
|
1787
1787
|
|
1788
1788
|
# ---- Functions ---
|
1789
|
-
def ConvertArguments(args):
|
1790
|
-
"""ConvertArguments([]object args) []object, str
|
1791
|
-
|
1792
|
-
ConvertArguments converts a slice of Go values to Objective-LOL values
|
1793
|
-
"""
|
1794
|
-
return Slice_environment_Value(handle=_api.api_ConvertArguments(args.handle))
|
1795
1789
|
def LookupObject(id):
|
1796
1790
|
"""LookupObject(str id) object, str"""
|
1797
1791
|
return go.Ptr_environment_ObjectInstance(handle=_api.api_LookupObject(id))
|
@@ -1801,5 +1795,11 @@ def FromGoValue(val):
|
|
1801
1795
|
FromGoValue converts a Go value to an Objective-LOL value
|
1802
1796
|
"""
|
1803
1797
|
return go.environment_Value(handle=_api.api_FromGoValue(val.handle))
|
1798
|
+
def ConvertArguments(args):
|
1799
|
+
"""ConvertArguments([]object args) []object, str
|
1800
|
+
|
1801
|
+
ConvertArguments converts a slice of Go values to Objective-LOL values
|
1802
|
+
"""
|
1803
|
+
return Slice_environment_Value(handle=_api.api_ConvertArguments(args.handle))
|
1804
1804
|
|
1805
1805
|
|