objective-lol 0.0.1__cp39-cp39-macosx_11_0_arm64.whl → 0.0.2__cp39-cp39-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.py CHANGED
@@ -741,9 +741,9 @@ TimeoutErrorType = "timeout"
741
741
 
742
742
  # ---- Structs ---
743
743
 
744
- # Python type for struct api.ClassVariable
745
- class ClassVariable(go.GoClass):
746
- """"""
744
+ # Python type for struct api.VMConfig
745
+ class VMConfig(go.GoClass):
746
+ """VMConfig holds configuration options for the VM\n"""
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,25 +757,29 @@ class ClassVariable(go.GoClass):
757
757
  self.handle = args[0].handle
758
758
  _api.IncRef(self.handle)
759
759
  else:
760
- self.handle = _api.api_ClassVariable_CTor()
760
+ self.handle = _api.api_VMConfig_CTor()
761
761
  _api.IncRef(self.handle)
762
762
  if 0 < len(args):
763
- self.Name = args[0]
764
- if "Name" in kwargs:
765
- self.Name = kwargs["Name"]
763
+ self.Stdout = args[0]
764
+ if "Stdout" in kwargs:
765
+ self.Stdout = kwargs["Stdout"]
766
766
  if 1 < len(args):
767
- self.Value = args[1]
768
- if "Value" in kwargs:
769
- self.Value = kwargs["Value"]
767
+ self.Stdin = args[1]
768
+ if "Stdin" in kwargs:
769
+ self.Stdin = kwargs["Stdin"]
770
770
  if 2 < len(args):
771
- self.Locked = args[2]
772
- if "Locked" in kwargs:
773
- self.Locked = kwargs["Locked"]
771
+ self.Timeout = args[2]
772
+ if "Timeout" in kwargs:
773
+ self.Timeout = kwargs["Timeout"]
774
+ if 3 < len(args):
775
+ self.WorkingDirectory = args[3]
776
+ if "WorkingDirectory" in kwargs:
777
+ self.WorkingDirectory = kwargs["WorkingDirectory"]
774
778
  def __del__(self):
775
779
  _api.DecRef(self.handle)
776
780
  def __str__(self):
777
781
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
778
- sv = 'api.ClassVariable{'
782
+ sv = 'api.VMConfig{'
779
783
  first = True
780
784
  for v in pr:
781
785
  if callable(v[1]):
@@ -788,42 +792,61 @@ class ClassVariable(go.GoClass):
788
792
  return sv + '}'
789
793
  def __repr__(self):
790
794
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
791
- sv = 'api.ClassVariable ( '
795
+ sv = 'api.VMConfig ( '
792
796
  for v in pr:
793
797
  if not callable(v[1]):
794
798
  sv += v[0] + '=' + str(v[1]) + ', '
795
799
  return sv + ')'
796
800
  @property
797
- def Name(self):
798
- return _api.api_ClassVariable_Name_Get(self.handle)
799
- @Name.setter
800
- def Name(self, value):
801
+ def Stdout(self):
802
+ """I/O configuration
803
+ """
804
+ return go.io_Writer(handle=_api.api_VMConfig_Stdout_Get(self.handle))
805
+ @Stdout.setter
806
+ def Stdout(self, value):
801
807
  if isinstance(value, go.GoClass):
802
- _api.api_ClassVariable_Name_Set(self.handle, value.handle)
808
+ _api.api_VMConfig_Stdout_Set(self.handle, value.handle)
803
809
  else:
804
- _api.api_ClassVariable_Name_Set(self.handle, value)
810
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
805
811
  @property
806
- def Value(self):
807
- return GoValue(handle=_api.api_ClassVariable_Value_Get(self.handle))
808
- @Value.setter
809
- def Value(self, value):
812
+ def Stdin(self):
813
+ return go.io_Reader(handle=_api.api_VMConfig_Stdin_Get(self.handle))
814
+ @Stdin.setter
815
+ def Stdin(self, value):
810
816
  if isinstance(value, go.GoClass):
811
- _api.api_ClassVariable_Value_Set(self.handle, value.handle)
817
+ _api.api_VMConfig_Stdin_Set(self.handle, value.handle)
812
818
  else:
813
819
  raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
814
820
  @property
815
- def Locked(self):
816
- return _api.api_ClassVariable_Locked_Get(self.handle)
817
- @Locked.setter
818
- def Locked(self, value):
821
+ def Timeout(self):
822
+ """Execution configuration
823
+ """
824
+ return _api.api_VMConfig_Timeout_Get(self.handle)
825
+ @Timeout.setter
826
+ def Timeout(self, value):
819
827
  if isinstance(value, go.GoClass):
820
- _api.api_ClassVariable_Locked_Set(self.handle, value.handle)
828
+ _api.api_VMConfig_Timeout_Set(self.handle, value.handle)
821
829
  else:
822
- _api.api_ClassVariable_Locked_Set(self.handle, value)
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):
836
+ if isinstance(value, go.GoClass):
837
+ _api.api_VMConfig_WorkingDirectory_Set(self.handle, value.handle)
838
+ else:
839
+ _api.api_VMConfig_WorkingDirectory_Set(self.handle, value)
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)
823
846
 
824
- # Python type for struct api.SourceLocation
825
- class SourceLocation(go.GoClass):
826
- """SourceLocation represents a location in source code\n"""
847
+ # Python type for struct api.VMError
848
+ class VMError(go.GoClass):
849
+ """VMError represents errors that can occur in the VM API\n"""
827
850
  def __init__(self, *args, **kwargs):
