Author: Alex Gaynor <alex.gay...@gmail.com> Branch: Changeset: r71706:eb63b07ea99a Date: 2014-05-24 14:01 -0500 http://bitbucket.org/pypy/pypy/changeset/eb63b07ea99a/
Log: merged upstream diff --git a/rpython/rlib/rsocket.py b/rpython/rlib/rsocket.py --- a/rpython/rlib/rsocket.py +++ b/rpython/rlib/rsocket.py @@ -22,6 +22,8 @@ from rpython.rtyper.lltypesystem import lltype, rffi from rpython.rtyper.lltypesystem.rffi import sizeof, offsetof INVALID_SOCKET = _c.INVALID_SOCKET +from rpython.rlib import jit + def mallocbuf(buffersize): return lltype.malloc(rffi.CCHARP.TO, buffersize, flavor='raw') @@ -592,6 +594,7 @@ addrlen_p[0] = rffi.cast(_c.socklen_t, maxlen) return addr, addr.addr_p, addrlen_p + @jit.dont_look_inside def accept(self): """Wait for an incoming connection. Return (new socket fd, client address).""" @@ -724,6 +727,7 @@ return make_socket(fd, self.family, self.type, self.proto, SocketClass=SocketClass) + @jit.dont_look_inside def getpeername(self): """Return the address of the remote endpoint.""" address, addr_p, addrlen_p = self._addrbuf() @@ -738,6 +742,7 @@ address.addrlen = rffi.cast(lltype.Signed, addrlen) return address + @jit.dont_look_inside def getsockname(self): """Return the address of the local endpoint.""" address, addr_p, addrlen_p = self._addrbuf() @@ -752,6 +757,7 @@ address.addrlen = rffi.cast(lltype.Signed, addrlen) return address + @jit.dont_look_inside def getsockopt(self, level, option, maxlen): buf = mallocbuf(maxlen) try: @@ -771,6 +777,7 @@ lltype.free(buf, flavor='raw') return result + @jit.dont_look_inside def getsockopt_int(self, level, option): flag_p = lltype.malloc(rffi.INTP.TO, 1, flavor='raw') try: @@ -828,6 +835,7 @@ rwbuffer.setslice(0, buf) return len(buf) + @jit.dont_look_inside def recvfrom(self, buffersize, flags=0): """Like recv(buffersize, flags) but also return the sender's address.""" _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit