1
0
mirror of https://gitlab.gnome.org/GNOME/libxslt synced 2025-06-30 02:21:44 +03:00

Fix Windows compiler warnings

Fixes bug 788317. Thanks to J. Peter Mugaas for the initial patch.
This commit is contained in:
Nick Wellnhofer
2017-10-25 16:21:23 +02:00
parent 8b4babb8f7
commit 8760bb2276
8 changed files with 33 additions and 34 deletions

View File

@ -21,6 +21,7 @@
#include "libxslt-py.h"
#include <stdio.h>
#include <stddef.h>
#if (defined(_MSC_VER) || defined(__MINGW32__)) && !defined(vsnprintf)
#define vsnprintf(b,c,f,a) _vsnprintf(b,c,f,a)
@ -105,7 +106,7 @@ libxslt_xsltGetTransformContextHashCode(PyObject *self ATTRIBUTE_UNUSED, PyObjec
return NULL;
tctxt = (xsltTransformContextPtr) PytransformCtxt_Get(py_tctxt);
hash_code = (long) tctxt;
hash_code = (ptrdiff_t) tctxt;
ret = PyInt_FromLong(hash_code);
return ret;
@ -142,7 +143,7 @@ libxslt_xsltGetStylesheetHashCode(PyObject *self ATTRIBUTE_UNUSED, PyObject *arg
return NULL;
style = (xsltStylesheetPtr) Pystylesheet_Get(py_style);
hash_code = (long) style;
hash_code = (ptrdiff_t) style;
ret = PyInt_FromLong(hash_code);
return ret;