828
851
  """
829
852
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -837,25 +860,29 @@ class SourceLocation(go.GoClass):
837
860
  self.handle = args[0].handle
838
861
  _api.IncRef(self.handle)
839
862
  else:
840
- self.handle = _api.api_SourceLocation_CTor()
863
+ self.handle = _api.api_VMError_CTor()
841
864
  _api.IncRef(self.handle)
842
865
  if 0 < len(args):
843
- self.Filename = args[0]
844
- if "Filename" in kwargs:
845
- self.Filename = kwargs["Filename"]
866
+ self.Type = args[0]
867
+ if "Type" in kwargs:
868
+ self.Type = kwargs["Type"]
846
869
  if 1 < len(args):
847
- self.Line = args[1]
848
- if "Line" in kwargs:
849
- self.Line = kwargs["Line"]
870
+ self.Message = args[1]
871
+ if "Message" in kwargs:
872
+ self.Message = kwargs["Message"]
850
873
  if 2 < len(args):
851
- self.Column = args[2]
852
- if "Column" in kwargs:
853
- self.Column = kwargs["Column"]
874
+ self.Source = args[2]
875
+ if "Source" in kwargs:
876
+ self.Source = kwargs["Source"]
877
+ if 4 < len(args):
878
+ self.Duration = args[4]
879
+ if "Duration" in kwargs:
880
+ self.Duration = kwargs["Duration"]
854
881
  def __del__(self):
855
882
  _api.DecRef(self.handle)
856
883
  def __str__(self):
857
884
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
858
- sv = 'api.SourceLocation{'
885
+ sv = 'api.VMError{'
859
886
  first = True
860
887
  for v in pr:
861
888
  if callable(v[1]):
@@ -868,119 +895,83 @@ class SourceLocation(go.GoClass):
868
895
  return sv + '}'
869
896
  def __repr__(self):
870
897
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
871
- sv = 'api.SourceLocation ( '
898
+ sv = 'api.VMError ( '
872
899
  for v in pr:
873
900
  if not callable(v[1]):
874
901
  sv += v[0] + '=' + str(v[1]) + ', '
875
902
  return sv + ')'
876
903
  @property
877
- def Filename(self):
878
- return _api.api_SourceLocation_Filename_Get(self.handle)
879
- @Filename.setter
880
- def Filename(self, value):
904
+ def Type(self):
905
+ return _api.api_VMError_Type_Get(self.handle)
906
+ @Type.setter
907
+ def Type(self, value):
881
908
  if isinstance(value, go.GoClass):
882
- _api.api_SourceLocation_Filename_Set(self.handle, value.handle)
909
+ _api.api_VMError_Type_Set(self.handle, value.handle)
883
910
  else:
884
- _api.api_SourceLocation_Filename_Set(self.handle, value)
911
+ _api.api_VMError_Type_Set(self.handle, value)
885
912
  @property
886
- def Line(self):
887
- return _api.api_SourceLocation_Line_Get(self.handle)
888
- @Line.setter
889
- def Line(self, value):
913
+ def Message(self):
914
+ return _api.api_VMError_Message_Get(self.handle)
915
+ @Message.setter
916
+ def Message(self, value):
890
917
  if isinstance(value, go.GoClass):
891
- _api.api_SourceLocation_Line_Set(self.handle, value.handle)
918
+ _api.api_VMError_Message_Set(self.handle, value.handle)
892
919
  else:
893
- _api.api_SourceLocation_Line_Set(self.handle, value)
920
+ _api.api_VMError_Message_Set(self.handle, value)
894
921
  @property
895
- def Column(self):
896
- return _api.api_SourceLocation_Column_Get(self.handle)
897
- @Column.setter
898
- def Column(self, value):
922
+ def Source(self):
923
+ return SourceLocation(handle=_api.api_VMError_Source_Get(self.handle))
924
+ @Source.setter
925
+ def Source(self, value):
899
926
  if isinstance(value, go.GoClass):
900
- _api.api_SourceLocation_Column_Set(self.handle, value.handle)
927
+ _api.api_VMError_Source_Set(self.handle, value.handle)
901
928
  else:
902
- _api.api_SourceLocation_Column_Set(self.handle, value)
903
-
904
- # Python type for struct api.VMCompatibilityShim
905
- class VMCompatibilityShim(go.GoClass):
906
- """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"""
907
- def __init__(self, *args, **kwargs):
929
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
930
+ @property
931
+ def Duration(self):
932
+ return _api.api_VMError_Duration_Get(self.handle)
933
+ @Duration.setter
934
+ def Duration(self, value):
935
+ if isinstance(value, go.GoClass):
936
+ _api.api_VMError_Duration_Set(self.handle, value.handle)
937
+ else:
938
+ _api.api_VMError_Duration_Set(self.handle, value)
939
+ def Error(self):
940
+ """Error() str"""
941
+ return _api.api_VMError_Error(self.handle)
942
+ def Unwrap(self):
943
+ """Unwrap() str"""
944
+ return _api.api_VMError_Unwrap(self.handle)
945
+ def IsCompileError(self):
946
+ """IsCompileError() bool
947
+
948
+ IsCompileError returns true if the error is a compilation error
908
949
  """
909
- handle=A Go-side object is always initialized with an explicit handle=arg
910
- otherwise parameters can be unnamed in order of field names or named fields
911
- in which case a new Go object is constructed first
950
+ return _api.api_VMError_IsCompileError(self.handle)
951
+ def IsRuntimeError(self):
952
+ """IsRuntimeError() bool
953
+
954
+ IsRuntimeError returns true if the error is a runtime error
912
955
  """
913
- if len(kwargs) == 1 and 'handle' in kwargs:
914
- self.handle = kwargs['handle']
915
- _api.IncRef(self.handle)
916
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
917
- self.handle = args[0].handle
918
- _api.IncRef(self.handle)
919
- else:
920
- self.handle = _api.api_VMCompatibilityShim_CTor()
921
- _api.IncRef(self.handle)
922
- def __del__(self):
923
- _api.DecRef(self.handle)
924
- def __str__(self):
925
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
926
- sv = 'api.VMCompatibilityShim{'
927
- first = True
928
- for v in pr:
929
- if callable(v[1]):
930
- continue
931
- if first:
932
- first = False
933
- else:
934
- sv += ', '
935
- sv += v[0] + '=' + str(v[1])
936
- return sv + '}'
937
- def __repr__(self):
938
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
939
- sv = 'api.VMCompatibilityShim ( '
940
- for v in pr:
941
- if not callable(v[1]):
942
- sv += v[0] + '=' + str(v[1]) + ', '
943
- return sv + ')'
944
- def DefineFunction(self, id, name, argc, function):
945
- """DefineFunction(str id, str name, int argc, callable function) str
956
+ return _api.api_VMError_IsRuntimeError(self.handle)
957
+ def IsTimeoutError(self):
958
+ """IsTimeoutError() bool
946
959
 
947
- DefineFunction defines a global function with maximum compatibility,
948
- wrapping arguments and return values as JSON strings.
949
- An optional id cookie is passed back to the function to identify it.
950
- jsonArgs is a JSON array string of the arguments.
951
- The function should return a JSON object string with "result" and "error" fields.
960
+ IsTimeoutError returns true if the error is a timeout error
952
961
  """
