def descr_new_pipe(space, w_subtype, w_handle, readable=True, writable=True): from pypy.module._multiprocessing.interp_win32 import handle_w handle = handle_w(space, w_handle) flags = (readable and READABLE) | (writable and WRITABLE) self = space.allocate_instance(W_PipeConnection, w_subtype) W_PipeConnection.__init__(self, handle, flags) return space.wrap(self)
def rebuild(space, w_cls, w_handle, kind, maxvalue): self = space.allocate_instance(W_SemLock, w_cls) self.__init__(space, handle_w(space, w_handle), kind, maxvalue) return self
def rebuild(space, w_cls, w_handle, kind, maxvalue): self = space.allocate_instance(W_SemLock, w_cls) self.__init__(handle_w(space, w_handle), kind, maxvalue) return space.wrap(self)