mercurial/cext/pathencode.c
changeset 46374 e92ca942ddca
parent 41336 763b45bc4483
child 48330 e35807332598
equal deleted inserted replaced
46373:711ba0f1057e 46374:e92ca942ddca
    19 #include <Python.h>
    19 #include <Python.h>
    20 #include <assert.h>
    20 #include <assert.h>
    21 #include <ctype.h>
    21 #include <ctype.h>
    22 #include <stdlib.h>
    22 #include <stdlib.h>
    23 #include <string.h>
    23 #include <string.h>
       
    24 #include "pythoncapi_compat.h"
    24 
    25 
    25 #include "util.h"
    26 #include "util.h"
    26 
    27 
    27 /* state machine for the fast path */
    28 /* state machine for the fast path */
    28 enum path_state {
    29 enum path_state {
   676 		memcopy(dest, &destlen, destsize, &src[lastdot],
   677 		memcopy(dest, &destlen, destsize, &src[lastdot],
   677 		        len - lastdot - 1);
   678 		        len - lastdot - 1);
   678 	}
   679 	}
   679 
   680 
   680 	assert(PyBytes_Check(ret));
   681 	assert(PyBytes_Check(ret));
   681 	Py_SIZE(ret) = destlen;
   682 	Py_SET_SIZE(ret, destlen);
   682 
   683 
   683 	return ret;
   684 	return ret;
   684 }
   685 }
   685 
   686 
   686 /*
   687 /*