953
- return _api.api_VMCompatibilityShim_DefineFunction(self.handle, id, name, argc, function)
954
- def BuildNewClassVariableWithGetter(self, variable, getterID, getter):
955
- """BuildNewClassVariableWithGetter(object variable, str getterID, callable getter) object"""
956
- return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithGetter(self.handle, variable.handle, getterID, getter))
957
- def BuildNewClassVariableWithSetter(self, variable, setterID, setter):
958
- """BuildNewClassVariableWithSetter(object variable, str setterID, callable setter) object"""
959
- return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithSetter(self.handle, variable.handle, setterID, setter))
960
- def BuildNewClassMethod(self, method, id, function):
961
- """BuildNewClassMethod(object method, str id, callable function) object"""
962
- return ClassMethod(handle=_api.api_VMCompatibilityShim_BuildNewClassMethod(self.handle, method.handle, id, function))
963
- def BuildNewUnknownFunctionHandler(self, id, function):
964
- """BuildNewUnknownFunctionHandler(str id, callable function) object"""
965
- return UnknownFunctionHandler(handle=_api.api_VMCompatibilityShim_BuildNewUnknownFunctionHandler(self.handle, id, function))
966
- def IsClassDefined(self, name):
967
- """IsClassDefined(str name) bool"""
968
- return _api.api_VMCompatibilityShim_IsClassDefined(self.handle, name)
969
- def LookupObject(self, id):
970
- """LookupObject(str id) object, str"""
971
- return GoValue(handle=_api.api_VMCompatibilityShim_LookupObject(self.handle, id))
972
- def GetObjectMRO(self, id):
973
- """GetObjectMRO(str id) []str, str"""
974
- return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectMRO(self.handle, id))
975
- def GetObjectImmediateFunctions(self, id):
976
- """GetObjectImmediateFunctions(str id) []str, str"""
977
- return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateFunctions(self.handle, id))
978
- def GetObjectImmediateVariables(self, id):
979
- """GetObjectImmediateVariables(str id) []str, str"""
980
- return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateVariables(self.handle, id))
981
- def AddVariableToObject(self, id, variable):
982
- """AddVariableToObject(str id, object variable) str"""
983
- return _api.api_VMCompatibilityShim_AddVariableToObject(self.handle, id, variable.handle)
962
+ return _api.api_VMError_IsTimeoutError(self.handle)
963
+ def IsConversionError(self):
964
+ """IsConversionError() bool
965
+
966
+ IsConversionError returns true if the error is a type conversion error
967
+ """
968
+ return _api.api_VMError_IsConversionError(self.handle)
969
+ def IsConfigError(self):
970
+ """IsConfigError() bool
971
+
972
+ IsConfigError returns true if the error is a configuration error
973
+ """
974
+ return _api.api_VMError_IsConfigError(self.handle)
984
975
 
985
976
  # Python type for struct api.ClassDefinition
986
977
  class ClassDefinition(go.GoClass):
@@ -1112,11 +1103,162 @@ class ClassDefinition(go.GoClass):
1112
1103
  if isinstance(value, go.GoClass):
1113
1104
  _api.api_ClassDefinition_UnknownFunctionHandler_Set(self.handle, value.handle)
1114
1105
  else:
