Example #1
0
 def get_exception(self):
     exc_value = self.get_inputargs().get_exc_value()
     if exc_value:
         exc_obj = dotnet.cast_from_native_object(exc_value)
         exc_inst = ootype.cast_from_object(ootype.ROOT, exc_obj)
         cls = ootype.classof(exc_value)
         return ootype.cast_to_object(cls)
     return ootype.cast_to_object(ootype.nullruntimeclass)
Example #2
0
File: runner.py Project: sota/pypy
 def get_exception(self):
     exc_value = self.get_inputargs().get_exc_value()
     if exc_value:
         exc_obj = dotnet.cast_from_native_object(exc_value)
         exc_inst = ootype.cast_from_object(ootype.ROOT, exc_obj)
         cls = ootype.classof(exc_value)
         return ootype.cast_to_object(cls)
     return ootype.cast_to_object(ootype.nullruntimeclass)
Example #3
0
 def fn():
     a = ootype.new(A)
     ahash = ootype.identityhash(a)
     obj = ootype.cast_to_object(a)
     native = cast_to_native_object(obj)
     name = native.GetType().get_Name()
     obj2 = cast_from_native_object(native)
     a2 = ootype.cast_from_object(A, obj2)
     a2hash = ootype.identityhash(a2)
     return name, ahash == a2hash
Example #4
0
 def fn():
     a = ootype.new(A)
     ahash = ootype.identityhash(a)
     obj = ootype.cast_to_object(a)
     native = cast_to_native_object(obj)
     name = native.GetType().get_Name()
     obj2 = cast_from_native_object(native)
     a2 = ootype.cast_from_object(A, obj2)
     a2hash = ootype.identityhash(a2)
     return name, ahash == a2hash
Example #5
0
 def get_exc_value(self):
     exc_value = self.get_inputargs().get_exc_value()
     if exc_value:
         return dotnet.cast_from_native_object(exc_value)
     else:
         return ootype.NULL
Example #6
0
 def get_latest_value_ref(self, index):
     obj = self.get_inputargs().get_obj(index)
     return dotnet.cast_from_native_object(obj)
Example #7
0
File: runner.py Project: sota/pypy
 def get_exc_value(self):
     exc_value = self.get_inputargs().get_exc_value()
     if exc_value:
         return dotnet.cast_from_native_object(exc_value)
     else:
         return ootype.NULL
Example #8
0
File: runner.py Project: sota/pypy
 def get_latest_value_ref(self, index):
     obj = self.get_inputargs().get_obj(index)
     return dotnet.cast_from_native_object(obj)