Ejemplo n.º 1
0
 def descr__setitem__(self, space, w_prop, w_value):
     with _unwrap_handle(space, w_value) as h_value:
         if space.isinstance_w(w_prop, space.w_str):
             prop = space.str_w(w_prop)
             res = support.emjs_prop_set_str(self.handle, prop, h_value)
         elif space.isinstance_w(w_prop, space.w_int):
             prop = space.int_w(w_prop)
             res = support.emjs_prop_set_int(self.handle, prop, h_value)
         elif space.isinstance_w(w_prop, space.w_long):
             prop = space.int_w(w_prop)
             res = support.emjs_prop_set_int(self.handle, prop, h_value)
         else:
             with _unwrap_handle(space, w_prop) as h_prop:
                 res = support.emjs_prop_set(self.handle, h_prop, h_value)
     _check_error(space, res)
Ejemplo n.º 2
0
 def descr__setitem__(self, space, w_prop, w_value):
     with _unwrap_handle(space, w_value) as h_value:
         if space.isinstance_w(w_prop, space.w_str):
             prop = space.str_w(w_prop)
             res = support.emjs_prop_set_str(self.handle, prop, h_value)
         elif space.isinstance_w(w_prop, space.w_int):
             prop = space.int_w(w_prop)
             res = support.emjs_prop_set_int(self.handle, prop, h_value)
         elif space.isinstance_w(w_prop, space.w_long):
             prop = space.int_w(w_prop)
             res = support.emjs_prop_set_int(self.handle, prop, h_value)
         else:
             with _unwrap_handle(space, w_prop) as h_prop:
                 res = support.emjs_prop_set(self.handle, h_prop, h_value)
     _check_error(space, res)
Ejemplo n.º 3
0
 def descr__setattr__(self, space, name, w_value):
     with _unwrap_handle(space, w_value) as h_value:
         res = support.emjs_prop_set_str(self.handle, name, h_value)
     _check_error(space, res)
Ejemplo n.º 4
0
 def descr__setattr__(self, space, name, w_value):
     with _unwrap_handle(space, w_value) as h_value:
         res = support.emjs_prop_set_str(self.handle, name, h_value)
     _check_error(space, res)