1115
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1106
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1107
+
1108
+ # Python type for struct api.ClassVariable
1109
+ class ClassVariable(go.GoClass):
1110
+ """"""
1111
+ def __init__(self, *args, **kwargs):
1112
+ """
1113
+ handle=A Go-side object is always initialized with an explicit handle=arg
1114
+ otherwise parameters can be unnamed in order of field names or named fields
1115
+ in which case a new Go object is constructed first
1116
+ """
1117
+ if len(kwargs) == 1 and 'handle' in kwargs:
1118
+ self.handle = kwargs['handle']
1119
+ _api.IncRef(self.handle)
1120
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1121
+ self.handle = args[0].handle
1122
+ _api.IncRef(self.handle)
1123
+ else:
1124
+ self.handle = _api.api_ClassVariable_CTor()
1125
+ _api.IncRef(self.handle)
1126
+ if 0 < len(args):
1127
+ self.Name = args[0]
1128
+ if "Name" in kwargs:
1129
+ self.Name = kwargs["Name"]
1130
+ if 1 < len(args):
1131
+ self.Value = args[1]
1132
+ if "Value" in kwargs:
1133
+ self.Value = kwargs["Value"]
1134
+ if 2 < len(args):
1135
+ self.Locked = args[2]
1136
+ if "Locked" in kwargs:
1137
+ self.Locked = kwargs["Locked"]
1138
+ def __del__(self):
1139
+ _api.DecRef(self.handle)
1140
+ def __str__(self):
1141
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1142
+ sv = 'api.ClassVariable{'
1143
+ first = True
1144
+ for v in pr:
1145
+ if callable(v[1]):
1146
+ continue
1147
+ if first:
1148
+ first = False
1149
+ else:
1150
+ sv += ', '
1151
+ sv += v[0] + '=' + str(v[1])
1152
+ return sv + '}'
1153
+ def __repr__(self):
1154
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1155
+ sv = 'api.ClassVariable ( '
1156
+ for v in pr:
1157
+ if not callable(v[1]):
1158
+ sv += v[0] + '=' + str(v[1]) + ', '
1159
+ return sv + ')'
1160
+ @property
1161
+ def Name(self):
1162
+ return _api.api_ClassVariable_Name_Get(self.handle)
1163
+ @Name.setter
1164
+ def Name(self, value):
1165
+ if isinstance(value, go.GoClass):
1166
+ _api.api_ClassVariable_Name_Set(self.handle, value.handle)
1167
+ else:
1168
+ _api.api_ClassVariable_Name_Set(self.handle, value)
1169
+ @property
1170
+ def Value(self):
1171
+ return GoValue(handle=_api.api_ClassVariable_Value_Get(self.handle))
1172
+ @Value.setter
1173
+ def Value(self, value):
1174
+ if isinstance(value, go.GoClass):
1175
+ _api.api_ClassVariable_Value_Set(self.handle, value.handle)
1176
+ else:
1177
+ raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1178
+ @property
1179
+ def Locked(self):
1180
+ return _api.api_ClassVariable_Locked_Get(self.handle)
1181
+ @Locked.setter
1182
+ def Locked(self, value):
1183
+ if isinstance(value, go.GoClass):
1184
+ _api.api_ClassVariable_Locked_Set(self.handle, value.handle)
1185
+ else:
1186
+ _api.api_ClassVariable_Locked_Set(self.handle, value)
1187
+
1188
+ # Python type for struct api.GoValue
1189
+ class GoValue(go.GoClass):
1190
+ """"""
1191
+ def __init__(self, *args, **kwargs):
1192
+ """
1193
+ handle=A Go-side object is always initialized with an explicit handle=arg
1194
+ otherwise parameters can be unnamed in order of field names or named fields
1195
+ in which case a new Go object is constructed first
1196
+ """
1197
+ if len(kwargs) == 1 and 'handle' in kwargs:
1198
+ self.handle = kwargs['handle']
1199
+ _api.IncRef(self.handle)
1200
+ elif len(args) == 1 and isinstance(args[0], go.GoClass):
1201
+ self.handle = args[0].handle
1202
+ _api.IncRef(self.handle)
1203
+ else:
1204
+ self.handle = _api.api_GoValue_CTor()
1205
+ _api.IncRef(self.handle)
1206
+ def __del__(self):
1207
+ _api.DecRef(self.handle)
1208
+ def __str__(self):
1209
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1210
+ sv = 'api.GoValue{'
1211
+ first = True
1212
+ for v in pr:
1213
+ if callable(v[1]):
1214
+ continue
1215
+ if first:
1216
+ first = False
1217
+ else:
1218
+ sv += ', '
1219
+ sv += v[0] + '=' + str(v[1])
1220
+ return sv + '}'
1221
+ def __repr__(self):
1222
+ pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1223
+ sv = 'api.GoValue ( '
1224
+ for v in pr:
1225
+ if not callable(v[1]):
1226
+ sv += v[0] + '=' + str(v[1]) + ', '
1227
+ return sv + ')'
1228
+ def ID(self):
1229
+ """ID() str"""
1230
+ return _api.api_GoValue_ID(self.handle)
1231
+ def MarshalJSON(self):
1232
+ """MarshalJSON() []int, str"""
1233
+ return go.Slice_byte(handle=_api.api_GoValue_MarshalJSON(self.handle))
1234
+ def Type(self):
1235
+ """Type() str"""
1236
+ return _api.api_GoValue_Type(self.handle)
1237
+ def Int(self):
1238
+ """Int() long, str"""
1239
+ return _api.api_GoValue_Int(self.handle)
1240
+ def Float(self):
1241
+ """Float() float, str"""
1242
+ return _api.api_GoValue_Float(self.handle)
1243
+ def String(self):
1244
+ """String() str, str"""
1245
+ return _api.api_GoValue_String(self.handle)
1246
+ def Bool(self):
1247
+ """Bool() bool, str"""
1248
+ return _api.api_GoValue_Bool(self.handle)
1249
+ def Slice(self):
1250
+ """Slice() []object, str"""
1251
+ return Slice_api_GoValue(handle=_api.api_GoValue_Slice(self.handle))
1252
+ def Map(self):
1253
+ """Map() object, str"""
1254
+ return Map_string_api_GoValue(handle=_api.api_GoValue_Map(self.handle))
1255
+ def Object(self):
1256
+ """Object() object, str"""
1257
+ return go.Ptr_environment_ObjectInstance(handle=_api.api_GoValue_Object(self.handle))
1116
1258
 
1117
- # Python type for struct api.ClassMethod
1118
- class ClassMethod(go.GoClass):
1119
- """"""
1259
+ # Python type for struct api.SourceLocation
1260
+ class SourceLocation(go.GoClass):
1261
+ """SourceLocation represents a location in source code\n"""
1120
1262
  def __init__(self, *args, **kwargs):
