[Updated] D11862: fsmonitor: incorporate fixes for Python 3.10 (issue6612)

Alphare (Raphaël Gomès) phabricator at mercurial-scm.org
Tue Dec 7 14:29:38 UTC 2021


Closed by commit rHG5140461ee947: fsmonitor: incorporate fixes for Python 3.10 (issue6612) (authored by Alphare).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D11862?vs=31322&id=31345

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

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

AFFECTED FILES
  hgext/fsmonitor/pywatchman/bser.c

CHANGE DETAILS

diff --git a/hgext/fsmonitor/pywatchman/bser.c b/hgext/fsmonitor/pywatchman/bser.c
--- a/hgext/fsmonitor/pywatchman/bser.c
+++ b/hgext/fsmonitor/pywatchman/bser.c
@@ -28,6 +28,7 @@
 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */
 
+#define PY_SSIZE_T_CLEAN
 #include <Python.h>
 #include <bytesobject.h>
 #ifdef _MSC_VER
@@ -1052,7 +1053,7 @@
     int64_t* total_len_out) {
   const char* start = NULL;
   const char* data = NULL;
-  int datalen = 0;
+  Py_ssize_t datalen = 0;
   const char* end;
   int64_t expected_len;
   off_t position;
@@ -1101,7 +1102,7 @@
 
 static PyObject* bser_loads(PyObject* self, PyObject* args, PyObject* kw) {
   const char* data = NULL;
-  int datalen = 0;
+  Py_ssize_t datalen = 0;
   const char* start;
   const char* end;
   int64_t expected_len;



To: Alphare, #hg-reviewers, SimonSapin, marmoute
Cc: SimonSapin, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20211207/304780cd/attachment-0002.html>


More information about the Mercurial-patches mailing list