Ticket #49030: patch-py-rcsparse_c.diff

File patch-py-rcsparse_c.diff, 709 bytes (added by jpo@…, 9 years ago)
  • py-rcsparse.c

    $OpenBSD: patch-py-rcsparse_c,v 1.1 2013/08/09 05:41:50 dcoppa Exp $
    
    Py_ssize_t != int
    
    On a sparc64 host, git-cvs died of a bus error due to a mismatch
    in the string length argument passed to PyString_AsStringAndLength.
    
    old new pyrcsrevtree_find_internal(struct pyrcsrevtree *self,  
    5353{
    5454        struct rcsrev rev;
    5555        struct rcstoken tok;
    56         int l;
     56        Py_ssize_t l;
    5757
    5858        if (!PyString_CheckExact(key))
    5959                return -1;
    pyrcstokmap_find_internal(struct pyrcstokmap *self, Py 
    322322{
    323323        struct rcstokpair pair;
    324324        struct rcstoken tok;
    325         int l;
     325        Py_ssize_t l;
    326326
    327327        if (!PyString_CheckExact(key))
    328328                return -1;