1121
1263
  """
1122
1264
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1130,21 +1272,25 @@ class ClassMethod(go.GoClass):
1130
1272
  self.handle = args[0].handle
1131
1273
  _api.IncRef(self.handle)
1132
1274
  else:
1133
- self.handle = _api.api_ClassMethod_CTor()
1275
+ self.handle = _api.api_SourceLocation_CTor()
1134
1276
  _api.IncRef(self.handle)
1135
1277
  if 0 < len(args):
1136
- self.Name = args[0]
1137
- if "Name" in kwargs:
1138
- self.Name = kwargs["Name"]
1278
+ self.Filename = args[0]
1279
+ if "Filename" in kwargs:
1280
+ self.Filename = kwargs["Filename"]
1139
1281
  if 1 < len(args):
1140
- self.Argc = args[1]
1141
- if "Argc" in kwargs:
1142
- self.Argc = kwargs["Argc"]
1282
+ self.Line = args[1]
1283
+ if "Line" in kwargs:
1284
+ self.Line = kwargs["Line"]
1285
+ if 2 < len(args):
1286
+ self.Column = args[2]
1287
+ if "Column" in kwargs:
1288
+ self.Column = kwargs["Column"]
1143
1289
  def __del__(self):
1144
1290
  _api.DecRef(self.handle)
1145
1291
  def __str__(self):
1146
1292
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1147
- sv = 'api.ClassMethod{'
1293
+ sv = 'api.SourceLocation{'
1148
1294
  first = True
1149
1295
  for v in pr:
1150
1296
  if callable(v[1]):
@@ -1157,29 +1303,38 @@ class ClassMethod(go.GoClass):
1157
1303
  return sv + '}'
1158
1304
  def __repr__(self):
1159
1305
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1160
- sv = 'api.ClassMethod ( '
1306
+ sv = 'api.SourceLocation ( '
1161
1307
  for v in pr:
1162
1308
  if not callable(v[1]):
1163
1309
  sv += v[0] + '=' + str(v[1]) + ', '
1164
1310
  return sv + ')'
1165
1311
  @property
1166
- def Name(self):
1167
- return _api.api_ClassMethod_Name_Get(self.handle)
1168
- @Name.setter
1169
- def Name(self, value):
1312
+ def Filename(self):
1313
+ return _api.api_SourceLocation_Filename_Get(self.handle)
1314
+ @Filename.setter
1315
+ def Filename(self, value):
1170
1316
  if isinstance(value, go.GoClass):
1171
- _api.api_ClassMethod_Name_Set(self.handle, value.handle)
1317
+ _api.api_SourceLocation_Filename_Set(self.handle, value.handle)
1172
1318
  else:
1173
- _api.api_ClassMethod_Name_Set(self.handle, value)
1319
+ _api.api_SourceLocation_Filename_Set(self.handle, value)
1174
1320
  @property
1175
- def Argc(self):
1176
- return _api.api_ClassMethod_Argc_Get(self.handle)
1177
- @Argc.setter
1178
- def Argc(self, value):
1321
+ def Line(self):
1322
+ return _api.api_SourceLocation_Line_Get(self.handle)
1323
+ @Line.setter
1324
+ def Line(self, value):
1179
1325
  if isinstance(value, go.GoClass):
1180
- _api.api_ClassMethod_Argc_Set(self.handle, value.handle)
1326
+ _api.api_SourceLocation_Line_Set(self.handle, value.handle)
1181
1327
  else:
1182
- _api.api_ClassMethod_Argc_Set(self.handle, value)
1328
+ _api.api_SourceLocation_Line_Set(self.handle, value)
1329
+ @property
1330
+ def Column(self):
1331
+ return _api.api_SourceLocation_Column_Get(self.handle)
1332
+ @Column.setter
1333
+ def Column(self, value):
1334
+ if isinstance(value, go.GoClass):
1335
+ _api.api_SourceLocation_Column_Set(self.handle, value.handle)
1336
+ else:
1337
+ _api.api_SourceLocation_Column_Set(self.handle, value)
1183
1338
 
1184
1339
  # Python type for struct api.UnknownFunctionHandler
1185
1340
  class UnknownFunctionHandler(go.GoClass):
@@ -1317,112 +1472,9 @@ class VM(go.GoClass):
1317
1472
  """DefineClass(object classDef) str"""
1318
1473
  return _api.api_VM_DefineClass(self.handle, classDef.handle)
1319
1474
 
1320
- # Python type for struct api.VMConfig
1321
- class VMConfig(go.GoClass):
1322
- """VMConfig holds configuration options for the VM\n"""
1323
- def __init__(self, *args, **kwargs):
1324
- """
1325
- handle=A Go-side object is always initialized with an explicit handle=arg
1326
- otherwise parameters can be unnamed in order of field names or named fields
1327
- in which case a new Go object is constructed first
1328
- """
1329
- if len(kwargs) == 1 and 'handle' in kwargs:
1330
- self.handle = kwargs['handle']
1331
- _api.IncRef(self.handle)
1332
- elif len(args) == 1 and isinstance(args[0], go.GoClass):
1333
- self.handle = args[0].handle
1334
- _api.IncRef(self.handle)
1335
- else:
1336
- self.handle = _api.api_VMConfig_CTor()
1337
- _api.IncRef(self.handle)
1338
- if 0 < len(args):
1339
- self.Stdout = args[0]
1340
- if "Stdout" in kwargs:
1341
- self.Stdout = kwargs["Stdout"]
1342
- if 1 < len(args):
1343
- self.Stdin = args[1]
1344
- if "Stdin" in kwargs:
1345
- self.Stdin = kwargs["Stdin"]
1346
- if 2 < len(args):
1347
- self.Timeout = args[2]
1348
- if "Timeout" in kwargs:
1349
- self.Timeout = kwargs["Timeout"]
1350
- if 3 < len(args):
1351
- self.WorkingDirectory = args[3]
1352
- if "WorkingDirectory" in kwargs:
1353
- self.WorkingDirectory = kwargs["WorkingDirectory"]
1354
- def __del__(self):
1355
- _api.DecRef(self.handle)
1356
- def __str__(self):
1357
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1358
- sv = 'api.VMConfig{'
1359
- first = True
1360
- for v in pr:
1361
- if callable(v[1]):
1362
- continue
1363
- if first:
1364
- first = False
1365
- else:
1366
- sv += ', '
1367
- sv += v[0] + '=' + str(v[1])
1368
- return sv + '}'
1369
- def __repr__(self):
1370
- pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1371
- sv = 'api.VMConfig ( '
1372
- for v in pr:
1373
- if not callable(v[1]):
1374
- sv += v[0] + '=' + str(v[1]) + ', '
1375
- return sv + ')'
1376
- @property
1377
- def Stdout(self):
1378
- """I/O configuration
1379
- """
1380
- return go.io_Writer(handle=_api.api_VMConfig_Stdout_Get(self.handle))
1381
- @Stdout.setter
1382
- def Stdout(self, value):
1383
- if isinstance(value, go.GoClass):
1384
- _api.api_VMConfig_Stdout_Set(self.handle, value.handle)
1385
- else:
1386
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1387
- @property
1388
- def Stdin(self):
1389
- return go.io_Reader(handle=_api.api_VMConfig_Stdin_Get(self.handle))
1390
- @Stdin.setter
1391
- def Stdin(self, value):
1392
- if isinstance(value, go.GoClass):
1393
- _api.api_VMConfig_Stdin_Set(self.handle, value.handle)
1394
- else:
1395
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1396
- @property
1397
- def Timeout(self):
1398
- """Execution configuration
1399
- """
1400
- return _api.api_VMConfig_Timeout_Get(self.handle)
1401
- @Timeout.setter
1402
- def Timeout(self, value):
1403
- if isinstance(value, go.GoClass):
1404
- _api.api_VMConfig_Timeout_Set(self.handle, value.handle)
1405
- else:
1406
- _api.api_VMConfig_Timeout_Set(self.handle, value)
1407
- @property
1408
- def WorkingDirectory(self):
1409
- return _api.api_VMConfig_WorkingDirectory_Get(self.handle)
1410
- @WorkingDirectory.setter
1411
- def WorkingDirectory(self, value):
1412
- if isinstance(value, go.GoClass):
1413
- _api.api_VMConfig_WorkingDirectory_Set(self.handle, value.handle)
1414
- else:
1415
- _api.api_VMConfig_WorkingDirectory_Set(self.handle, value)
1416
- def Validate(self):
1417
- """Validate() str
1418
-
1419
- Validate checks if the configuration is valid
1420
- """
1421
- return _api.api_VMConfig_Validate(self.handle)
1422
-
1423
- # Python type for struct api.VMError
1424
- class VMError(go.GoClass):
1425
- """VMError represents errors that can occur in the VM API\n"""
1475
+ # Python type for struct api.ClassMethod
1476
+ class ClassMethod(go.GoClass):
1477
+ """"""
1426
1478
  def __init__(self, *args, **kwargs):
1427
1479
  """
