Exemplo n.º 1
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
Exemplo n.º 2
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
Exemplo n.º 3
0
 def _cast_instance_to_native_obj(self, e):
     from rpython.rtyper.annlowlevel import cast_instance_to_base_obj
     inst = cast_instance_to_base_obj(e)  # SomeOOInstance
     obj = ootype.cast_to_object(inst)  # SomeOOObject
     return dotnet.cast_to_native_object(obj)  # System.Object
Exemplo n.º 4
0
 def set_zero_division_error(self):
     exc_obj = ootype.cast_to_object(self.ll_zero_exc)
     exc_value = dotnet.cast_to_native_object(exc_obj)
     self.get_inputargs().set_exc_value(exc_value)
Exemplo n.º 5
0
 def set_overflow_error(self):
     exc_obj = ootype.cast_to_object(self.ll_ovf_exc)
     exc_value = dotnet.cast_to_native_object(exc_obj)
     self.get_inputargs().set_exc_value(exc_value)
Exemplo n.º 6
0
 def set_future_value_ref(self, index, objvalue):
     obj = dotnet.cast_to_native_object(objvalue)
     self.get_inputargs().set_obj(index, obj)
Exemplo n.º 7
0
 def get_cliobj(self):
     return dotnet.cast_to_native_object(self.getref_base())
Exemplo n.º 8
0
Arquivo: method.py Projeto: sota/pypy
 def get_cliobj(self):
     return dotnet.cast_to_native_object(self.getref_base())
Exemplo n.º 9
0
Arquivo: runner.py Projeto: sota/pypy
 def _cast_instance_to_native_obj(self, e):
     from rpython.rtyper.annlowlevel import cast_instance_to_base_obj
     inst = cast_instance_to_base_obj(e)      # SomeOOInstance
     obj = ootype.cast_to_object(inst)        # SomeOOObject
     return dotnet.cast_to_native_object(obj) # System.Object
Exemplo n.º 10
0
Arquivo: runner.py Projeto: sota/pypy
 def set_zero_division_error(self):
     exc_obj = ootype.cast_to_object(self.ll_zero_exc)
     exc_value = dotnet.cast_to_native_object(exc_obj)
     self.get_inputargs().set_exc_value(exc_value)
Exemplo n.º 11
0
Arquivo: runner.py Projeto: sota/pypy
 def set_overflow_error(self):
     exc_obj = ootype.cast_to_object(self.ll_ovf_exc)
     exc_value = dotnet.cast_to_native_object(exc_obj)
     self.get_inputargs().set_exc_value(exc_value)
Exemplo n.º 12
0
Arquivo: runner.py Projeto: sota/pypy
 def set_future_value_ref(self, index, objvalue):
     obj = dotnet.cast_to_native_object(objvalue)
     self.get_inputargs().set_obj(index, obj)