Matt Mackall
0fa9895915
util.h: replace ntohl/htonl with get/putbe32
2012-04-16 11:26:00 -05:00
Matt Mackall
0ba5fb4cce
util.h: more Python 2.4 fixes
2012-04-10 16:53:29 -05:00
Matt Mackall
fd4256c9b1
util.h: unify some common platform tweaks
2012-04-10 12:07:14 -05:00
Matt Mackall
935d420846
util.h: move Py_ssize_t bits from mpatch.c
2012-04-10 12:07:09 -05:00
Matt Mackall
afeb0ce18a
util.h: add a typedef for Py_ssize_t with Python 2.4
2012-04-08 22:17:51 -05:00
Martin Geisler
a76e121863
backout of e4cb9628354c
...
Matt and a majority of crew did not like this approach.
2011-01-27 11:15:08 +01:00
Martin Geisler
d23e1973c2
specify C indention style using Emacs file local variables
2011-01-26 12:05:01 +01:00
Renato Cunha
b985656666
util.h: Defined macros for working "with" PyStrings in py3k.
...
PyString* functions are defined as PyUnicode* to permit correct compilation in
both python 2.x and 3.x.
2010-07-02 16:21:40 -03:00
Renato Cunha
d3325144cd
util.h: Add a PyInt_AsLong definition for usage in the inotify module.
2010-07-02 16:21:38 -03:00
Renato Cunha
9dcf925abb
util.h: Utility macros for handling different Python APIs.
...
If we are in py3k, a IS_PY3K symbol is defined. Apart from that, byte strings
use the API defined in Python 2.6+ (_?PyBytes_.*). For Python < 2.6, the bytes
API is defined accordingly for mercurial usage (shameless copy from
bytesobject.h from Python's code). Some macros were backported from 2.6, as
inspired by rPath's pycompat.h.
2010-06-15 19:49:56 -03:00