1428
1480
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1436,29 +1488,21 @@ class VMError(go.GoClass):
1436
1488
  self.handle = args[0].handle
1437
1489
  _api.IncRef(self.handle)
1438
1490
  else:
1439
- self.handle = _api.api_VMError_CTor()
1440
- _api.IncRef(self.handle)
1441
- if 0 < len(args):
1442
- self.Type = args[0]
1443
- if "Type" in kwargs:
1444
- self.Type = kwargs["Type"]
1445
- if 1 < len(args):
1446
- self.Message = args[1]
1447
- if "Message" in kwargs:
1448
- self.Message = kwargs["Message"]
1449
- if 2 < len(args):
1450
- self.Source = args[2]
1451
- if "Source" in kwargs:
1452
- self.Source = kwargs["Source"]
1453
- if 4 < len(args):
1454
- self.Duration = args[4]
1455
- if "Duration" in kwargs:
1456
- self.Duration = kwargs["Duration"]
1491
+ self.handle = _api.api_ClassMethod_CTor()
1492
+ _api.IncRef(self.handle)
1493
+ if 0 < len(args):
1494
+ self.Name = args[0]
1495
+ if "Name" in kwargs:
1496
+ self.Name = kwargs["Name"]
1497
+ if 1 < len(args):
1498
+ self.Argc = args[1]
1499
+ if "Argc" in kwargs:
1500
+ self.Argc = kwargs["Argc"]
1457
1501
  def __del__(self):
1458
1502
  _api.DecRef(self.handle)
1459
1503
  def __str__(self):
1460
1504
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1461
- sv = 'api.VMError{'
1505
+ sv = 'api.ClassMethod{'
1462
1506
  first = True
1463
1507
  for v in pr:
1464
1508
  if callable(v[1]):
@@ -1471,83 +1515,29 @@ class VMError(go.GoClass):
1471
1515
  return sv + '}'
1472
1516
  def __repr__(self):
1473
1517
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1474
- sv = 'api.VMError ( '
1518
+ sv = 'api.ClassMethod ( '
1475
1519
  for v in pr:
1476
1520
  if not callable(v[1]):
1477
1521
  sv += v[0] + '=' + str(v[1]) + ', '
1478
1522
  return sv + ')'
1479
1523
  @property
1480
- def Type(self):
1481
- return _api.api_VMError_Type_Get(self.handle)
1482
- @Type.setter
1483
- def Type(self, value):
1484
- if isinstance(value, go.GoClass):
1485
- _api.api_VMError_Type_Set(self.handle, value.handle)
1486
- else:
1487
- _api.api_VMError_Type_Set(self.handle, value)
1488
- @property
1489
- def Message(self):
1490
- return _api.api_VMError_Message_Get(self.handle)
1491
- @Message.setter
1492
- def Message(self, value):
1493
- if isinstance(value, go.GoClass):
1494
- _api.api_VMError_Message_Set(self.handle, value.handle)
1495
- else:
1496
- _api.api_VMError_Message_Set(self.handle, value)
1497
- @property
1498
- def Source(self):
1499
- return SourceLocation(handle=_api.api_VMError_Source_Get(self.handle))
1500
- @Source.setter
1501
- def Source(self, value):
1524
+ def Name(self):
1525
+ return _api.api_ClassMethod_Name_Get(self.handle)
1526
+ @Name.setter
1527
+ def Name(self, value):
1502
1528
  if isinstance(value, go.GoClass):
1503
- _api.api_VMError_Source_Set(self.handle, value.handle)
1529
+ _api.api_ClassMethod_Name_Set(self.handle, value.handle)
1504
1530
  else:
1505
- raise TypeError("supplied argument type {t} is not a go.GoClass".format(t=type(value)))
1531
+ _api.api_ClassMethod_Name_Set(self.handle, value)
1506
1532
  @property
1507
- def Duration(self):
1508
- return _api.api_VMError_Duration_Get(self.handle)
1509
- @Duration.setter
1510
- def Duration(self, value):
1533
+ def Argc(self):
1534
+ return _api.api_ClassMethod_Argc_Get(self.handle)
1535
+ @Argc.setter
1536
+ def Argc(self, value):
1511
1537
  if isinstance(value, go.GoClass):
1512
- _api.api_VMError_Duration_Set(self.handle, value.handle)
1538
+ _api.api_ClassMethod_Argc_Set(self.handle, value.handle)
1513
1539
  else:
1514
- _api.api_VMError_Duration_Set(self.handle, value)
1515
- def Error(self):
1516
- """Error() str"""
1517
- return _api.api_VMError_Error(self.handle)
1518
- def Unwrap(self):
1519
- """Unwrap() str"""
1520
- return _api.api_VMError_Unwrap(self.handle)
1521
- def IsCompileError(self):
1522
- """IsCompileError() bool
1523
-
1524
- IsCompileError returns true if the error is a compilation error
1525
- """
1526
- return _api.api_VMError_IsCompileError(self.handle)
1527
- def IsRuntimeError(self):
1528
- """IsRuntimeError() bool
1529
-
1530
- IsRuntimeError returns true if the error is a runtime error
1531
- """
1532
- return _api.api_VMError_IsRuntimeError(self.handle)
1533
- def IsTimeoutError(self):
1534
- """IsTimeoutError() bool
1535
-
1536
- IsTimeoutError returns true if the error is a timeout error
1537
- """
1538
- return _api.api_VMError_IsTimeoutError(self.handle)
1539
- def IsConversionError(self):
1540
- """IsConversionError() bool
1541
-
1542
- IsConversionError returns true if the error is a type conversion error
1543
- """
1544
- return _api.api_VMError_IsConversionError(self.handle)
1545
- def IsConfigError(self):
1546
- """IsConfigError() bool
1547
-
1548
- IsConfigError returns true if the error is a configuration error
1549
- """
1550
- return _api.api_VMError_IsConfigError(self.handle)
1540
+ _api.api_ClassMethod_Argc_Set(self.handle, value)
1551
1541
 
1552
1542
  # Python type for struct api.ExecutionResult
1553
1543
  class ExecutionResult(go.GoClass):
