]> git.pld-linux.org Git - packages/vim.git/blame - 7.1.307
- updated to 7.1.326
[packages/vim.git] / 7.1.307
CommitLineData
50c86d7b
AG
1To: vim-dev@vim.org
2Subject: Patch 7.1.307
3Fcc: outbox
4From: Bram Moolenaar <Bram@moolenaar.net>
5Mime-Version: 1.0
6Content-Type: text/plain; charset=ISO-8859-1
7Content-Transfer-Encoding: 8bit
8------------
9
10Patch 7.1.307
11Problem: Many warnings when compiling with Python 2.5.
12Solution: Use ssize_t instead of int for some types. (James Vega)
13Files: src/if_python.c
14
15
16*** ../vim-7.1.306/src/if_python.c Thu Mar 8 10:20:28 2007
17--- src/if_python.c Wed May 7 16:55:44 2008
18***************
19*** 38,43 ****
20--- 38,45 ----
21 # undef HAVE_STDARG_H /* Python's config.h defines it as well. */
22 #endif
23
24+ #define PY_SSIZE_T_CLEAN
25+
26 #include <Python.h>
27 #if defined(MACOS) && !defined(MACOS_X_UNIX)
28 # include "macglue.h"
29***************
30*** 55,60 ****
31--- 57,78 ----
32 # define PySequenceMethods int
33 #endif
34
35+ #if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02050000
36+ # define PyInt Py_ssize_t
37+ # define PyInquiry lenfunc
38+ # define PyIntArgFunc ssizeargfunc
39+ # define PyIntIntArgFunc ssizessizeargfunc
40+ # define PyIntObjArgProc ssizeobjargproc
41+ # define PyIntIntObjArgProc ssizessizeobjargproc
42+ #else
43+ # define PyInt int
44+ # define PyInquiry inquiry
45+ # define PyIntArgFunc intargfunc
46+ # define PyIntIntArgFunc intintargfunc
47+ # define PyIntObjArgProc intobjargproc
48+ # define PyIntIntObjArgProc intintobjargproc
49+ #endif
50+
51 /* Parser flags */
52 #define single_input 256
53 #define file_input 257
54***************
55*** 150,160 ****
56 static long(*dll_PyInt_AsLong)(PyObject *);
57 static PyObject*(*dll_PyInt_FromLong)(long);
58 static PyTypeObject* dll_PyInt_Type;
59! static PyObject*(*dll_PyList_GetItem)(PyObject *, int);
60 static PyObject*(*dll_PyList_Append)(PyObject *, PyObject *);
61! static PyObject*(*dll_PyList_New)(int size);
62! static int(*dll_PyList_SetItem)(PyObject *, int, PyObject *);
63! static int(*dll_PyList_Size)(PyObject *);
64 static PyTypeObject* dll_PyList_Type;
65 static PyObject*(*dll_PyImport_ImportModule)(const char *);
66 static PyObject*(*dll_PyDict_New)(void);
67--- 168,178 ----
68 static long(*dll_PyInt_AsLong)(PyObject *);
69 static PyObject*(*dll_PyInt_FromLong)(long);
70 static PyTypeObject* dll_PyInt_Type;
71! static PyObject*(*dll_PyList_GetItem)(PyObject *, PyInt);
72 static PyObject*(*dll_PyList_Append)(PyObject *, PyObject *);
73! static PyObject*(*dll_PyList_New)(PyInt size);
74! static int(*dll_PyList_SetItem)(PyObject *, PyInt, PyObject *);
75! static PyInt(*dll_PyList_Size)(PyObject *);
76 static PyTypeObject* dll_PyList_Type;
77 static PyObject*(*dll_PyImport_ImportModule)(const char *);
78 static PyObject*(*dll_PyDict_New)(void);
79***************
80*** 163,170 ****
81 static int(*dll_PyRun_SimpleString)(char *);
82 static char*(*dll_PyString_AsString)(PyObject *);
83 static PyObject*(*dll_PyString_FromString)(const char *);
84! static PyObject*(*dll_PyString_FromStringAndSize)(const char *, int);
85! static int(*dll_PyString_Size)(PyObject *);
86 static PyTypeObject* dll_PyString_Type;
87 static int(*dll_PySys_SetObject)(char *, PyObject *);
88 static int(*dll_PySys_SetArgv)(int, char **);
89--- 181,188 ----
90 static int(*dll_PyRun_SimpleString)(char *);
91 static char*(*dll_PyString_AsString)(PyObject *);
92 static PyObject*(*dll_PyString_FromString)(const char *);
93! static PyObject*(*dll_PyString_FromStringAndSize)(const char *, PyInt);
94! static PyInt(*dll_PyString_Size)(PyObject *);
95 static PyTypeObject* dll_PyString_Type;
96 static int(*dll_PySys_SetObject)(char *, PyObject *);
97 static int(*dll_PySys_SetArgv)(int, char **);
98***************
99*** 367,376 ****
100 * ----------------------------------------------
101 */
102 static PyObject *GetBufferLine(buf_T *, int);
103! static PyObject *GetBufferLineList(buf_T *, int, int);
104
105 static int SetBufferLine(buf_T *, int, PyObject *, int *);
106! static int SetBufferLineList(buf_T *, int, int, PyObject *, int *);
107 static int InsertBufferLines(buf_T *, int, PyObject *, int *);
108
109 static PyObject *LineToString(const char *);
110--- 385,394 ----
111 * ----------------------------------------------
112 */
113 static PyObject *GetBufferLine(buf_T *, int);
114! static PyObject *GetBufferLineList(buf_T *, PyInt, PyInt);
115
116 static int SetBufferLine(buf_T *, int, PyObject *, int *);
117! static int SetBufferLineList(buf_T *, PyInt, PyInt, PyObject *, int *);
118 static int InsertBufferLines(buf_T *, int, PyObject *, int *);
119
120 static PyObject *LineToString(const char *);
121***************
122*** 773,780 ****
123 static PyObject *
124 OutputWritelines(PyObject *self, PyObject *args)
125 {
126! int n;
127! int i;
128 PyObject *list;
129 int error = ((OutputObject *)(self))->error;
130
131--- 791,798 ----
132 static PyObject *
133 OutputWritelines(PyObject *self, PyObject *args)
134 {
135! PyInt n;
136! PyInt i;
137 PyObject *list;
138 int error = ((OutputObject *)(self))->error;
139
140***************
141*** 986,996 ****
142 static PyObject *BufferGetattr(PyObject *, char *);
143 static PyObject *BufferRepr(PyObject *);
144
145! static int BufferLength(PyObject *);
146! static PyObject *BufferItem(PyObject *, int);
147! static PyObject *BufferSlice(PyObject *, int, int);
148! static int BufferAssItem(PyObject *, int, PyObject *);
149! static int BufferAssSlice(PyObject *, int, int, PyObject *);
150
151 static PyObject *BufferAppend(PyObject *, PyObject *);
152 static PyObject *BufferMark(PyObject *, PyObject *);
153--- 1004,1014 ----
154 static PyObject *BufferGetattr(PyObject *, char *);
155 static PyObject *BufferRepr(PyObject *);
156
157! static PyInt BufferLength(PyObject *);
158! static PyObject *BufferItem(PyObject *, PyInt);
159! static PyObject *BufferSlice(PyObject *, PyInt, PyInt);
160! static PyInt BufferAssItem(PyObject *, PyInt, PyObject *);
161! static PyInt BufferAssSlice(PyObject *, PyInt, PyInt, PyObject *);
162
163 static PyObject *BufferAppend(PyObject *, PyObject *);
164 static PyObject *BufferMark(PyObject *, PyObject *);
165***************
166*** 1017,1027 ****
167 static PyObject *RangeGetattr(PyObject *, char *);
168 static PyObject *RangeRepr(PyObject *);
169
170! static int RangeLength(PyObject *);
171! static PyObject *RangeItem(PyObject *, int);
172! static PyObject *RangeSlice(PyObject *, int, int);
173! static int RangeAssItem(PyObject *, int, PyObject *);
174! static int RangeAssSlice(PyObject *, int, int, PyObject *);
175
176 static PyObject *RangeAppend(PyObject *, PyObject *);
177
178--- 1035,1045 ----
179 static PyObject *RangeGetattr(PyObject *, char *);
180 static PyObject *RangeRepr(PyObject *);
181
182! static PyInt RangeLength(PyObject *);
183! static PyObject *RangeItem(PyObject *, PyInt);
184! static PyObject *RangeSlice(PyObject *, PyInt, PyInt);
185! static PyInt RangeAssItem(PyObject *, PyInt, PyObject *);
186! static PyInt RangeAssSlice(PyObject *, PyInt, PyInt, PyObject *);
187
188 static PyObject *RangeAppend(PyObject *, PyObject *);
189
190***************
191*** 1029,1043 ****
192 * -------------------------------------------
193 */
194
195! static int WinListLength(PyObject *);
196! static PyObject *WinListItem(PyObject *, int);
197
198 /* Buffer list type - Implementation functions
199 * -------------------------------------------
200 */
201
202! static int BufListLength(PyObject *);
203! static PyObject *BufListItem(PyObject *, int);
204
205 /* Current objects type - Implementation functions
206 * -----------------------------------------------
207--- 1047,1061 ----
208 * -------------------------------------------
209 */
210
211! static PyInt WinListLength(PyObject *);
212! static PyObject *WinListItem(PyObject *, PyInt);
213
214 /* Buffer list type - Implementation functions
215 * -------------------------------------------
216 */
217
218! static PyInt BufListLength(PyObject *);
219! static PyObject *BufListItem(PyObject *, PyInt);
220
221 /* Current objects type - Implementation functions
222 * -----------------------------------------------
223***************
224*** 1130,1135 ****
225--- 1148,1163 ----
226 result = Py_BuildValue("s", buf);
227 PyDict_SetItemString(lookupDict, ptrBuf, result);
228 }
229+ #ifdef FEAT_FLOAT
230+ else if (our_tv->v_type == VAR_FLOAT)
231+ {
232+ char buf[NUMBUFLEN];
233+
234+ sprintf(buf, "%f", our_tv->vval.v_float);
235+ result = Py_BuildValue("s", buf);
236+ PyDict_SetItemString(lookupDict, ptrBuf, result);
237+ }
238+ #endif
239 else if (our_tv->v_type == VAR_LIST)
240 {
241 list_T *list = our_tv->vval.v_list;
242***************
243*** 1245,1251 ****
244 }
245
246 static PyObject *
247! RBItem(BufferObject *self, int n, int start, int end)
248 {
249 if (CheckBuffer(self))
250 return NULL;
251--- 1273,1279 ----
252 }
253
254 static PyObject *
255! RBItem(BufferObject *self, PyInt n, int start, int end)
256 {
257 if (CheckBuffer(self))
258 return NULL;
259***************
260*** 1260,1268 ****
261 }
262
263 static PyObject *
264! RBSlice(BufferObject *self, int lo, int hi, int start, int end)
265 {
266! int size;
267
268 if (CheckBuffer(self))
269 return NULL;
270--- 1288,1296 ----
271 }
272
273 static PyObject *
274! RBSlice(BufferObject *self, PyInt lo, PyInt hi, int start, int end)
275 {
276! PyInt size;
277
278 if (CheckBuffer(self))
279 return NULL;
280***************
281*** 1283,1290 ****
282 return GetBufferLineList(self->buf, lo+start, hi+start);
283 }
284
285! static int
286! RBAssItem(BufferObject *self, int n, PyObject *val, int start, int end, int *new_end)
287 {
288 int len_change;
289
290--- 1311,1318 ----
291 return GetBufferLineList(self->buf, lo+start, hi+start);
292 }
293
294! static PyInt
295! RBAssItem(BufferObject *self, PyInt n, PyObject *val, int start, int end, int *new_end)
296 {
297 int len_change;
298
299***************
300*** 1306,1313 ****
301 return 0;
302 }
303
304! static int
305! RBAssSlice(BufferObject *self, int lo, int hi, PyObject *val, int start, int end, int *new_end)
306 {
307 int size;
308 int len_change;
309--- 1334,1341 ----
310 return 0;
311 }
312
313! static PyInt
314! RBAssSlice(BufferObject *self, PyInt lo, PyInt hi, PyObject *val, int start, int end, int *new_end)
315 {
316 int size;
317 int len_change;
318***************
319*** 1384,1396 ****
320 };
321
322 static PySequenceMethods BufferAsSeq = {
323! (inquiry) BufferLength, /* sq_length, len(x) */
324 (binaryfunc) 0, /* BufferConcat, */ /* sq_concat, x+y */
325! (intargfunc) 0, /* BufferRepeat, */ /* sq_repeat, x*n */
326! (intargfunc) BufferItem, /* sq_item, x[i] */
327! (intintargfunc) BufferSlice, /* sq_slice, x[i:j] */
328! (intobjargproc) BufferAssItem, /* sq_ass_item, x[i]=v */
329! (intintobjargproc) BufferAssSlice, /* sq_ass_slice, x[i:j]=v */
330 };
331
332 static PyTypeObject BufferType = {
333--- 1412,1424 ----
334 };
335
336 static PySequenceMethods BufferAsSeq = {
337! (PyInquiry) BufferLength, /* sq_length, len(x) */
338 (binaryfunc) 0, /* BufferConcat, */ /* sq_concat, x+y */
339! (PyIntArgFunc) 0, /* BufferRepeat, */ /* sq_repeat, x*n */
340! (PyIntArgFunc) BufferItem, /* sq_item, x[i] */
341! (PyIntIntArgFunc) BufferSlice, /* sq_slice, x[i:j] */
342! (PyIntObjArgProc) BufferAssItem, /* sq_ass_item, x[i]=v */
343! (PyIntIntObjArgProc) BufferAssSlice, /* sq_ass_slice, x[i:j]=v */
344 };
345
346 static PyTypeObject BufferType = {
347***************
348*** 1516,1522 ****
349
350 /******************/
351
352! static int
353 BufferLength(PyObject *self)
354 {
355 /* HOW DO WE SIGNAL AN ERROR FROM THIS FUNCTION? */
356--- 1544,1550 ----
357
358 /******************/
359
360! static PyInt
361 BufferLength(PyObject *self)
362 {
363 /* HOW DO WE SIGNAL AN ERROR FROM THIS FUNCTION? */
364***************
365*** 1527,1555 ****
366 }
367
368 static PyObject *
369! BufferItem(PyObject *self, int n)
370 {
371 return RBItem((BufferObject *)(self), n, 1,
372 (int)((BufferObject *)(self))->buf->b_ml.ml_line_count);
373 }
374
375 static PyObject *
376! BufferSlice(PyObject *self, int lo, int hi)
377 {
378 return RBSlice((BufferObject *)(self), lo, hi, 1,
379 (int)((BufferObject *)(self))->buf->b_ml.ml_line_count);
380 }
381
382! static int
383! BufferAssItem(PyObject *self, int n, PyObject *val)
384 {
385 return RBAssItem((BufferObject *)(self), n, val, 1,
386 (int)((BufferObject *)(self))->buf->b_ml.ml_line_count,
387 NULL);
388 }
389
390! static int
391! BufferAssSlice(PyObject *self, int lo, int hi, PyObject *val)
392 {
393 return RBAssSlice((BufferObject *)(self), lo, hi, val, 1,
394 (int)((BufferObject *)(self))->buf->b_ml.ml_line_count,
395--- 1555,1583 ----
396 }
397
398 static PyObject *
399! BufferItem(PyObject *self, PyInt n)
400 {
401 return RBItem((BufferObject *)(self), n, 1,
402 (int)((BufferObject *)(self))->buf->b_ml.ml_line_count);
403 }
404
405 static PyObject *
406! BufferSlice(PyObject *self, PyInt lo, PyInt hi)
407 {
408 return RBSlice((BufferObject *)(self), lo, hi, 1,
409 (int)((BufferObject *)(self))->buf->b_ml.ml_line_count);
410 }
411
412! static PyInt
413! BufferAssItem(PyObject *self, PyInt n, PyObject *val)
414 {
415 return RBAssItem((BufferObject *)(self), n, val, 1,
416 (int)((BufferObject *)(self))->buf->b_ml.ml_line_count,
417 NULL);
418 }
419
420! static PyInt
421! BufferAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val)
422 {
423 return RBAssSlice((BufferObject *)(self), lo, hi, val, 1,
424 (int)((BufferObject *)(self))->buf->b_ml.ml_line_count,
425***************
426*** 1627,1639 ****
427 };
428
429 static PySequenceMethods RangeAsSeq = {
430! (inquiry) RangeLength, /* sq_length, len(x) */
431 (binaryfunc) 0, /* RangeConcat, */ /* sq_concat, x+y */
432! (intargfunc) 0, /* RangeRepeat, */ /* sq_repeat, x*n */
433! (intargfunc) RangeItem, /* sq_item, x[i] */
434! (intintargfunc) RangeSlice, /* sq_slice, x[i:j] */
435! (intobjargproc) RangeAssItem, /* sq_ass_item, x[i]=v */
436! (intintobjargproc) RangeAssSlice, /* sq_ass_slice, x[i:j]=v */
437 };
438
439 static PyTypeObject RangeType = {
440--- 1655,1667 ----
441 };
442
443 static PySequenceMethods RangeAsSeq = {
444! (PyInquiry) RangeLength, /* sq_length, len(x) */
445 (binaryfunc) 0, /* RangeConcat, */ /* sq_concat, x+y */
446! (PyIntArgFunc) 0, /* RangeRepeat, */ /* sq_repeat, x*n */
447! (PyIntArgFunc) RangeItem, /* sq_item, x[i] */
448! (PyIntIntArgFunc) RangeSlice, /* sq_slice, x[i:j] */
449! (PyIntObjArgProc) RangeAssItem, /* sq_ass_item, x[i]=v */
450! (PyIntIntObjArgProc) RangeAssSlice, /* sq_ass_slice, x[i:j]=v */
451 };
452
453 static PyTypeObject RangeType = {
454***************
455*** 1738,1744 ****
456
457 /****************/
458
459! static int
460 RangeLength(PyObject *self)
461 {
462 /* HOW DO WE SIGNAL AN ERROR FROM THIS FUNCTION? */
463--- 1766,1772 ----
464
465 /****************/
466
467! static PyInt
468 RangeLength(PyObject *self)
469 {
470 /* HOW DO WE SIGNAL AN ERROR FROM THIS FUNCTION? */
471***************
472*** 1749,1755 ****
473 }
474
475 static PyObject *
476! RangeItem(PyObject *self, int n)
477 {
478 return RBItem(((RangeObject *)(self))->buf, n,
479 ((RangeObject *)(self))->start,
480--- 1777,1783 ----
481 }
482
483 static PyObject *
484! RangeItem(PyObject *self, PyInt n)
485 {
486 return RBItem(((RangeObject *)(self))->buf, n,
487 ((RangeObject *)(self))->start,
488***************
489*** 1757,1771 ****
490 }
491
492 static PyObject *
493! RangeSlice(PyObject *self, int lo, int hi)
494 {
495 return RBSlice(((RangeObject *)(self))->buf, lo, hi,
496 ((RangeObject *)(self))->start,
497 ((RangeObject *)(self))->end);
498 }
499
500! static int
501! RangeAssItem(PyObject *self, int n, PyObject *val)
502 {
503 return RBAssItem(((RangeObject *)(self))->buf, n, val,
504 ((RangeObject *)(self))->start,
505--- 1785,1799 ----
506 }
507
508 static PyObject *
509! RangeSlice(PyObject *self, PyInt lo, PyInt hi)
510 {
511 return RBSlice(((RangeObject *)(self))->buf, lo, hi,
512 ((RangeObject *)(self))->start,
513 ((RangeObject *)(self))->end);
514 }
515
516! static PyInt
517! RangeAssItem(PyObject *self, PyInt n, PyObject *val)
518 {
519 return RBAssItem(((RangeObject *)(self))->buf, n, val,
520 ((RangeObject *)(self))->start,
521***************
522*** 1773,1780 ****
523 &((RangeObject *)(self))->end);
524 }
525
526! static int
527! RangeAssSlice(PyObject *self, int lo, int hi, PyObject *val)
528 {
529 return RBAssSlice(((RangeObject *)(self))->buf, lo, hi, val,
530 ((RangeObject *)(self))->start,
531--- 1801,1808 ----
532 &((RangeObject *)(self))->end);
533 }
534
535! static PyInt
536! RangeAssSlice(PyObject *self, PyInt lo, PyInt hi, PyObject *val)
537 {
538 return RBAssSlice(((RangeObject *)(self))->buf, lo, hi, val,
539 ((RangeObject *)(self))->start,
540***************
541*** 1801,1813 ****
542 BufListObject;
543
544 static PySequenceMethods BufListAsSeq = {
545! (inquiry) BufListLength, /* sq_length, len(x) */
546 (binaryfunc) 0, /* sq_concat, x+y */
547! (intargfunc) 0, /* sq_repeat, x*n */
548! (intargfunc) BufListItem, /* sq_item, x[i] */
549! (intintargfunc) 0, /* sq_slice, x[i:j] */
550! (intobjargproc) 0, /* sq_ass_item, x[i]=v */
551! (intintobjargproc) 0, /* sq_ass_slice, x[i:j]=v */
552 };
553
554 static PyTypeObject BufListType = {
555--- 1829,1841 ----
556 BufListObject;
557
558 static PySequenceMethods BufListAsSeq = {
559! (PyInquiry) BufListLength, /* sq_length, len(x) */
560 (binaryfunc) 0, /* sq_concat, x+y */
561! (PyIntArgFunc) 0, /* sq_repeat, x*n */
562! (PyIntArgFunc) BufListItem, /* sq_item, x[i] */
563! (PyIntIntArgFunc) 0, /* sq_slice, x[i:j] */
564! (PyIntObjArgProc) 0, /* sq_ass_item, x[i]=v */
565! (PyIntIntObjArgProc) 0, /* sq_ass_slice, x[i:j]=v */
566 };
567
568 static PyTypeObject BufListType = {
569***************
570*** 1837,1843 ****
571 */
572
573 /*ARGSUSED*/
574! static int
575 BufListLength(PyObject *self)
576 {
577 buf_T *b = firstbuf;
578--- 1865,1871 ----
579 */
580
581 /*ARGSUSED*/
582! static PyInt
583 BufListLength(PyObject *self)
584 {
585 buf_T *b = firstbuf;
586***************
587*** 1854,1860 ****
588
589 /*ARGSUSED*/
590 static PyObject *
591! BufListItem(PyObject *self, int n)
592 {
593 buf_T *b;
594
595--- 1882,1888 ----
596
597 /*ARGSUSED*/
598 static PyObject *
599! BufListItem(PyObject *self, PyInt n)
600 {
601 buf_T *b;
602
603***************
604*** 2119,2131 ****
605 WinListObject;
606
607 static PySequenceMethods WinListAsSeq = {
608! (inquiry) WinListLength, /* sq_length, len(x) */
609 (binaryfunc) 0, /* sq_concat, x+y */
610! (intargfunc) 0, /* sq_repeat, x*n */
611! (intargfunc) WinListItem, /* sq_item, x[i] */
612! (intintargfunc) 0, /* sq_slice, x[i:j] */
613! (intobjargproc) 0, /* sq_ass_item, x[i]=v */
614! (intintobjargproc) 0, /* sq_ass_slice, x[i:j]=v */
615 };
616
617 static PyTypeObject WinListType = {
618--- 2147,2159 ----
619 WinListObject;
620
621 static PySequenceMethods WinListAsSeq = {
622! (PyInquiry) WinListLength, /* sq_length, len(x) */
623 (binaryfunc) 0, /* sq_concat, x+y */
624! (PyIntArgFunc) 0, /* sq_repeat, x*n */
625! (PyIntArgFunc) WinListItem, /* sq_item, x[i] */
626! (PyIntIntArgFunc) 0, /* sq_slice, x[i:j] */
627! (PyIntObjArgProc) 0, /* sq_ass_item, x[i]=v */
628! (PyIntIntObjArgProc) 0, /* sq_ass_slice, x[i:j]=v */
629 };
630
631 static PyTypeObject WinListType = {
632***************
633*** 2154,2160 ****
634 /* Window list object - Implementation
635 */
636 /*ARGSUSED*/
637! static int
638 WinListLength(PyObject *self)
639 {
640 win_T *w = firstwin;
641--- 2182,2188 ----
642 /* Window list object - Implementation
643 */
644 /*ARGSUSED*/
645! static PyInt
646 WinListLength(PyObject *self)
647 {
648 win_T *w = firstwin;
649***************
650*** 2171,2177 ****
651
652 /*ARGSUSED*/
653 static PyObject *
654! WinListItem(PyObject *self, int n)
655 {
656 win_T *w;
657
658--- 2199,2205 ----
659
660 /*ARGSUSED*/
661 static PyObject *
662! WinListItem(PyObject *self, PyInt n)
663 {
664 win_T *w;
665
666***************
667*** 2351,2360 ****
668 * including, hi. The list is returned as a Python list of string objects.
669 */
670 static PyObject *
671! GetBufferLineList(buf_T *buf, int lo, int hi)
672 {
673! int i;
674! int n = hi - lo;
675 PyObject *list = PyList_New(n);
676
677 if (list == NULL)
678--- 2379,2388 ----
679 * including, hi. The list is returned as a Python list of string objects.
680 */
681 static PyObject *
682! GetBufferLineList(buf_T *buf, PyInt lo, PyInt hi)
683 {
684! PyInt i;
685! PyInt n = hi - lo;
686 PyObject *list = PyList_New(n);
687
688 if (list == NULL)
689***************
690*** 2517,2523 ****
691 * is set to the change in the buffer length.
692 */
693 static int
694! SetBufferLineList(buf_T *buf, int lo, int hi, PyObject *list, int *len_change)
695 {
696 /* First of all, we check the thpe of the supplied Python object.
697 * There are three cases:
698--- 2545,2551 ----
699 * is set to the change in the buffer length.
700 */
701 static int
702! SetBufferLineList(buf_T *buf, PyInt lo, PyInt hi, PyObject *list, int *len_change)
703 {
704 /* First of all, we check the thpe of the supplied Python object.
705 * There are three cases:
706***************
707*** 2527,2534 ****
708 */
709 if (list == Py_None || list == NULL)
710 {
711! int i;
712! int n = hi - lo;
713 buf_T *savebuf = curbuf;
714
715 PyErr_Clear();
716--- 2555,2562 ----
717 */
718 if (list == Py_None || list == NULL)
719 {
720! PyInt i;
721! PyInt n = hi - lo;
722 buf_T *savebuf = curbuf;
723
724 PyErr_Clear();
725***************
726*** 2564,2572 ****
727 }
728 else if (PyList_Check(list))
729 {
730! int i;
731! int new_len = PyList_Size(list);
732! int old_len = hi - lo;
733 int extra = 0; /* lines added to text, can be negative */
734 char **array;
735 buf_T *savebuf;
736--- 2592,2600 ----
737 }
738 else if (PyList_Check(list))
739 {
740! PyInt i;
741! PyInt new_len = PyList_Size(list);
742! PyInt old_len = hi - lo;
743 int extra = 0; /* lines added to text, can be negative */
744 char **array;
745 buf_T *savebuf;
746***************
747*** 2745,2752 ****
748 }
749 else if (PyList_Check(lines))
750 {
751! int i;
752! int size = PyList_Size(lines);
753 char **array;
754 buf_T *savebuf;
755
756--- 2773,2780 ----
757 }
758 else if (PyList_Check(lines))
759 {
760! PyInt i;
761! PyInt size = PyList_Size(lines);
762 char **array;
763 buf_T *savebuf;
764
765***************
766*** 2831,2837 ****
767 LineToString(const char *str)
768 {
769 PyObject *result;
770! int len = strlen(str);
771 char *p;
772
773 /* Allocate an Python string object, with uninitialised contents. We
774--- 2859,2865 ----
775 LineToString(const char *str)
776 {
777 PyObject *result;
778! PyInt len = strlen(str);
779 char *p;
780
781 /* Allocate an Python string object, with uninitialised contents. We
782***************
783*** 2871,2878 ****
784 {
785 const char *str;
786 char *save;
787! int len;
788! int i;
789 char *p;
790
791 if (obj == NULL || !PyString_Check(obj))
792--- 2899,2906 ----
793 {
794 const char *str;
795 char *save;
796! PyInt len;
797! PyInt i;
798 char *p;
799
800 if (obj == NULL || !PyString_Check(obj))
801*** ../vim-7.1.306/src/version.c Wed Jun 4 10:59:18 2008
802--- src/version.c Wed Jun 4 13:31:40 2008
803***************
804*** 668,669 ****
805--- 673,676 ----
806 { /* Add new patch number below this line */
807+ /**/
808+ 307,
809 /**/
810
811--
812For humans, honesty is a matter of degree. Engineers are always honest in
813matters of technology and human relationships. That's why it's a good idea
814to keep engineers away from customers, romantic interests, and other people
815who can't handle the truth.
816 (Scott Adams - The Dilbert principle)
817
818 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
819/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
820\\\ download, build and distribute -- http://www.A-A-P.org ///
821 \\\ help me help AIDS victims -- http://ICCF-Holland.org ///
This page took 0.113859 seconds and 4 git commands to generate.