D7808: mmap: add a size argument to mmapread

mharbison72 (Matt Harbison) phabricator at mercurial-scm.org
Tue Jan 7 12:39:06 EST 2020


mharbison72 added inline comments.

INLINE COMMENTS

> util.py:419-422
> +    if size == 0:
> +        return b''
> +    elif size is None:
> +        size = 0

Why does an explicit size of 0 bail with an empty buffer, but an implicit size 0 proceed?

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D7808/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D7808

To: marmoute, #hg-reviewers
Cc: mharbison72, mercurial-devel


More information about the Mercurial-devel mailing list