@@ -1635,9 +1625,9 @@ class ExecutionResult(go.GoClass):
1635
1625
  else:
1636
1626
  _api.api_ExecutionResult_Output_Set(self.handle, value)
1637
1627
 
1638
- # Python type for struct api.GoValue
1639
- class GoValue(go.GoClass):
1640
- """"""
1628
+ # Python type for struct api.VMCompatibilityShim
1629
+ class VMCompatibilityShim(go.GoClass):
1630
+ """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"""
1641
1631
  def __init__(self, *args, **kwargs):
1642
1632
  """
1643
1633
  handle=A Go-side object is always initialized with an explicit handle=arg
@@ -1651,13 +1641,13 @@ class GoValue(go.GoClass):
1651
1641
  self.handle = args[0].handle
1652
1642
  _api.IncRef(self.handle)
1653
1643
  else:
1654
- self.handle = _api.api_GoValue_CTor()
1644
+ self.handle = _api.api_VMCompatibilityShim_CTor()
1655
1645
  _api.IncRef(self.handle)
1656
1646
  def __del__(self):
1657
1647
  _api.DecRef(self.handle)
1658
1648
  def __str__(self):
1659
1649
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1660
- sv = 'api.GoValue{'
1650
+ sv = 'api.VMCompatibilityShim{'
1661
1651
  first = True
1662
1652
  for v in pr:
1663
1653
  if callable(v[1]):
@@ -1670,41 +1660,51 @@ class GoValue(go.GoClass):
1670
1660
  return sv + '}'
1671
1661
  def __repr__(self):
1672
1662
  pr = [(p, getattr(self, p)) for p in dir(self) if not p.startswith('__')]
1673
- sv = 'api.GoValue ( '
1663
+ sv = 'api.VMCompatibilityShim ( '
1674
1664
  for v in pr:
1675
1665
  if not callable(v[1]):
1676
1666
  sv += v[0] + '=' + str(v[1]) + ', '
1677
1667
  return sv + ')'
1678
- def ID(self):
1679
- """ID() str"""
1680
- return _api.api_GoValue_ID(self.handle)
1681
- def MarshalJSON(self):
1682
- """MarshalJSON() []int, str"""
1683
- return go.Slice_byte(handle=_api.api_GoValue_MarshalJSON(self.handle))
1684
- def Type(self):
1685
- """Type() str"""
1686
- return _api.api_GoValue_Type(self.handle)
1687
- def Int(self):
1688
- """Int() long, str"""
1689
- return _api.api_GoValue_Int(self.handle)
1690
- def Float(self):
1691
- """Float() float, str"""
1692
- return _api.api_GoValue_Float(self.handle)
1693
- def String(self):
1694
- """String() str, str"""
1695
- return _api.api_GoValue_String(self.handle)
1696
- def Bool(self):
1697
- """Bool() bool, str"""
1698
- return _api.api_GoValue_Bool(self.handle)
1699
- def Slice(self):
1700
- """Slice() []object, str"""
1701
- return Slice_api_GoValue(handle=_api.api_GoValue_Slice(self.handle))
1702
- def Map(self):
1703
- """Map() object, str"""
1704
- return Map_string_api_GoValue(handle=_api.api_GoValue_Map(self.handle))
1705
- def Object(self):
1706
- """Object() object, str"""
1707
- return go.Ptr_environment_ObjectInstance(handle=_api.api_GoValue_Object(self.handle))
1668
+ def DefineFunction(self, id, name, argc, function):
1669
+ """DefineFunction(str id, str name, int argc, callable function) str
1670
+
1671
+ DefineFunction defines a global function with maximum compatibility,
1672
+ wrapping arguments and return values as JSON strings.
1673
+ An optional id cookie is passed back to the function to identify it.
1674
+ jsonArgs is a JSON array string of the arguments.
1675
+ The function should return a JSON object string with "result" and "error" fields.
1676
+ """
1677
+ return _api.api_VMCompatibilityShim_DefineFunction(self.handle, id, name, argc, function)
1678
+ def BuildNewClassVariableWithGetter(self, variable, getterID, getter):
1679
+ """BuildNewClassVariableWithGetter(object variable, str getterID, callable getter) object"""
1680
+ return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithGetter(self.handle, variable.handle, getterID, getter))
1681
+ def BuildNewClassVariableWithSetter(self, variable, setterID, setter):
1682
+ """BuildNewClassVariableWithSetter(object variable, str setterID, callable setter) object"""
1683
+ return ClassVariable(handle=_api.api_VMCompatibilityShim_BuildNewClassVariableWithSetter(self.handle, variable.handle, setterID, setter))
1684
+ def BuildNewClassMethod(self, method, id, function):
1685
+ """BuildNewClassMethod(object method, str id, callable function) object"""
1686
+ return ClassMethod(handle=_api.api_VMCompatibilityShim_BuildNewClassMethod(self.handle, method.handle, id, function))
1687
+ def BuildNewUnknownFunctionHandler(self, id, function):
1688
+ """BuildNewUnknownFunctionHandler(str id, callable function) object"""
1689
+ return UnknownFunctionHandler(handle=_api.api_VMCompatibilityShim_BuildNewUnknownFunctionHandler(self.handle, id, function))
1690
+ def IsClassDefined(self, name):
1691
+ """IsClassDefined(str name) bool"""
1692
+ return _api.api_VMCompatibilityShim_IsClassDefined(self.handle, name)
1693
+ def LookupObject(self, id):
1694
+ """LookupObject(str id) object, str"""
1695
+ return GoValue(handle=_api.api_VMCompatibilityShim_LookupObject(self.handle, id))
1696
+ def GetObjectMRO(self, id):
1697
+ """GetObjectMRO(str id) []str, str"""
1698
+ return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectMRO(self.handle, id))
1699
+ def GetObjectImmediateFunctions(self, id):
1700
+ """GetObjectImmediateFunctions(str id) []str, str"""
1701
+ return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateFunctions(self.handle, id))
1702
+ def GetObjectImmediateVariables(self, id):
1703
+ """GetObjectImmediateVariables(str id) []str, str"""
1704
+ return go.Slice_string(handle=_api.api_VMCompatibilityShim_GetObjectImmediateVariables(self.handle, id))
1705
+ def AddVariableToObject(self, id, variable):
1706
+ """AddVariableToObject(str id, object variable) str"""
1707
+ return _api.api_VMCompatibilityShim_AddVariableToObject(self.handle, id, variable.handle)
1708
1708
 
1709
1709
 
1710
1710
  # ---- Slices ---
@@ -1714,84 +1714,78 @@ class GoValue(go.GoClass):
1714
1714
 
1715
1715
 
1716
1716
  # ---- Constructors ---
1717
- def NewClassDefinition():
1718
- """NewClassDefinition() object"""
1719
- return ClassDefinition(handle=_api.api_NewClassDefinition())
1720
- def NewVM(config):
1721
- """NewVM(object config) object, str
1722
-
1723
- NewVM creates a new VM instance with the given config
1724
- """
1725
- return VM(handle=_api.api_NewVM(config.handle))
1726
1717
  def DefaultConfig():
1727
1718
  """DefaultConfig() object
