objective-lol 0.0.1__cp313-cp313-macosx_11_0_arm64.whl → 0.0.2__cp313-cp313-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-313-darwin.h +65 -65
- objective_lol/_api.cpython-313-darwin.so +0 -0
- objective_lol/api.c +886 -886
- objective_lol/api.go +786 -786
- objective_lol/api.py +565 -565
- objective_lol/api_go.h +65 -65
- objective_lol/build.py +51 -51
- objective_lol/go.py +1 -1
- {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
@@ -2,7 +2,7 @@
|
|
2
2
|
# python wrapper for package github.com/bjia56/objective-lol/pkg/api within overall package api
|
3
3
|
# This is what you import to use the package.
|
4
4
|
# File is generated by gopy. Do not edit.
|
5
|
-
# gopy build -no-make -dynamic-link=True -symbols=False -output /Users/runner/work/objective-lol/objective-lol/python/build/lib.macosx-11.0-arm64-cpython-313/objective_lol --vm /Users/runner/work/objective-lol/objective-lol/python/.toolchain/python/python-3.13.
|
5
|
+
# gopy build -no-make -dynamic-link=True -symbols=False -output /Users/runner/work/objective-lol/objective-lol/python/build/lib.macosx-11.0-arm64-cpython-313/objective_lol --vm /Users/runner/work/objective-lol/objective-lol/python/.toolchain/python/python-3.13.7/bin/python3 .
|
6
6
|
|
7
7
|
# the following is required to enable dlopen to open the _go.so file
|
8
8
|
import os,sys,inspect,collections
|
@@ -741,9 +741,9 @@ TimeoutErrorType = "timeout"
|
|
741
741
|
|
742
742
|
# ---- Structs ---
|
743
743
|
|
744
|
-
# Python type for struct api.
|
745
|
-
class
|
746
|
-
"""
|
744
|
+
# Python type for struct api.ClassVariable
|
745
|
+
class ClassVariable(go.GoClass):
|
746
|
+
""""""
|
747
747
|
def __init__(self, *args, **kwargs):
|
748
748
|
"""
|
749
749
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
@@ -757,29 +757,25 @@ class VMConfig(go.GoClass):
|
|
757
757
|
self.handle = args[0].handle
|
758
758
|
_api.IncRef(self.handle)
|
759
759
|
else:
|
760
|
-
self.handle = _api.
|
760
|
+
self.handle = _api.api_ClassVariable_CTor()
|
761
761
|
_api.IncRef(self.handle)
|
762
762
|
if 0 < len(args):
|
763
|
-
self.
|
764
|
-
if "
|
765
|
-
self.
|
763
|
+
self.Name = args[0]
|
764
|
+
if "Name" in kwargs:
|
765
|
+
self.Name = kwargs["Name"]
|
766
766
|
if 1 < len(args):
|
767
|
-
self.
|
768
|
-
if "
|
769
|
-
self.
|
767
|
+
self.Value = args[1]
|
768
|
+
if "Value" in kwargs:
|
769
|
+
self.Value = kwargs["Value"]
|
770
770
|
if 2 < len(args):
|
771
|
-
self.
|
772
|
-
if "
|
773
|
-
self.
|
774
|
-
if 3 < len(args):
|
775
|
-
self.WorkingDirectory = args[3]
|
776
|
-
if "WorkingDirectory" in kwargs:
|
777
|
-
self.WorkingDirectory = kwargs["WorkingDirectory"]
|
771
|
+
self.Locked = args[2]
|
772
|
+
if "Locked" in kwargs:
|
773
|
+
self.Locked = kwargs["Locked"]
|
778
774
|
def __del__(self):
|
779
775
|
_api.DecRef(self.handle)
|
780
776
|
def __str__(self):
|
781
777
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
782
|
-
sv = 'api.
|
778
|
+
sv = 'api.ClassVariable{'
|
783
779
|
first = True
|
784
780
|
for v in pr:
|
785
781
|
if callable(v[1]):
|
@@ -792,60 +788,41 @@ class VMConfig(go.GoClass):
|
|
792
788
|
return sv + '}'
|
793
789
|
def __repr__(self):
|
794
790
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
795
|
-
sv = 'api.
|
791
|
+
sv = 'api.ClassVariable ( '
|
796
792
|
for v in pr:
|
797
793
|
if not callable(v[1]):
|
798
794
|
sv += v[0] + '=' + str(v[1]) + ', '
|
799
795
|
return sv + ')'
|
800
796
|
@property
|
801
|
-
def
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
@Stdout.setter
|
806
|
-
def Stdout(self, value):
|
797
|
+
def Name(self):
|
798
|
+
return _api.api_ClassVariable_Name_Get(self.handle)
|
799
|
+
@Name.setter
|
800
|
+
def Name(self, value):
|
807
801
|
if isinstance(value, go.GoClass):
|
808
|
-
_api.
|
802
|
+
_api.api_ClassVariable_Name_Set(self.handle, value.handle)
|
809
803
|
else:
|
810
|
-
|
804
|
+
_api.api_ClassVariable_Name_Set(self.handle, value)
|
811
805
|
@property
|
812
|
-
def
|
813
|
-
return
|
814
|
-
@
|
815
|
-
def
|
806
|
+
def Value(self):
|
807
|
+
return GoValue(handle=_api.api_ClassVariable_Value_Get(self.handle))
|
808
|
+
@Value.setter
|
809
|
+
def Value(self, value):
|
816
810
|
if isinstance(value, go.GoClass):
|
817
|
-
_api.
|
811
|
+
_api.api_ClassVariable_Value_Set(self.handle, value.handle)
|
818
812
|
else:
|
819
813
|
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
820
814
|
@property
|
821
|
-
def
|
822
|
-
|
823
|
-
|
824
|
-
|
825
|
-
@Timeout.setter
|
826
|
-
def Timeout(self, value):
|
827
|
-
if isinstance(value, go.GoClass):
|
828
|
-
_api.api_VMConfig_Timeout_Set(self.handle, value.handle)
|
829
|
-
else:
|
830
|
-
_api.api_VMConfig_Timeout_Set(self.handle, value)
|
831
|
-
@property
|
832
|
-
def WorkingDirectory(self):
|
833
|
-
return _api.api_VMConfig_WorkingDirectory_Get(self.handle)
|
834
|
-
@WorkingDirectory.setter
|
835
|
-
def WorkingDirectory(self, value):
|
815
|
+
def Locked(self):
|
816
|
+
return _api.api_ClassVariable_Locked_Get(self.handle)
|
817
|
+
@Locked.setter
|
818
|
+
def Locked(self, value):
|
836
819
|
if isinstance(value, go.GoClass):
|
837
|
-
_api.
|
820
|
+
_api.api_ClassVariable_Locked_Set(self.handle, value.handle)
|
838
821
|
else:
|
839
|
-
_api.
|
840
|
-
def Validate(self):
|
841
|
-
"""Validate() str
|
842
|
-
|
843
|
-
Validate checks if the configuration is valid
|
844
|
-
"""
|
845
|
-
return _api.api_VMConfig_Validate(self.handle)
|
822
|
+
_api.api_ClassVariable_Locked_Set(self.handle, value)
|
846
823
|
|
847
|
-
# Python type for struct api.
|
848
|
-
class
|
824
|
+
# Python type for struct api.GoValue
|
825
|
+
class GoValue(go.GoClass):
|
849
826
|
""""""
|
850
827
|
def __init__(self, *args, **kwargs):
|
851
828
|
"""
|
@@ -860,21 +837,13 @@ class ClassMethod(go.GoClass):
|
|
860
837
|
self.handle = args[0].handle
|
861
838
|
_api.IncRef(self.handle)
|
862
839
|
else:
|
863
|
-
self.handle = _api.
|
840
|
+
self.handle = _api.api_GoValue_CTor()
|
864
841
|
_api.IncRef(self.handle)
|
865
|
-
if 0 < len(args):
|
866
|
-
self.Name = args[0]
|
867
|
-
if "Name" in kwargs:
|
868
|
-
self.Name = kwargs["Name"]
|
869
|
-
if 1 < len(args):
|
870
|
-
self.Argc = args[1]
|
871
|
-
if "Argc" in kwargs:
|
872
|
-
self.Argc = kwargs["Argc"]
|
873
842
|
def __del__(self):
|
874
843
|
_api.DecRef(self.handle)
|
875
844
|
def __str__(self):
|
876
845
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
877
|
-
sv = 'api.
|
846
|
+
sv = 'api.GoValue{'
|
878
847
|
first = True
|
879
848
|
for v in pr:
|
880
849
|
if callable(v[1]):
|
@@ -887,33 +856,45 @@ class ClassMethod(go.GoClass):
|
|
887
856
|
return sv + '}'
|
888
857
|
def __repr__(self):
|
889
858
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
890
|
-
sv = 'api.
|
859
|
+
sv = 'api.GoValue ( '
|
891
860
|
for v in pr:
|
892
861
|
if not callable(v[1]):
|
893
862
|
sv += v[0] + '=' + str(v[1]) + ', '
|
894
863
|
return sv + ')'
|
895
|
-
|
896
|
-
|
897
|
-
return _api.
|
898
|
-
|
899
|
-
|
900
|
-
|
901
|
-
|
902
|
-
|
903
|
-
|
904
|
-
|
905
|
-
|
906
|
-
return _api.
|
907
|
-
|
908
|
-
|
909
|
-
|
910
|
-
|
911
|
-
|
912
|
-
|
864
|
+
def ID(self):
|
865
|
+
"""ID() str"""
|
866
|
+
return _api.api_GoValue_ID(self.handle)
|
867
|
+
def MarshalJSON(self):
|
868
|
+
"""MarshalJSON() []int, str"""
|
869
|
+
return go.Slice_byte(handle=_api.api_GoValue_MarshalJSON(self.handle))
|
870
|
+
def Type(self):
|
871
|
+
"""Type() str"""
|
872
|
+
return _api.api_GoValue_Type(self.handle)
|
873
|
+
def Int(self):
|
874
|
+
"""Int() long, str"""
|
875
|
+
return _api.api_GoValue_Int(self.handle)
|
876
|
+
def Float(self):
|
877
|
+
"""Float() float, str"""
|
878
|
+
return _api.api_GoValue_Float(self.handle)
|
879
|
+
def String(self):
|
880
|
+
"""String() str, str"""
|
881
|
+
return _api.api_GoValue_String(self.handle)
|
882
|
+
def Bool(self):
|
883
|
+
"""Bool() bool, str"""
|
884
|
+
return _api.api_GoValue_Bool(self.handle)
|
885
|
+
def Slice(self):
|
886
|
+
"""Slice() []object, str"""
|
887
|
+
return Slice_api_GoValue(handle=_api.api_GoValue_Slice(self.handle))
|
888
|
+
def Map(self):
|
889
|
+
"""Map() object, str"""
|
890
|
+
return Map_string_api_GoValue(handle=_api.api_GoValue_Map(self.handle))
|
891
|
+
def Object(self):
|
892
|
+
"""Object() object, str"""
|
893
|
+
return go.Ptr_environment_ObjectInstance(handle=_api.api_GoValue_Object(self.handle))
|
913
894
|
|
914
|
-
# Python type for struct api.
|
915
|
-
class
|
916
|
-
"""
|
895
|
+
# Python type for struct api.UnknownFunctionHandler
|
896
|
+
class UnknownFunctionHandler(go.GoClass):
|
897
|
+
""""""
|
917
898
|
def __init__(self, *args, **kwargs):
|
918
899
|
"""
|
919
900
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
@@ -927,25 +908,13 @@ class SourceLocation(go.GoClass):
|
|
927
908
|
self.handle = args[0].handle
|
928
909
|
_api.IncRef(self.handle)
|
929
910
|
else:
|
930
|
-
self.handle = _api.
|
911
|
+
self.handle = _api.api_UnknownFunctionHandler_CTor()
|
931
912
|
_api.IncRef(self.handle)
|
932
|
-
if 0 < len(args):
|
933
|
-
self.Filename = args[0]
|
934
|
-
if "Filename" in kwargs:
|
935
|
-
self.Filename = kwargs["Filename"]
|
936
|
-
if 1 < len(args):
|
937
|
-
self.Line = args[1]
|
938
|
-
if "Line" in kwargs:
|
939
|
-
self.Line = kwargs["Line"]
|
940
|
-
if 2 < len(args):
|
941
|
-
self.Column = args[2]
|
942
|
-
if "Column" in kwargs:
|
943
|
-
self.Column = kwargs["Column"]
|
944
913
|
def __del__(self):
|
945
914
|
_api.DecRef(self.handle)
|
946
915
|
def __str__(self):
|
947
916
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
948
|
-
sv = 'api.
|
917
|
+
sv = 'api.UnknownFunctionHandler{'
|
949
918
|
first = True
|
950
919
|
for v in pr:
|
951
920
|
if callable(v[1]):
|
@@ -958,42 +927,15 @@ class SourceLocation(go.GoClass):
|
|
958
927
|
return sv + '}'
|
959
928
|
def __repr__(self):
|
960
929
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
961
|
-
sv = 'api.
|
930
|
+
sv = 'api.UnknownFunctionHandler ( '
|
962
931
|
for v in pr:
|
963
932
|
if not callable(v[1]):
|
964
933
|
sv += v[0] + '=' + str(v[1]) + ', '
|
965
934
|
return sv + ')'
|
966
|
-
@property
|
967
|
-
def Filename(self):
|
968
|
-
return _api.api_SourceLocation_Filename_Get(self.handle)
|
969
|
-
@Filename.setter
|
970
|
-
def Filename(self, value):
|
971
|
-
if isinstance(value, go.GoClass):
|
972
|
-
_api.api_SourceLocation_Filename_Set(self.handle, value.handle)
|
973
|
-
else:
|
974
|
-
_api.api_SourceLocation_Filename_Set(self.handle, value)
|
975
|
-
@property
|
976
|
-
def Line(self):
|
977
|
-
return _api.api_SourceLocation_Line_Get(self.handle)
|
978
|
-
@Line.setter
|
979
|
-
def Line(self, value):
|
980
|
-
if isinstance(value, go.GoClass):
|
981
|
-
_api.api_SourceLocation_Line_Set(self.handle, value.handle)
|
982
|
-
else:
|
983
|
-
_api.api_SourceLocation_Line_Set(self.handle, value)
|
984
|
-
@property
|
985
|
-
def Column(self):
|
986
|
-
return _api.api_SourceLocation_Column_Get(self.handle)
|
987
|
-
@Column.setter
|
988
|
-
def Column(self, value):
|
989
|
-
if isinstance(value, go.GoClass):
|
990
|
-
_api.api_SourceLocation_Column_Set(self.handle, value.handle)
|
991
|
-
else:
|
992
|
-
_api.api_SourceLocation_Column_Set(self.handle, value)
|
993
935
|
|
994
|
-
# Python type for struct api.
|
995
|
-
class
|
996
|
-
""""""
|
936
|
+
# Python type for struct api.VMConfig
|
937
|
+
class VMConfig(go.GoClass):
|
938
|
+
"""VMConfig holds configuration options for the VM\n"""
|
997
939
|
def __init__(self, *args, **kwargs):
|
998
940
|
"""
|
999
941
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
@@ -1007,13 +949,29 @@ class UnknownFunctionHandler(go.GoClass):
|
|
1007
949
|
self.handle = args[0].handle
|
1008
950
|
_api.IncRef(self.handle)
|
1009
951
|
else:
|
1010
|
-
self.handle = _api.
|
952
|
+
self.handle = _api.api_VMConfig_CTor()
|
1011
953
|
_api.IncRef(self.handle)
|
954
|
+
if 0 < len(args):
|
955
|
+
self.Stdout = args[0]
|
956
|
+
if "Stdout" in kwargs:
|
957
|
+
self.Stdout = kwargs["Stdout"]
|
958
|
+
if 1 < len(args):
|
959
|
+
self.Stdin = args[1]
|
960
|
+
if "Stdin" in kwargs:
|
961
|
+
self.Stdin = kwargs["Stdin"]
|
962
|
+
if 2 < len(args):
|
963
|
+
self.Timeout = args[2]
|
964
|
+
if "Timeout" in kwargs:
|
965
|
+
self.Timeout = kwargs["Timeout"]
|
966
|
+
if 3 < len(args):
|
967
|
+
self.WorkingDirectory = args[3]
|
968
|
+
if "WorkingDirectory" in kwargs:
|
969
|
+
self.WorkingDirectory = kwargs["WorkingDirectory"]
|
1012
970
|
def __del__(self):
|
1013
971
|
_api.DecRef(self.handle)
|
1014
972
|
def __str__(self):
|
1015
973
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1016
|
-
sv = 'api.
|
974
|
+
sv = 'api.VMConfig{'
|
1017
975
|
first = True
|
1018
976
|
for v in pr:
|
1019
977
|
if callable(v[1]):
|
@@ -1026,191 +984,61 @@ class UnknownFunctionHandler(go.GoClass):
|
|
1026
984
|
return sv + '}'
|
1027
985
|
def __repr__(self):
|
1028
986
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1029
|
-
sv = 'api.
|
987
|
+
sv = 'api.VMConfig ( '
|
1030
988
|
for v in pr:
|
1031
989
|
if not callable(v[1]):
|
1032
990
|
sv += v[0] + '=' + str(v[1]) + ', '
|
1033
991
|
return sv + ')'
|
1034
|
-
|
1035
|
-
|
1036
|
-
|
1037
|
-
"""VM represents an Objective-LOL virtual machine instance\n"""
|
1038
|
-
def __init__(self, *args, **kwargs):
|
1039
|
-
"""
|
1040
|
-
handle=A Go-side object is always initialized with an explicit handle=arg
|
1041
|
-
otherwise parameters can be unnamed in order of field names or named fields
|
1042
|
-
in which case a new Go object is constructed first
|
992
|
+
@property
|
993
|
+
def Stdout(self):
|
994
|
+
"""I/O configuration
|
1043
995
|
"""
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1047
|
-
|
1048
|
-
self.handle
|
1049
|
-
_api.IncRef(self.handle)
|
996
|
+
return go.io_Writer(handle=_api.api_VMConfig_Stdout_Get(self.handle))
|
997
|
+
@Stdout.setter
|
998
|
+
def Stdout(self, value):
|
999
|
+
if isinstance(value, go.GoClass):
|
1000
|
+
_api.api_VMConfig_Stdout_Set(self.handle, value.handle)
|
1050
1001
|
else:
|
1051
|
-
|
1052
|
-
|
1053
|
-
def
|
1054
|
-
_api.
|
1055
|
-
|
1056
|
-
|
1057
|
-
|
1058
|
-
|
1059
|
-
|
1060
|
-
|
1061
|
-
|
1062
|
-
|
1063
|
-
|
1064
|
-
else:
|
1065
|
-
sv += ', '
|
1066
|
-
sv += v[0] + '=' + str(v[1])
|
1067
|
-
return sv + '}'
|
1068
|
-
def __repr__(self):
|
1069
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1070
|
-
sv = 'api.VM ( '
|
1071
|
-
for v in pr:
|
1072
|
-
if not callable(v[1]):
|
1073
|
-
sv += v[0] + '=' + str(v[1]) + ', '
|
1074
|
-
return sv + ')'
|
1075
|
-
def GetCompatibilityShim(self):
|
1076
|
-
"""GetCompatibilityShim() object
|
1077
|
-
|
1078
|
-
GetCompatibilityShim returns a compatibility shim for the VM
|
1079
|
-
"""
|
1080
|
-
return VMCompatibilityShim(handle=_api.api_VM_GetCompatibilityShim(self.handle))
|
1081
|
-
def Execute(self, code):
|
1082
|
-
"""Execute(str code) object, str
|
1083
|
-
|
1084
|
-
Execute executes Objective-LOL code from a string
|
1085
|
-
"""
|
1086
|
-
return ExecutionResult(handle=_api.api_VM_Execute(self.handle, code))
|
1087
|
-
def ExecuteWithContext(self, ctx, code):
|
1088
|
-
"""ExecuteWithContext(object ctx, str code) object, str
|
1089
|
-
|
1090
|
-
ExecuteWithContext executes code with a context for cancellation/timeout
|
1091
|
-
"""
|
1092
|
-
return ExecutionResult(handle=_api.api_VM_ExecuteWithContext(self.handle, ctx.handle, code))
|
1093
|
-
def NewObjectInstance(self, className):
|
1094
|
-
"""NewObjectInstance(str className) object, str"""
|
1095
|
-
return GoValue(handle=_api.api_VM_NewObjectInstance(self.handle, className))
|
1096
|
-
def Call(self, functionName, args):
|
1097
|
-
"""Call(str functionName, []object args) object, str
|
1098
|
-
|
1099
|
-
Call calls an Objective-LOL function with the given arguments
|
1100
|
-
"""
|
1101
|
-
return GoValue(handle=_api.api_VM_Call(self.handle, functionName, args.handle))
|
1102
|
-
def CallMethod(self, object, methodName, args):
|
1103
|
-
"""CallMethod(object object, str methodName, []object args) object, str
|
1104
|
-
|
1105
|
-
CallMethod calls a method on an Objective-LOL object
|
1106
|
-
"""
|
1107
|
-
return GoValue(handle=_api.api_VM_CallMethod(self.handle, object.handle, methodName, args.handle))
|
1108
|
-
def DefineVariable(self, name, value, constant):
|
1109
|
-
"""DefineVariable(str name, object value, bool constant) str
|
1110
|
-
|
1111
|
-
DefineVariable defines a global variable in the VM
|
1112
|
-
"""
|
1113
|
-
return _api.api_VM_DefineVariable(self.handle, name, value.handle, constant)
|
1114
|
-
def SetVariable(self, variableName, value):
|
1115
|
-
"""SetVariable(str variableName, object value) str
|
1116
|
-
|
1117
|
-
SetVariable sets a variable in the global environment
|
1118
|
-
"""
|
1119
|
-
return _api.api_VM_SetVariable(self.handle, variableName, value.handle)
|
1120
|
-
def GetVariable(self, variableName):
|
1121
|
-
"""GetVariable(str variableName) object, str
|
1122
|
-
|
1123
|
-
Get gets a variable from the global environment
|
1124
|
-
"""
|
1125
|
-
return GoValue(handle=_api.api_VM_GetVariable(self.handle, variableName))
|
1126
|
-
def DefineClass(self, classDef):
|
1127
|
-
"""DefineClass(object classDef) str"""
|
1128
|
-
return _api.api_VM_DefineClass(self.handle, classDef.handle)
|
1129
|
-
|
1130
|
-
# Python type for struct api.VMCompatibilityShim
|
1131
|
-
class VMCompatibilityShim(go.GoClass):
|
1132
|
-
"""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"""
|
1133
|
-
def __init__(self, *args, **kwargs):
|
1134
|
-
"""
|
1135
|
-
handle=A Go-side object is always initialized with an explicit handle=arg
|
1136
|
-
otherwise parameters can be unnamed in order of field names or named fields
|
1137
|
-
in which case a new Go object is constructed first
|
1002
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1003
|
+
@property
|
1004
|
+
def Stdin(self):
|
1005
|
+
return go.io_Reader(handle=_api.api_VMConfig_Stdin_Get(self.handle))
|
1006
|
+
@Stdin.setter
|
1007
|
+
def Stdin(self, value):
|
1008
|
+
if isinstance(value, go.GoClass):
|
1009
|
+
_api.api_VMConfig_Stdin_Set(self.handle, value.handle)
|
1010
|
+
else:
|
1011
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1012
|
+
@property
|
1013
|
+
def Timeout(self):
|
1014
|
+
"""Execution configuration
|
1138
1015
|
"""
|
1139
|
-
|
1140
|
-
|
1141
|
-
|
1142
|
-
|
1143
|
-
self.handle
|
1144
|
-
_api.IncRef(self.handle)
|
1016
|
+
return _api.api_VMConfig_Timeout_Get(self.handle)
|
1017
|
+
@Timeout.setter
|
1018
|
+
def Timeout(self, value):
|
1019
|
+
if isinstance(value, go.GoClass):
|
1020
|
+
_api.api_VMConfig_Timeout_Set(self.handle, value.handle)
|
1145
1021
|
else:
|
1146
|
-
self.handle
|
1147
|
-
|
1148
|
-
def
|
1149
|
-
_api.
|
1150
|
-
|
1151
|
-
|
1152
|
-
|
1153
|
-
|
1154
|
-
|
1155
|
-
|
1156
|
-
|
1157
|
-
|
1158
|
-
first = False
|
1159
|
-
else:
|
1160
|
-
sv += ', '
|
1161
|
-
sv += v[0] + '=' + str(v[1])
|
1162
|
-
return sv + '}'
|
1163
|
-
def __repr__(self):
|
1164
|
-
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1165
|
-
sv = 'api.VMCompatibilityShim ( '
|
1166
|
-
for v in pr:
|
1167
|
-
if not callable(v[1]):
|
1168
|
-
sv += v[0] + '=' + str(v[1]) + ', '
|
1169
|
-
return sv + ')'
|
1170
|
-
def DefineFunction(self, id, name, argc, function):
|
1171
|
-
"""DefineFunction(str id, str name, int argc, callable function) str
|
1022
|
+
_api.api_VMConfig_Timeout_Set(self.handle, value)
|
1023
|
+
@property
|
1024
|
+
def WorkingDirectory(self):
|
1025
|
+
return _api.api_VMConfig_WorkingDirectory_Get(self.handle)
|
1026
|
+
@WorkingDirectory.setter
|
1027
|
+
def WorkingDirectory(self, value):
|
1028
|
+
if isinstance(value, go.GoClass):
|
1029
|
+
_api.api_VMConfig_WorkingDirectory_Set(self.handle, value.handle)
|
1030
|
+
else:
|
1031
|
+
_api.api_VMConfig_WorkingDirectory_Set(self.handle, value)
|
1032
|
+
def Validate(self):
|
1033
|
+
"""Validate() str
|
1172
1034
|
|
1173
|
-
|
1174
|
-
wrapping arguments and return values as JSON strings.
|
1175
|
-
An optional id cookie is passed back to the function to identify it.
|
1176
|
-
jsonArgs is a JSON array string of the arguments.
|
1177
|
-
The function should return a JSON object string with "result" and "error" fields.
|
1035
|
+
Validate checks if the configuration is valid
|
1178
1036
|
"""
|
1179
|
-
return _api.
|
1180
|
-
def BuildNewClassVariableWithGetter(self, variable, getterID, getter):
|
1181
|
-
"""BuildNewClassVariableWithGetter(object variable, str getterID, callable getter) object"""
|
1182
|
-
return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithGetter(self.handle, variable.handle, getterID, getter))
|
1183
|
-
def BuildNewClassVariableWithSetter(self, variable, setterID, setter):
|
1184
|
-
"""BuildNewClassVariableWithSetter(object variable, str setterID, callable setter) object"""
|
1185
|
-
return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithSetter(self.handle, variable.handle, setterID, setter))
|
1186
|
-
def BuildNewClassMethod(self, method, id, function):
|
1187
|
-
"""BuildNewClassMethod(object method, str id, callable function) object"""
|
1188
|
-
return ClassMethod(handle=_api.api_VMCompatibilityShim_BuildNewClassMethod(self.handle, method.handle, id, function))
|
1189
|
-
def BuildNewUnknownFunctionHandler(self, id, function):
|
1190
|
-
"""BuildNewUnknownFunctionHandler(str id, callable function) object"""
|
1191
|
-
return UnknownFunctionHandler(handle=_api.api_VMCompatibilityShim_BuildNewUnknownFunctionHandler(self.handle, id, function))
|
1192
|
-
def IsClassDefined(self, name):
|
1193
|
-
"""IsClassDefined(str name) bool"""
|
1194
|
-
return _api.api_VMCompatibilityShim_IsClassDefined(self.handle, name)
|
1195
|
-
def LookupObject(self, id):
|
1196
|
-
"""LookupObject(str id) object, str"""
|
1197
|
-
return GoValue(handle=_api.api_VMCompatibilityShim_LookupObject(self.handle, id))
|
1198
|
-
def GetObjectMRO(self, id):
|
1199
|
-
"""GetObjectMRO(str id) []str, str"""
|
1200
|
-
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectMRO(self.handle, id))
|
1201
|
-
def GetObjectImmediateFunctions(self, id):
|
1202
|
-
"""GetObjectImmediateFunctions(str id) []str, str"""
|
1203
|
-
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateFunctions(self.handle, id))
|
1204
|
-
def GetObjectImmediateVariables(self, id):
|
1205
|
-
"""GetObjectImmediateVariables(str id) []str, str"""
|
1206
|
-
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateVariables(self.handle, id))
|
1207
|
-
def AddVariableToObject(self, id, variable):
|
1208
|
-
"""AddVariableToObject(str id, object variable) str"""
|
1209
|
-
return _api.api_VMCompatibilityShim_AddVariableToObject(self.handle, id, variable.handle)
|
1037
|
+
return _api.api_VMConfig_Validate(self.handle)
|
1210
1038
|
|
1211
|
-
# Python type for struct api.
|
1212
|
-
class
|
1213
|
-
""""""
|
1039
|
+
# Python type for struct api.VMError
|
1040
|
+
class VMError(go.GoClass):
|
1041
|
+
"""VMError represents errors that can occur in the VM API\n"""
|
1214
1042
|
def __init__(self, *args, **kwargs):
|
1215
1043
|
"""
|
1216
1044
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
@@ -1224,41 +1052,29 @@ class ClassDefinition(go.GoClass):
|
|
1224
1052
|
self.handle = args[0].handle
|
1225
1053
|
_api.IncRef(self.handle)
|
1226
1054
|
else:
|
1227
|
-
self.handle = _api.
|
1055
|
+
self.handle = _api.api_VMError_CTor()
|
1228
1056
|
_api.IncRef(self.handle)
|
1229
1057
|
if 0 < len(args):
|
1230
|
-
self.
|
1231
|
-
if "
|
1232
|
-
self.
|
1058
|
+
self.Type = args[0]
|
1059
|
+
if "Type" in kwargs:
|
1060
|
+
self.Type = kwargs["Type"]
|
1233
1061
|
if 1 < len(args):
|
1234
|
-
self.
|
1235
|
-
if "
|
1236
|
-
self.
|
1062
|
+
self.Message = args[1]
|
1063
|
+
if "Message" in kwargs:
|
1064
|
+
self.Message = kwargs["Message"]
|
1237
1065
|
if 2 < len(args):
|
1238
|
-
self.
|
1239
|
-
if "
|
1240
|
-
self.
|
1241
|
-
if 3 < len(args):
|
1242
|
-
self.SharedVariables = args[3]
|
1243
|
-
if "SharedVariables" in kwargs:
|
1244
|
-
self.SharedVariables = kwargs["SharedVariables"]
|
1066
|
+
self.Source = args[2]
|
1067
|
+
if "Source" in kwargs:
|
1068
|
+
self.Source = kwargs["Source"]
|
1245
1069
|
if 4 < len(args):
|
1246
|
-
self.
|
1247
|
-
if "
|
1248
|
-
self.
|
1249
|
-
if 5 < len(args):
|
1250
|
-
self.PrivateMethods = args[5]
|
1251
|
-
if "PrivateMethods" in kwargs:
|
1252
|
-
self.PrivateMethods = kwargs["PrivateMethods"]
|
1253
|
-
if 6 < len(args):
|
1254
|
-
self.UnknownFunctionHandler = args[6]
|
1255
|
-
if "UnknownFunctionHandler" in kwargs:
|
1256
|
-
self.UnknownFunctionHandler = kwargs["UnknownFunctionHandler"]
|
1070
|
+
self.Duration = args[4]
|
1071
|
+
if "Duration" in kwargs:
|
1072
|
+
self.Duration = kwargs["Duration"]
|
1257
1073
|
def __del__(self):
|
1258
1074
|
_api.DecRef(self.handle)
|
1259
1075
|
def __str__(self):
|
1260
1076
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1261
|
-
sv = 'api.
|
1077
|
+
sv = 'api.VMError{'
|
1262
1078
|
first = True
|
1263
1079
|
for v in pr:
|
1264
1080
|
if callable(v[1]):
|
@@ -1271,77 +1087,86 @@ class ClassDefinition(go.GoClass):
|
|
1271
1087
|
return sv + '}'
|
1272
1088
|
def __repr__(self):
|
1273
1089
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1274
|
-
sv = 'api.
|
1090
|
+
sv = 'api.VMError ( '
|
1275
1091
|
for v in pr:
|
1276
1092
|
if not callable(v[1]):
|
1277
1093
|
sv += v[0] + '=' + str(v[1]) + ', '
|
1278
1094
|
return sv + ')'
|
1279
1095
|
@property
|
1280
|
-
def
|
1281
|
-
return _api.
|
1282
|
-
@
|
1283
|
-
def
|
1284
|
-
if isinstance(value, go.GoClass):
|
1285
|
-
_api.api_ClassDefinition_Name_Set(self.handle, value.handle)
|
1286
|
-
else:
|
1287
|
-
_api.api_ClassDefinition_Name_Set(self.handle, value)
|
1288
|
-
@property
|
1289
|
-
def PublicVariables(self):
|
1290
|
-
return Map_string_Ptr_api_ClassVariable(handle=_api.api_ClassDefinition_PublicVariables_Get(self.handle))
|
1291
|
-
@PublicVariables.setter
|
1292
|
-
def PublicVariables(self, value):
|
1293
|
-
if isinstance(value, go.GoClass):
|
1294
|
-
_api.api_ClassDefinition_PublicVariables_Set(self.handle, value.handle)
|
1295
|
-
else:
|
1296
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1297
|
-
@property
|
1298
|
-
def PrivateVariables(self):
|
1299
|
-
return Map_string_Ptr_api_ClassVariable(handle=_api.api_ClassDefinition_PrivateVariables_Get(self.handle))
|
1300
|
-
@PrivateVariables.setter
|
1301
|
-
def PrivateVariables(self, value):
|
1302
|
-
if isinstance(value, go.GoClass):
|
1303
|
-
_api.api_ClassDefinition_PrivateVariables_Set(self.handle, value.handle)
|
1304
|
-
else:
|
1305
|
-
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1306
|
-
@property
|
1307
|
-
def SharedVariables(self):
|
1308
|
-
return Map_string_Ptr_api_ClassVariable(handle=_api.api_ClassDefinition_SharedVariables_Get(self.handle))
|
1309
|
-
@SharedVariables.setter
|
1310
|
-
def SharedVariables(self, value):
|
1096
|
+
def Type(self):
|
1097
|
+
return _api.api_VMError_Type_Get(self.handle)
|
1098
|
+
@Type.setter
|
1099
|
+
def Type(self, value):
|
1311
1100
|
if isinstance(value, go.GoClass):
|
1312
|
-
_api.
|
1101
|
+
_api.api_VMError_Type_Set(self.handle, value.handle)
|
1313
1102
|
else:
|
1314
|
-
|
1103
|
+
_api.api_VMError_Type_Set(self.handle, value)
|
1315
1104
|
@property
|
1316
|
-
def
|
1317
|
-
return
|
1318
|
-
@
|
1319
|
-
def
|
1105
|
+
def Message(self):
|
1106
|
+
return _api.api_VMError_Message_Get(self.handle)
|
1107
|
+
@Message.setter
|
1108
|
+
def Message(self, value):
|
1320
1109
|
if isinstance(value, go.GoClass):
|
1321
|
-
_api.
|
1110
|
+
_api.api_VMError_Message_Set(self.handle, value.handle)
|
1322
1111
|
else:
|
1323
|
-
|
1112
|
+
_api.api_VMError_Message_Set(self.handle, value)
|
1324
1113
|
@property
|
1325
|
-
def
|
1326
|
-
return
|
1327
|
-
@
|
1328
|
-
def
|
1114
|
+
def Source(self):
|
1115
|
+
return SourceLocation(handle=_api.api_VMError_Source_Get(self.handle))
|
1116
|
+
@Source.setter
|
1117
|
+
def Source(self, value):
|
1329
1118
|
if isinstance(value, go.GoClass):
|
1330
|
-
_api.
|
1119
|
+
_api.api_VMError_Source_Set(self.handle, value.handle)
|
1331
1120
|
else:
|
1332
1121
|
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1333
1122
|
@property
|
1334
|
-
def
|
1335
|
-
return
|
1336
|
-
@
|
1337
|
-
def
|
1123
|
+
def Duration(self):
|
1124
|
+
return _api.api_VMError_Duration_Get(self.handle)
|
1125
|
+
@Duration.setter
|
1126
|
+
def Duration(self, value):
|
1338
1127
|
if isinstance(value, go.GoClass):
|
1339
|
-
_api.
|
1128
|
+
_api.api_VMError_Duration_Set(self.handle, value.handle)
|
1340
1129
|
else:
|
1341
|
-
|
1130
|
+
_api.api_VMError_Duration_Set(self.handle, value)
|
1131
|
+
def Error(self):
|
1132
|
+
"""Error() str"""
|
1133
|
+
return _api.api_VMError_Error(self.handle)
|
1134
|
+
def Unwrap(self):
|
1135
|
+
"""Unwrap() str"""
|
1136
|
+
return _api.api_VMError_Unwrap(self.handle)
|
1137
|
+
def IsCompileError(self):
|
1138
|
+
"""IsCompileError() bool
|
1139
|
+
|
1140
|
+
IsCompileError returns true if the error is a compilation error
|
1141
|
+
"""
|
1142
|
+
return _api.api_VMError_IsCompileError(self.handle)
|
1143
|
+
def IsRuntimeError(self):
|
1144
|
+
"""IsRuntimeError() bool
|
1145
|
+
|
1146
|
+
IsRuntimeError returns true if the error is a runtime error
|
1147
|
+
"""
|
1148
|
+
return _api.api_VMError_IsRuntimeError(self.handle)
|
1149
|
+
def IsTimeoutError(self):
|
1150
|
+
"""IsTimeoutError() bool
|
1151
|
+
|
1152
|
+
IsTimeoutError returns true if the error is a timeout error
|
1153
|
+
"""
|
1154
|
+
return _api.api_VMError_IsTimeoutError(self.handle)
|
1155
|
+
def IsConversionError(self):
|
1156
|
+
"""IsConversionError() bool
|
1157
|
+
|
1158
|
+
IsConversionError returns true if the error is a type conversion error
|
1159
|
+
"""
|
1160
|
+
return _api.api_VMError_IsConversionError(self.handle)
|
1161
|
+
def IsConfigError(self):
|
1162
|
+
"""IsConfigError() bool
|
1163
|
+
|
1164
|
+
IsConfigError returns true if the error is a configuration error
|
1165
|
+
"""
|
1166
|
+
return _api.api_VMError_IsConfigError(self.handle)
|
1342
1167
|
|
1343
|
-
# Python type for struct api.
|
1344
|
-
class
|
1168
|
+
# Python type for struct api.ClassMethod
|
1169
|
+
class ClassMethod(go.GoClass):
|
1345
1170
|
""""""
|
1346
1171
|
def __init__(self, *args, **kwargs):
|
1347
1172
|
"""
|
@@ -1356,25 +1181,21 @@ class ClassVariable(go.GoClass):
|
|
1356
1181
|
self.handle = args[0].handle
|
1357
1182
|
_api.IncRef(self.handle)
|
1358
1183
|
else:
|
1359
|
-
self.handle = _api.
|
1184
|
+
self.handle = _api.api_ClassMethod_CTor()
|
1360
1185
|
_api.IncRef(self.handle)
|
1361
1186
|
if 0 < len(args):
|
1362
1187
|
self.Name = args[0]
|
1363
1188
|
if "Name" in kwargs:
|
1364
1189
|
self.Name = kwargs["Name"]
|
1365
1190
|
if 1 < len(args):
|
1366
|
-
self.
|
1367
|
-
if "
|
1368
|
-
self.
|
1369
|
-
if 2 < len(args):
|
1370
|
-
self.Locked = args[2]
|
1371
|
-
if "Locked" in kwargs:
|
1372
|
-
self.Locked = kwargs["Locked"]
|
1191
|
+
self.Argc = args[1]
|
1192
|
+
if "Argc" in kwargs:
|
1193
|
+
self.Argc = kwargs["Argc"]
|
1373
1194
|
def __del__(self):
|
1374
1195
|
_api.DecRef(self.handle)
|
1375
1196
|
def __str__(self):
|
1376
1197
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1377
|
-
sv = 'api.
|
1198
|
+
sv = 'api.ClassMethod{'
|
1378
1199
|
first = True
|
1379
1200
|
for v in pr:
|
1380
1201
|
if callable(v[1]):
|
@@ -1387,38 +1208,29 @@ class ClassVariable(go.GoClass):
|
|
1387
1208
|
return sv + '}'
|
1388
1209
|
def __repr__(self):
|
1389
1210
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1390
|
-
sv = 'api.
|
1211
|
+
sv = 'api.ClassMethod ( '
|
1391
1212
|
for v in pr:
|
1392
1213
|
if not callable(v[1]):
|
1393
1214
|
sv += v[0] + '=' + str(v[1]) + ', '
|
1394
1215
|
return sv + ')'
|
1395
1216
|
@property
|
1396
1217
|
def Name(self):
|
1397
|
-
return _api.
|
1218
|
+
return _api.api_ClassMethod_Name_Get(self.handle)
|
1398
1219
|
@Name.setter
|
1399
1220
|
def Name(self, value):
|
1400
1221
|
if isinstance(value, go.GoClass):
|
1401
|
-
_api.
|
1402
|
-
else:
|
1403
|
-
_api.api_ClassVariable_Name_Set(self.handle, value)
|
1404
|
-
@property
|
1405
|
-
def Value(self):
|
1406
|
-
return GoValue(handle=_api.api_ClassVariable_Value_Get(self.handle))
|
1407
|
-
@Value.setter
|
1408
|
-
def Value(self, value):
|
1409
|
-
if isinstance(value, go.GoClass):
|
1410
|
-
_api.api_ClassVariable_Value_Set(self.handle, value.handle)
|
1222
|
+
_api.api_ClassMethod_Name_Set(self.handle, value.handle)
|
1411
1223
|
else:
|
1412
|
-
|
1224
|
+
_api.api_ClassMethod_Name_Set(self.handle, value)
|
1413
1225
|
@property
|
1414
|
-
def
|
1415
|
-
return _api.
|
1416
|
-
@
|
1417
|
-
def
|
1226
|
+
def Argc(self):
|
1227
|
+
return _api.api_ClassMethod_Argc_Get(self.handle)
|
1228
|
+
@Argc.setter
|
1229
|
+
def Argc(self, value):
|
1418
1230
|
if isinstance(value, go.GoClass):
|
1419
|
-
_api.
|
1231
|
+
_api.api_ClassMethod_Argc_Set(self.handle, value.handle)
|
1420
1232
|
else:
|
1421
|
-
_api.
|
1233
|
+
_api.api_ClassMethod_Argc_Set(self.handle, value)
|
1422
1234
|
|
1423
1235
|
# Python type for struct api.ExecutionResult
|
1424
1236
|
class ExecutionResult(go.GoClass):
|
@@ -1506,9 +1318,9 @@ class ExecutionResult(go.GoClass):
|
|
1506
1318
|
else:
|
1507
1319
|
_api.api_ExecutionResult_Output_Set(self.handle, value)
|
1508
1320
|
|
1509
|
-
# Python type for struct api.
|
1510
|
-
class
|
1511
|
-
""""""
|
1321
|
+
# Python type for struct api.SourceLocation
|
1322
|
+
class SourceLocation(go.GoClass):
|
1323
|
+
"""SourceLocation represents a location in source code\n"""
|
1512
1324
|
def __init__(self, *args, **kwargs):
|
1513
1325
|
"""
|
1514
1326
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
@@ -1522,13 +1334,25 @@ class GoValue(go.GoClass):
|
|
1522
1334
|
self.handle = args[0].handle
|
1523
1335
|
_api.IncRef(self.handle)
|
1524
1336
|
else:
|
1525
|
-
self.handle = _api.
|
1337
|
+
self.handle = _api.api_SourceLocation_CTor()
|
1526
1338
|
_api.IncRef(self.handle)
|
1339
|
+
if 0 < len(args):
|
1340
|
+
self.Filename = args[0]
|
1341
|
+
if "Filename" in kwargs:
|
1342
|
+
self.Filename = kwargs["Filename"]
|
1343
|
+
if 1 < len(args):
|
1344
|
+
self.Line = args[1]
|
1345
|
+
if "Line" in kwargs:
|
1346
|
+
self.Line = kwargs["Line"]
|
1347
|
+
if 2 < len(args):
|
1348
|
+
self.Column = args[2]
|
1349
|
+
if "Column" in kwargs:
|
1350
|
+
self.Column = kwargs["Column"]
|
1527
1351
|
def __del__(self):
|
1528
1352
|
_api.DecRef(self.handle)
|
1529
1353
|
def __str__(self):
|
1530
1354
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1531
|
-
sv = 'api.
|
1355
|
+
sv = 'api.SourceLocation{'
|
1532
1356
|
first = True
|
1533
1357
|
for v in pr:
|
1534
1358
|
if callable(v[1]):
|
@@ -1541,45 +1365,218 @@ class GoValue(go.GoClass):
|
|
1541
1365
|
return sv + '}'
|
1542
1366
|
def __repr__(self):
|
1543
1367
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1544
|
-
sv = 'api.
|
1368
|
+
sv = 'api.SourceLocation ( '
|
1545
1369
|
for v in pr:
|
1546
1370
|
if not callable(v[1]):
|
1547
1371
|
sv += v[0] + '=' + str(v[1]) + ', '
|
1548
1372
|
return sv + ')'
|
1549
|
-
|
1550
|
-
|
1551
|
-
return _api.
|
1552
|
-
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1556
|
-
|
1557
|
-
|
1558
|
-
|
1559
|
-
|
1560
|
-
return _api.
|
1561
|
-
|
1562
|
-
|
1563
|
-
|
1564
|
-
|
1565
|
-
|
1566
|
-
|
1567
|
-
|
1568
|
-
|
1569
|
-
return _api.
|
1570
|
-
|
1571
|
-
|
1572
|
-
|
1573
|
-
|
1574
|
-
|
1575
|
-
|
1576
|
-
|
1577
|
-
|
1578
|
-
|
1373
|
+
@property
|
1374
|
+
def Filename(self):
|
1375
|
+
return _api.api_SourceLocation_Filename_Get(self.handle)
|
1376
|
+
@Filename.setter
|
1377
|
+
def Filename(self, value):
|
1378
|
+
if isinstance(value, go.GoClass):
|
1379
|
+
_api.api_SourceLocation_Filename_Set(self.handle, value.handle)
|
1380
|
+
else:
|
1381
|
+
_api.api_SourceLocation_Filename_Set(self.handle, value)
|
1382
|
+
@property
|
1383
|
+
def Line(self):
|
1384
|
+
return _api.api_SourceLocation_Line_Get(self.handle)
|
1385
|
+
@Line.setter
|
1386
|
+
def Line(self, value):
|
1387
|
+
if isinstance(value, go.GoClass):
|
1388
|
+
_api.api_SourceLocation_Line_Set(self.handle, value.handle)
|
1389
|
+
else:
|
1390
|
+
_api.api_SourceLocation_Line_Set(self.handle, value)
|
1391
|
+
@property
|
1392
|
+
def Column(self):
|
1393
|
+
return _api.api_SourceLocation_Column_Get(self.handle)
|
1394
|
+
@Column.setter
|
1395
|
+
def Column(self, value):
|
1396
|
+
if isinstance(value, go.GoClass):
|
1397
|
+
_api.api_SourceLocation_Column_Set(self.handle, value.handle)
|
1398
|
+
else:
|
1399
|
+
_api.api_SourceLocation_Column_Set(self.handle, value)
|
1400
|
+
|
1401
|
+
# Python type for struct api.VM
|
1402
|
+
class VM(go.GoClass):
|
1403
|
+
"""VM represents an Objective-LOL virtual machine instance\n"""
|
1404
|
+
def __init__(self, *args, **kwargs):
|
1405
|
+
"""
|
1406
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
1407
|
+
otherwise parameters can be unnamed in order of field names or named fields
|
1408
|
+
in which case a new Go object is constructed first
|
1409
|
+
"""
|
1410
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
1411
|
+
self.handle = kwargs['handle']
|
1412
|
+
_api.IncRef(self.handle)
|
1413
|
+
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
1414
|
+
self.handle = args[0].handle
|
1415
|
+
_api.IncRef(self.handle)
|
1416
|
+
else:
|
1417
|
+
self.handle = _api.api_VM_CTor()
|
1418
|
+
_api.IncRef(self.handle)
|
1419
|
+
def __del__(self):
|
1420
|
+
_api.DecRef(self.handle)
|
1421
|
+
def __str__(self):
|
1422
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1423
|
+
sv = 'api.VM{'
|
1424
|
+
first = True
|
1425
|
+
for v in pr:
|
1426
|
+
if callable(v[1]):
|
1427
|
+
continue
|
1428
|
+
if first:
|
1429
|
+
first = False
|
1430
|
+
else:
|
1431
|
+
sv += ', '
|
1432
|
+
sv += v[0] + '=' + str(v[1])
|
1433
|
+
return sv + '}'
|
1434
|
+
def __repr__(self):
|
1435
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1436
|
+
sv = 'api.VM ( '
|
1437
|
+
for v in pr:
|
1438
|
+
if not callable(v[1]):
|
1439
|
+
sv += v[0] + '=' + str(v[1]) + ', '
|
1440
|
+
return sv + ')'
|
1441
|
+
def GetCompatibilityShim(self):
|
1442
|
+
"""GetCompatibilityShim() object
|
1443
|
+
|
1444
|
+
GetCompatibilityShim returns a compatibility shim for the VM
|
1445
|
+
"""
|
1446
|
+
return VMCompatibilityShim(handle=_api.api_VM_GetCompatibilityShim(self.handle))
|
1447
|
+
def Execute(self, code):
|
1448
|
+
"""Execute(str code) object, str
|
1449
|
+
|
1450
|
+
Execute executes Objective-LOL code from a string
|
1451
|
+
"""
|
1452
|
+
return ExecutionResult(handle=_api.api_VM_Execute(self.handle, code))
|
1453
|
+
def ExecuteWithContext(self, ctx, code):
|
1454
|
+
"""ExecuteWithContext(object ctx, str code) object, str
|
1455
|
+
|
1456
|
+
ExecuteWithContext executes code with a context for cancellation/timeout
|
1457
|
+
"""
|
1458
|
+
return ExecutionResult(handle=_api.api_VM_ExecuteWithContext(self.handle, ctx.handle, code))
|
1459
|
+
def NewObjectInstance(self, className):
|
1460
|
+
"""NewObjectInstance(str className) object, str"""
|
1461
|
+
return GoValue(handle=_api.api_VM_NewObjectInstance(self.handle, className))
|
1462
|
+
def Call(self, functionName, args):
|
1463
|
+
"""Call(str functionName, []object args) object, str
|
1464
|
+
|
1465
|
+
Call calls an Objective-LOL function with the given arguments
|
1466
|
+
"""
|
1467
|
+
return GoValue(handle=_api.api_VM_Call(self.handle, functionName, args.handle))
|
1468
|
+
def CallMethod(self, object, methodName, args):
|
1469
|
+
"""CallMethod(object object, str methodName, []object args) object, str
|
1470
|
+
|
1471
|
+
CallMethod calls a method on an Objective-LOL object
|
1472
|
+
"""
|
1473
|
+
return GoValue(handle=_api.api_VM_CallMethod(self.handle, object.handle, methodName, args.handle))
|
1474
|
+
def DefineVariable(self, name, value, constant):
|
1475
|
+
"""DefineVariable(str name, object value, bool constant) str
|
1476
|
+
|
1477
|
+
DefineVariable defines a global variable in the VM
|
1478
|
+
"""
|
1479
|
+
return _api.api_VM_DefineVariable(self.handle, name, value.handle, constant)
|
1480
|
+
def SetVariable(self, variableName, value):
|
1481
|
+
"""SetVariable(str variableName, object value) str
|
1482
|
+
|
1483
|
+
SetVariable sets a variable in the global environment
|
1484
|
+
"""
|
1485
|
+
return _api.api_VM_SetVariable(self.handle, variableName, value.handle)
|
1486
|
+
def GetVariable(self, variableName):
|
1487
|
+
"""GetVariable(str variableName) object, str
|
1488
|
+
|
1489
|
+
Get gets a variable from the global environment
|
1490
|
+
"""
|
1491
|
+
return GoValue(handle=_api.api_VM_GetVariable(self.handle, variableName))
|
1492
|
+
def DefineClass(self, classDef):
|
1493
|
+
"""DefineClass(object classDef) str"""
|
1494
|
+
return _api.api_VM_DefineClass(self.handle, classDef.handle)
|
1495
|
+
|
1496
|
+
# Python type for struct api.VMCompatibilityShim
|
1497
|
+
class VMCompatibilityShim(go.GoClass):
|
1498
|
+
"""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"""
|
1499
|
+
def __init__(self, *args, **kwargs):
|
1500
|
+
"""
|
1501
|
+
handle=A Go-side object is always initialized with an explicit handle=arg
|
1502
|
+
otherwise parameters can be unnamed in order of field names or named fields
|
1503
|
+
in which case a new Go object is constructed first
|
1504
|
+
"""
|
1505
|
+
if len(kwargs) == 1 and 'handle' in kwargs:
|
1506
|
+
self.handle = kwargs['handle']
|
1507
|
+
_api.IncRef(self.handle)
|
1508
|
+
elif len(args) == 1 and isinstance(args[0], go.GoClass):
|
1509
|
+
self.handle = args[0].handle
|
1510
|
+
_api.IncRef(self.handle)
|
1511
|
+
else:
|
1512
|
+
self.handle = _api.api_VMCompatibilityShim_CTor()
|
1513
|
+
_api.IncRef(self.handle)
|
1514
|
+
def __del__(self):
|
1515
|
+
_api.DecRef(self.handle)
|
1516
|
+
def __str__(self):
|
1517
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1518
|
+
sv = 'api.VMCompatibilityShim{'
|
1519
|
+
first = True
|
1520
|
+
for v in pr:
|
1521
|
+
if callable(v[1]):
|
1522
|
+
continue
|
1523
|
+
if first:
|
1524
|
+
first = False
|
1525
|
+
else:
|
1526
|
+
sv += ', '
|
1527
|
+
sv += v[0] + '=' + str(v[1])
|
1528
|
+
return sv + '}'
|
1529
|
+
def __repr__(self):
|
1530
|
+
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1531
|
+
sv = 'api.VMCompatibilityShim ( '
|
1532
|
+
for v in pr:
|
1533
|
+
if not callable(v[1]):
|
1534
|
+
sv += v[0] + '=' + str(v[1]) + ', '
|
1535
|
+
return sv + ')'
|
1536
|
+
def DefineFunction(self, id, name, argc, function):
|
1537
|
+
"""DefineFunction(str id, str name, int argc, callable function) str
|
1538
|
+
|
1539
|
+
DefineFunction defines a global function with maximum compatibility,
|
1540
|
+
wrapping arguments and return values as JSON strings.
|
1541
|
+
An optional id cookie is passed back to the function to identify it.
|
1542
|
+
jsonArgs is a JSON array string of the arguments.
|
1543
|
+
The function should return a JSON object string with "result" and "error" fields.
|
1544
|
+
"""
|
1545
|
+
return _api.api_VMCompatibilityShim_DefineFunction(self.handle, id, name, argc, function)
|
1546
|
+
def BuildNewClassVariableWithGetter(self, variable, getterID, getter):
|
1547
|
+
"""BuildNewClassVariableWithGetter(object variable, str getterID, callable getter) object"""
|
1548
|
+
return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithGetter(self.handle, variable.handle, getterID, getter))
|
1549
|
+
def BuildNewClassVariableWithSetter(self, variable, setterID, setter):
|
1550
|
+
"""BuildNewClassVariableWithSetter(object variable, str setterID, callable setter) object"""
|
1551
|
+
return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithSetter(self.handle, variable.handle, setterID, setter))
|
1552
|
+
def BuildNewClassMethod(self, method, id, function):
|
1553
|
+
"""BuildNewClassMethod(object method, str id, callable function) object"""
|
1554
|
+
return ClassMethod(handle=_api.api_VMCompatibilityShim_BuildNewClassMethod(self.handle, method.handle, id, function))
|
1555
|
+
def BuildNewUnknownFunctionHandler(self, id, function):
|
1556
|
+
"""BuildNewUnknownFunctionHandler(str id, callable function) object"""
|
1557
|
+
return UnknownFunctionHandler(handle=_api.api_VMCompatibilityShim_BuildNewUnknownFunctionHandler(self.handle, id, function))
|
1558
|
+
def IsClassDefined(self, name):
|
1559
|
+
"""IsClassDefined(str name) bool"""
|
1560
|
+
return _api.api_VMCompatibilityShim_IsClassDefined(self.handle, name)
|
1561
|
+
def LookupObject(self, id):
|
1562
|
+
"""LookupObject(str id) object, str"""
|
1563
|
+
return GoValue(handle=_api.api_VMCompatibilityShim_LookupObject(self.handle, id))
|
1564
|
+
def GetObjectMRO(self, id):
|
1565
|
+
"""GetObjectMRO(str id) []str, str"""
|
1566
|
+
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectMRO(self.handle, id))
|
1567
|
+
def GetObjectImmediateFunctions(self, id):
|
1568
|
+
"""GetObjectImmediateFunctions(str id) []str, str"""
|
1569
|
+
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateFunctions(self.handle, id))
|
1570
|
+
def GetObjectImmediateVariables(self, id):
|
1571
|
+
"""GetObjectImmediateVariables(str id) []str, str"""
|
1572
|
+
return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateVariables(self.handle, id))
|
1573
|
+
def AddVariableToObject(self, id, variable):
|
1574
|
+
"""AddVariableToObject(str id, object variable) str"""
|
1575
|
+
return _api.api_VMCompatibilityShim_AddVariableToObject(self.handle, id, variable.handle)
|
1579
1576
|
|
1580
|
-
# Python type for struct api.
|
1581
|
-
class
|
1582
|
-
"""
|
1577
|
+
# Python type for struct api.ClassDefinition
|
1578
|
+
class ClassDefinition(go.GoClass):
|
1579
|
+
""""""
|
1583
1580
|
def __init__(self, *args, **kwargs):
|
1584
1581
|
"""
|
1585
1582
|
handle=A Go-side object is always initialized with an explicit handle=arg
|
@@ -1593,29 +1590,41 @@ class VMError(go.GoClass):
|
|
1593
1590
|
self.handle = args[0].handle
|
1594
1591
|
_api.IncRef(self.handle)
|
1595
1592
|
else:
|
1596
|
-
self.handle = _api.
|
1593
|
+
self.handle = _api.api_ClassDefinition_CTor()
|
1597
1594
|
_api.IncRef(self.handle)
|
1598
1595
|
if 0 < len(args):
|
1599
|
-
self.
|
1600
|
-
if "
|
1601
|
-
self.
|
1596
|
+
self.Name = args[0]
|
1597
|
+
if "Name" in kwargs:
|
1598
|
+
self.Name = kwargs["Name"]
|
1602
1599
|
if 1 < len(args):
|
1603
|
-
self.
|
1604
|
-
if "
|
1605
|
-
self.
|
1600
|
+
self.PublicVariables = args[1]
|
1601
|
+
if "PublicVariables" in kwargs:
|
1602
|
+
self.PublicVariables = kwargs["PublicVariables"]
|
1606
1603
|
if 2 < len(args):
|
1607
|
-
self.
|
1608
|
-
if "
|
1609
|
-
self.
|
1604
|
+
self.PrivateVariables = args[2]
|
1605
|
+
if "PrivateVariables" in kwargs:
|
1606
|
+
self.PrivateVariables = kwargs["PrivateVariables"]
|
1607
|
+
if 3 < len(args):
|
1608
|
+
self.SharedVariables = args[3]
|
1609
|
+
if "SharedVariables" in kwargs:
|
1610
|
+
self.SharedVariables = kwargs["SharedVariables"]
|
1610
1611
|
if 4 < len(args):
|
1611
|
-
self.
|
1612
|
-
if "
|
1613
|
-
self.
|
1612
|
+
self.PublicMethods = args[4]
|
1613
|
+
if "PublicMethods" in kwargs:
|
1614
|
+
self.PublicMethods = kwargs["PublicMethods"]
|
1615
|
+
if 5 < len(args):
|
1616
|
+
self.PrivateMethods = args[5]
|
1617
|
+
if "PrivateMethods" in kwargs:
|
1618
|
+
self.PrivateMethods = kwargs["PrivateMethods"]
|
1619
|
+
if 6 < len(args):
|
1620
|
+
self.UnknownFunctionHandler = args[6]
|
1621
|
+
if "UnknownFunctionHandler" in kwargs:
|
1622
|
+
self.UnknownFunctionHandler = kwargs["UnknownFunctionHandler"]
|
1614
1623
|
def __del__(self):
|
1615
1624
|
_api.DecRef(self.handle)
|
1616
1625
|
def __str__(self):
|
1617
1626
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1618
|
-
sv = 'api.
|
1627
|
+
sv = 'api.ClassDefinition{'
|
1619
1628
|
first = True
|
1620
1629
|
for v in pr:
|
1621
1630
|
if callable(v[1]):
|
@@ -1628,83 +1637,74 @@ class VMError(go.GoClass):
|
|
1628
1637
|
return sv + '}'
|
1629
1638
|
def __repr__(self):
|
1630
1639
|
pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
|
1631
|
-
sv = 'api.
|
1640
|
+
sv = 'api.ClassDefinition ( '
|
1632
1641
|
for v in pr:
|
1633
1642
|
if not callable(v[1]):
|
1634
1643
|
sv += v[0] + '=' + str(v[1]) + ', '
|
1635
1644
|
return sv + ')'
|
1636
1645
|
@property
|
1637
|
-
def
|
1638
|
-
return _api.
|
1639
|
-
@
|
1640
|
-
def
|
1646
|
+
def Name(self):
|
1647
|
+
return _api.api_ClassDefinition_Name_Get(self.handle)
|
1648
|
+
@Name.setter
|
1649
|
+
def Name(self, value):
|
1641
1650
|
if isinstance(value, go.GoClass):
|
1642
|
-
_api.
|
1651
|
+
_api.api_ClassDefinition_Name_Set(self.handle, value.handle)
|
1643
1652
|
else:
|
1644
|
-
_api.
|
1653
|
+
_api.api_ClassDefinition_Name_Set(self.handle, value)
|
1645
1654
|
@property
|
1646
|
-
def
|
1647
|
-
return _api.
|
1648
|
-
@
|
1649
|
-
def
|
1655
|
+
def PublicVariables(self):
|
1656
|
+
return Map_string_Ptr_api_ClassVariable(handle=_api.api_ClassDefinition_PublicVariables_Get(self.handle))
|
1657
|
+
@PublicVariables.setter
|
1658
|
+
def PublicVariables(self, value):
|
1650
1659
|
if isinstance(value, go.GoClass):
|
1651
|
-
_api.
|
1660
|
+
_api.api_ClassDefinition_PublicVariables_Set(self.handle, value.handle)
|
1652
1661
|
else:
|
1653
|
-
|
1662
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1654
1663
|
@property
|
1655
|
-
def
|
1656
|
-
return
|
1657
|
-
@
|
1658
|
-
def
|
1664
|
+
def PrivateVariables(self):
|
1665
|
+
return Map_string_Ptr_api_ClassVariable(handle=_api.api_ClassDefinition_PrivateVariables_Get(self.handle))
|
1666
|
+
@PrivateVariables.setter
|
1667
|
+
def PrivateVariables(self, value):
|
1659
1668
|
if isinstance(value, go.GoClass):
|
1660
|
-
_api.
|
1669
|
+
_api.api_ClassDefinition_PrivateVariables_Set(self.handle, value.handle)
|
1661
1670
|
else:
|
1662
1671
|
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1663
1672
|
@property
|
1664
|
-
def
|
1665
|
-
return _api.
|
1666
|
-
@
|
1667
|
-
def
|
1673
|
+
def SharedVariables(self):
|
1674
|
+
return Map_string_Ptr_api_ClassVariable(handle=_api.api_ClassDefinition_SharedVariables_Get(self.handle))
|
1675
|
+
@SharedVariables.setter
|
1676
|
+
def SharedVariables(self, value):
|
1668
1677
|
if isinstance(value, go.GoClass):
|
1669
|
-
_api.
|
1678
|
+
_api.api_ClassDefinition_SharedVariables_Set(self.handle, value.handle)
|
1670
1679
|
else:
|
1671
|
-
|
1672
|
-
|
1673
|
-
|
1674
|
-
return _api.
|
1675
|
-
|
1676
|
-
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1680
|
-
|
1681
|
-
|
1682
|
-
|
1683
|
-
return _api.
|
1684
|
-
|
1685
|
-
|
1686
|
-
|
1687
|
-
|
1688
|
-
|
1689
|
-
|
1690
|
-
|
1691
|
-
|
1692
|
-
|
1693
|
-
|
1694
|
-
|
1695
|
-
|
1696
|
-
|
1697
|
-
|
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)
|
1680
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1681
|
+
@property
|
1682
|
+
def PublicMethods(self):
|
1683
|
+
return Map_string_Ptr_api_ClassMethod(handle=_api.api_ClassDefinition_PublicMethods_Get(self.handle))
|
1684
|
+
@PublicMethods.setter
|
1685
|
+
def PublicMethods(self, value):
|
1686
|
+
if isinstance(value, go.GoClass):
|
1687
|
+
_api.api_ClassDefinition_PublicMethods_Set(self.handle, value.handle)
|
1688
|
+
else:
|
1689
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1690
|
+
@property
|
1691
|
+
def PrivateMethods(self):
|
1692
|
+
return Map_string_Ptr_api_ClassMethod(handle=_api.api_ClassDefinition_PrivateMethods_Get(self.handle))
|
1693
|
+
@PrivateMethods.setter
|
1694
|
+
def PrivateMethods(self, value):
|
1695
|
+
if isinstance(value, go.GoClass):
|
1696
|
+
_api.api_ClassDefinition_PrivateMethods_Set(self.handle, value.handle)
|
1697
|
+
else:
|
1698
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1699
|
+
@property
|
1700
|
+
def UnknownFunctionHandler(self):
|
1701
|
+
return UnknownFunctionHandler(handle=_api.api_ClassDefinition_UnknownFunctionHandler_Get(self.handle))
|
1702
|
+
@UnknownFunctionHandler.setter
|
1703
|
+
def UnknownFunctionHandler(self, value):
|
1704
|
+
if isinstance(value, go.GoClass):
|
1705
|
+
_api.api_ClassDefinition_UnknownFunctionHandler_Set(self.handle, value.handle)
|
1706
|
+
else:
|
1707
|
+
raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
|
1708
1708
|
|
1709
1709
|
|
1710
1710
|
# ---- Slices ---
|
@@ -1714,81 +1714,78 @@ class VMError(go.GoClass):
|
|
1714
1714
|
|
1715
1715
|
|
1716
1716
|
# ---- Constructors ---
|
1717
|
-
def DefaultConfig():
|
1718
|
-
"""DefaultConfig() object
|
1719
|
-
|
1720
|
-
DefaultConfig returns a default configuration
|
1721
|
-
"""
|
1722
|
-
return VMConfig(handle=_api.api_DefaultConfig())
|
1723
|
-
def NewVM(config):
|
1724
|
-
"""NewVM(object config) object, str
|
1725
|
-
|
1726
|
-
NewVM creates a new VM instance with the given config
|
1727
|
-
"""
|
1728
|
-
return VM(handle=_api.api_NewVM(config.handle))
|
1729
|
-
def NewClassDefinition():
|
1730
|
-
"""NewClassDefinition() object"""
|
1731
|
-
return ClassDefinition(handle=_api.api_NewClassDefinition())
|
1732
1717
|
def WrapBool(value):
|
1733
1718
|
"""WrapBool(bool value) object"""
|
1734
1719
|
return GoValue(handle=_api.api_WrapBool(value))
|
1720
|
+
def WrapFloat(value):
|
1721
|
+
"""WrapFloat(float value) object"""
|
1722
|
+
return GoValue(handle=_api.api_WrapFloat(value))
|
1735
1723
|
def WrapObject(value):
|
1736
1724
|
"""WrapObject(object value) object"""
|
1737
1725
|
return GoValue(handle=_api.api_WrapObject(value.handle))
|
1738
1726
|
def WrapString(value):
|
1739
1727
|
"""WrapString(str value) object"""
|
1740
1728
|
return GoValue(handle=_api.api_WrapString(value))
|
1741
|
-
def WrapAny(value):
|
1742
|
-
"""WrapAny(str value) object"""
|
1743
|
-
return GoValue(handle=_api.api_WrapAny(value))
|
1744
|
-
def WrapFloat(value):
|
1745
|
-
"""WrapFloat(float value) object"""
|
1746
|
-
return GoValue(handle=_api.api_WrapFloat(value))
|
1747
1729
|
def ToGoValue(val):
|
1748
1730
|
"""ToGoValue(object val) object, str
|
1749
1731
|
|
1750
1732
|
ToGoValue converts an Objective-LOL value to a Go value
|
1751
1733
|
"""
|
1752
1734
|
return GoValue(handle=_api.api_ToGoValue(val.handle))
|
1735
|
+
def WrapAny(value):
|
1736
|
+
"""WrapAny(str value) object"""
|
1737
|
+
return GoValue(handle=_api.api_WrapAny(value))
|
1753
1738
|
def WrapInt(value):
|
1754
1739
|
"""WrapInt(long value) object"""
|
1755
1740
|
return GoValue(handle=_api.api_WrapInt(value))
|
1756
|
-
def
|
1757
|
-
"""
|
1758
|
-
|
1759
|
-
NewRuntimeError creates a new runtime error
|
1760
|
-
"""
|
1761
|
-
return VMError(handle=_api.api_NewRuntimeError(message, source.handle))
|
1762
|
-
def NewTimeoutError(duration):
|
1763
|
-
"""NewTimeoutError(long duration) object
|
1741
|
+
def DefaultConfig():
|
1742
|
+
"""DefaultConfig() object
|
1764
1743
|
|
1765
|
-
|
1744
|
+
DefaultConfig returns a default configuration
|
1766
1745
|
"""
|
1767
|
-
return
|
1746
|
+
return VMConfig(handle=_api.api_DefaultConfig())
|
1768
1747
|
def NewCompileError(message, source):
|
1769
1748
|
"""NewCompileError(str message, object source) object
|
1770
1749
|
|
1771
1750
|
NewCompileError creates a new compile error
|
1772
1751
|
"""
|
1773
1752
|
return VMError(handle=_api.api_NewCompileError(message, source.handle))
|
1753
|
+
def NewTimeoutError(duration):
|
1754
|
+
"""NewTimeoutError(long duration) object
|
1755
|
+
|
1756
|
+
NewTimeoutError creates a new timeout error
|
1757
|
+
"""
|
1758
|
+
return VMError(handle=_api.api_NewTimeoutError(duration))
|
1774
1759
|
def NewConversionError(message, wrapped):
|
1775
1760
|
"""NewConversionError(str message, str wrapped) object
|
1776
1761
|
|
1777
1762
|
NewConversionError creates a new type conversion error
|
1778
1763
|
"""
|
1779
1764
|
return VMError(handle=_api.api_NewConversionError(message, wrapped))
|
1765
|
+
def NewRuntimeError(message, source):
|
1766
|
+
"""NewRuntimeError(str message, object source) object
|
1767
|
+
|
1768
|
+
NewRuntimeError creates a new runtime error
|
1769
|
+
"""
|
1770
|
+
return VMError(handle=_api.api_NewRuntimeError(message, source.handle))
|
1780
1771
|
def NewConfigError(message, wrapped):
|
1781
1772
|
"""NewConfigError(str message, str wrapped) object
|
1782
1773
|
|
1783
1774
|
NewConfigError creates a new configuration error
|
1784
1775
|
"""
|
1785
1776
|
return VMError(handle=_api.api_NewConfigError(message, wrapped))
|
1777
|
+
def NewVM(config):
|
1778
|
+
"""NewVM(object config) object, str
|
1779
|
+
|
1780
|
+
NewVM creates a new VM instance with the given config
|
1781
|
+
"""
|
1782
|
+
return VM(handle=_api.api_NewVM(config.handle))
|
1783
|
+
def NewClassDefinition():
|
1784
|
+
"""NewClassDefinition() object"""
|
1785
|
+
return ClassDefinition(handle=_api.api_NewClassDefinition())
|
1786
1786
|
|
1787
1787
|
|
1788
1788
|
# ---- Functions ---
|
1789
|
-
def LookupObject(id):
|
1790
|
-
"""LookupObject(str id) object, str"""
|
1791
|
-
return go.Ptr_environment_ObjectInstance(handle=_api.api_LookupObject(id))
|
1792
1789
|
def ConvertArguments(args):
|
1793
1790
|
"""ConvertArguments([]object args) []object, str
|
1794
1791
|
|
@@ -1801,5 +1798,8 @@ def FromGoValue(val):
|
|
1801
1798
|
FromGoValue converts a Go value to an Objective-LOL value
|
1802
1799
|
"""
|
1803
1800
|
return go.environment_Value(handle=_api.api_FromGoValue(val.handle))
|
1801
|
+
def LookupObject(id):
|
1802
|
+
"""LookupObject(str id) object, str"""
|
1803
|
+
return go.Ptr_environment_ObjectInstance(handle=_api.api_LookupObject(id))
|
1804
1804
|
|
1805
1805
|
|