Mercurial > vim
comparison src/if_py_both.h @ 3806:5e909c379a1e v7.3.661
updated for version 7.3.661
Problem: SEGV in Python code.
Solution: Initialize len to zero. Use the right function depending on
version. (Maxim Philippov)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Wed, 12 Sep 2012 20:21:43 +0200 |
parents | 15cdcb8ddcfb |
children | 2bf8c00741f7 |
comparison
equal
deleted
inserted
replaced
3805:f62a81f2e2df | 3806:5e909c379a1e |
---|---|
72 */ | 72 */ |
73 | 73 |
74 static PyObject * | 74 static PyObject * |
75 OutputWrite(PyObject *self, PyObject *args) | 75 OutputWrite(PyObject *self, PyObject *args) |
76 { | 76 { |
77 Py_ssize_t len; | 77 Py_ssize_t len = 0; |
78 char *str = NULL; | 78 char *str = NULL; |
79 int error = ((OutputObject *)(self))->error; | 79 int error = ((OutputObject *)(self))->error; |
80 | 80 |
81 if (!PyArg_ParseTuple(args, "et#", ENC_OPT, &str, &len)) | 81 if (!PyArg_ParseTuple(args, "et#", ENC_OPT, &str, &len)) |
82 return NULL; | 82 return NULL; |