Mercurial > vim
comparison src/if_py_both.h @ 5655:f2c8d86c460d v7.4.174
updated for version 7.4.174
Problem: Compiler warnings for Python interface. (Tony Mechelynck)
Solution: Add type casts, initialize variable.
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 11 Feb 2014 16:00:35 +0100 |
parents | 91f3908748c2 |
children | ae228baaec2c |
comparison
equal
deleted
inserted
replaced
5654:b61448197d34 | 5655:f2c8d86c460d |
---|---|
2366 PyInt i; | 2366 PyInt i; |
2367 PyInt j; | 2367 PyInt j; |
2368 PyInt numreplaced = 0; | 2368 PyInt numreplaced = 0; |
2369 PyInt numadded = 0; | 2369 PyInt numadded = 0; |
2370 PyInt size; | 2370 PyInt size; |
2371 listitem_T **lis; | 2371 listitem_T **lis = NULL; |
2372 | 2372 |
2373 size = ListLength(self); | 2373 size = ListLength(self); |
2374 | 2374 |
2375 if (l->lv_lock) | 2375 if (l->lv_lock) |
2376 { | 2376 { |
2501 clear_tv(&v); | 2501 clear_tv(&v); |
2502 if (step != 1 && i >= slicelen) | 2502 if (step != 1 && i >= slicelen) |
2503 { | 2503 { |
2504 Py_DECREF(iterator); | 2504 Py_DECREF(iterator); |
2505 PyErr_FORMAT(PyExc_ValueError, | 2505 PyErr_FORMAT(PyExc_ValueError, |
2506 N_("attempt to assign sequence of size greater then %d " | 2506 N_("attempt to assign sequence of size greater then %ld " |
2507 "to extended slice"), slicelen); | 2507 "to extended slice"), (long)slicelen); |
2508 list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli); | 2508 list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli); |
2509 PyMem_Free(lis); | 2509 PyMem_Free(lis); |
2510 return -1; | 2510 return -1; |
2511 } | 2511 } |
2512 ++i; | 2512 ++i; |
2514 Py_DECREF(iterator); | 2514 Py_DECREF(iterator); |
2515 | 2515 |
2516 if (step != 1 && i != slicelen) | 2516 if (step != 1 && i != slicelen) |
2517 { | 2517 { |
2518 PyErr_FORMAT2(PyExc_ValueError, | 2518 PyErr_FORMAT2(PyExc_ValueError, |
2519 N_("attempt to assign sequence of size %d to extended slice " | 2519 N_("attempt to assign sequence of size %ld to extended slice " |
2520 "of size %d"), i, slicelen); | 2520 "of size %ld"), (long)i, (long)slicelen); |
2521 list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli); | 2521 list_restore(numadded, numreplaced, slicelen, l, lis, lastaddedli); |
2522 PyMem_Free(lis); | 2522 PyMem_Free(lis); |
2523 return -1; | 2523 return -1; |
2524 } | 2524 } |
2525 | 2525 |