[PATCH] compat: provide a new declaration of hg_ssize_t, in case we don't have it
fijall at gmail.com
Mon Jul 11 10:40:55 EDT 2016
that's I believe why python uses Py_ssize_t. Either way, I'm happy
with either solution (I'm probably happier with ssize_t simply), so
please advise which way we should go
On Mon, Jul 11, 2016 at 4:24 PM, Yuya Nishihara <yuya at tcha.org> wrote:
> On Mon, 11 Jul 2016 15:59:47 +0200, Maciej Fijalkowski wrote:
>> On Mon, Jul 11, 2016 at 3:46 PM, Yuya Nishihara <yuya at tcha.org> wrote:
>> > On Mon, 11 Jul 2016 15:26:32 +0200, Maciej Fijalkowski wrote:
>> >> The working workaround (it's a bit hard to test) seems to be:
>> >> #if defined(_MSC_VER)
>> >> #include <BaseTsd.h>
>> >> typedef SSIZE_T hg_ssize_t;
>> >> #else
>> >> typedef ssize_t hg_ssize_t
>> >> #endif
>> > (CC +adrian, I'm not Windows expert.)
>> > It seems to work on Visual Studio 2008, which is the default compiler of
>> > Python 2.7.
>> > I slightly prefer using ssize_t like other int/uint_ typedefs, i.e.
>> > typedef SSIZE_T ssize_t;
>> what happens if ssize_t is already defined? (there are some windows
>> compilers that do it badly_
> s/compilers/libraries/ as we check _MSC_VER?
> Do they have incompatible typedef? That's unfortunate.
More information about the Mercurial-devel