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:
@ -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;
|
||||
|
Reference in New Issue
Block a user