1728
1719
 
1729
1720
  DefaultConfig returns a default configuration
1730
1721
  """
1731
1722
  return VMConfig(handle=_api.api_DefaultConfig())
1732
- def NewConversionError(message, wrapped):
1733
- """NewConversionError(str message, str wrapped) object
1723
+ def NewRuntimeError(message, source):
1724
+ """NewRuntimeError(str message, object source) object
1734
1725
 
1735
- NewConversionError creates a new type conversion error
1726
+ NewRuntimeError creates a new runtime error
1736
1727
  """
1737
- return VMError(handle=_api.api_NewConversionError(message, wrapped))
1728
+ return VMError(handle=_api.api_NewRuntimeError(message, source.handle))
1738
1729
  def NewTimeoutError(duration):
1739
1730
  """NewTimeoutError(long duration) object
1740
1731
 
1741
1732
  NewTimeoutError creates a new timeout error
1742
1733
  """
1743
1734
  return VMError(handle=_api.api_NewTimeoutError(duration))
1744
- def NewRuntimeError(message, source):
1745
- """NewRuntimeError(str message, object source) object
1746
-
1747
- NewRuntimeError creates a new runtime error
1748
- """
1749
- return VMError(handle=_api.api_NewRuntimeError(message, source.handle))
1750
- def NewConfigError(message, wrapped):
1751
- """NewConfigError(str message, str wrapped) object
1735
+ def NewConversionError(message, wrapped):
1736
+ """NewConversionError(str message, str wrapped) object
1752
1737
 
1753
- NewConfigError creates a new configuration error
1738
+ NewConversionError creates a new type conversion error
1754
1739
  """
1755
- return VMError(handle=_api.api_NewConfigError(message, wrapped))
1740
+ return VMError(handle=_api.api_NewConversionError(message, wrapped))
1756
1741
  def NewCompileError(message, source):
1757
1742
  """NewCompileError(str message, object source) object
1758
1743
 
1759
1744
  NewCompileError creates a new compile error
1760
1745
  """
1761
1746
  return VMError(handle=_api.api_NewCompileError(message, source.handle))
1762
- def WrapObject(value):
1763
- """WrapObject(object value) object"""
1764
- return GoValue(handle=_api.api_WrapObject(value.handle))
1747
+ def NewConfigError(message, wrapped):
1748
+ """NewConfigError(str message, str wrapped) object
1749
+
1750
+ NewConfigError creates a new configuration error
1751
+ """
1752
+ return VMError(handle=_api.api_NewConfigError(message, wrapped))
1753
+ def NewClassDefinition():
1754
+ """NewClassDefinition() object"""
1755
+ return ClassDefinition(handle=_api.api_NewClassDefinition())
1756
+ def WrapAny(value):
1757
+ """WrapAny(str value) object"""
1758
+ return GoValue(handle=_api.api_WrapAny(value))
1765
1759
  def WrapFloat(value):
1766
1760
  """WrapFloat(float value) object"""
1767
1761
  return GoValue(handle=_api.api_WrapFloat(value))
1762
+ def WrapInt(value):
1763
+ """WrapInt(long value) object"""
1764
+ return GoValue(handle=_api.api_WrapInt(value))
1765
+ def WrapObject(value):
1766
+ """WrapObject(object value) object"""
1767
+ return GoValue(handle=_api.api_WrapObject(value.handle))
1768
1768
  def ToGoValue(val):
1769
1769
  """ToGoValue(object val) object, str
1770
1770
 
1771
1771
  ToGoValue converts an Objective-LOL value to a Go value
1772
1772
  """
1773
1773
  return GoValue(handle=_api.api_ToGoValue(val.handle))
1774
- def WrapAny(value):
1775
- """WrapAny(str value) object"""
1776
- return GoValue(handle=_api.api_WrapAny(value))
1777
- def WrapInt(value):
1778
- """WrapInt(long value) object"""
1779
- return GoValue(handle=_api.api_WrapInt(value))
1780
- def WrapString(value):
1781
- """WrapString(str value) object"""
1782
- return GoValue(handle=_api.api_WrapString(value))
1783
1774
  def WrapBool(value):
1784
1775
  """WrapBool(bool value) object"""
1785
1776
  return GoValue(handle=_api.api_WrapBool(value))
1777
+ def WrapString(value):
1778
+ """WrapString(str value) object"""
1779
+ return GoValue(handle=_api.api_WrapString(value))
1780
+ def NewVM(config):
1781
+ """NewVM(object config) object, str
1782
+
1783
+ NewVM creates a new VM instance with the given config
1784
+ """
1785
+ return VM(handle=_api.api_NewVM(config.handle))
1786
1786
 
1787
1787
 
1788
1788
  # ---- Functions ---
1789
- def FromGoValue(val):
1790
- """FromGoValue(object val) object, str
1791
-
1792
- FromGoValue converts a Go value to an Objective-LOL value
1793
- """
1794
- return go.environment_Value(handle=_api.api_FromGoValue(val.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 ConvertArguments(args):
1801
1795
  ConvertArguments converts a slice of Go values to Objective-LOL values
1802
1796
  """
1803
1797
  return Slice_environment_Value(handle=_api.api_ConvertArguments(args.handle))
1798
+ def FromGoValue(val):
1799
+ """FromGoValue(object val) object, str
1800
+
1801
+ FromGoValue converts a Go value to an Objective-LOL value
1802
+ """
1803
+ return go.environment_Value(handle=_api.api_FromGoValue(val.handle))
1804
1804
 
1805
1805