Skip to content

Commit 6f014c1

Browse files
committed
remove two windows compile warnings
1 parent 35403ae commit 6f014c1

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/_vmprof.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ sample_stack_now(PyObject *module, PyObject *args)
276276

277277
for (i = 0; i < entry_count; i++) {
278278
routine_ip = m[i];
279-
PyList_Append(list, PyLong_NEW((long)routine_ip));
279+
PyList_Append(list, PyLong_NEW((ssize_t)routine_ip));
280280
}
281281

282282
free(m);

src/compat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
#define PyStr_AS_STRING PyBytes_AS_STRING
88
#define PyStr_GET_SIZE PyBytes_GET_SIZE
99
#define PyStr_NEW PyUnicode_FromString
10-
#define PyLong_NEW PyLong_FromLong
10+
#define PyLong_NEW PyLong_FromSsize_t
1111
# else
1212
#define PyStr_AS_STRING PyString_AS_STRING
1313
#define PyStr_GET_SIZE PyString_GET_SIZE
1414
#define PyStr_NEW PyString_FromString
15-
#define PyLong_NEW PyInt_FromLong
15+
#define PyLong_NEW PyInt_FromSsize_t
1616
# endif
1717
#endif
1818

src/vmprof_main_win32.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ long __stdcall vmprof_mainloop(void *arg)
9595
}
9696

9797
RPY_EXTERN
98-
int vmprof_enable(int memory)
98+
int vmprof_enable(int memory, int native)
9999
{
100100
if (!thread_started) {
101101
if (!CreateThread(NULL, 0, vmprof_mainloop, NULL, 0, NULL)) {

0 commit comments

Comments
 (0)