Show More
@@ -57,6 +57,12 b' fix_newline(PyObject *self, PyObject *ar' | |||||
57 | return Py_BuildValue("l", 0); |
|
57 | return Py_BuildValue("l", 0); | |
58 | } |
|
58 | } | |
59 |
|
59 | |||
|
60 | #if (PY_VERSION_HEX < 0x02050000) | |||
|
61 | static const char *addlines_format = "OOiiOO"; | |||
|
62 | #else | |||
|
63 | static const char *addlines_format = "OOnnOO"; | |||
|
64 | #endif | |||
|
65 | ||||
60 | /* |
|
66 | /* | |
61 | * read lines from fp into the hunk. The hunk is parsed into two arrays |
|
67 | * read lines from fp into the hunk. The hunk is parsed into two arrays | |
62 | * a and b. a gets the old state of the text, b gets the new state |
|
68 | * a and b. a gets the old state of the text, b gets the new state | |
@@ -68,13 +74,14 b' addlines(PyObject *self, PyObject *args)' | |||||
68 | { |
|
74 | { | |
69 |
|
75 | |||
70 | PyObject *fp, *hunk, *a, *b, *x; |
|
76 | PyObject *fp, *hunk, *a, *b, *x; | |
71 | int i; |
|
77 | Py_ssize_t i; | |
72 |
|
|
78 | Py_ssize_t lena, lenb; | |
73 |
|
|
79 | Py_ssize_t num; | |
74 |
|
|
80 | Py_ssize_t todoa, todob; | |
75 | char *s, c; |
|
81 | char *s, c; | |
76 | PyObject *l; |
|
82 | PyObject *l; | |
77 | if (!PyArg_ParseTuple(args, "OOiiOO", &fp, &hunk, &lena, &lenb, &a, &b)) |
|
83 | if (!PyArg_ParseTuple(args, addlines_format, | |
|
84 | &fp, &hunk, &lena, &lenb, &a, &b)) | |||
78 | return NULL; |
|
85 | return NULL; | |
79 |
|
86 | |||
80 | while (1) { |
|
87 | while (1) { |
General Comments 0
You need to be logged in to leave comments.
Login now