----------------------------------------
> Ok. Should I create a new theme in order to submit a patch?
>
> I think, I got to the bottom of this problem, "et#" format for
> PyArg_ParseTuple expects third parameter to be an int * that is a pointer to
> a 4 byte variable, but on Linux x86_64 sizeof(Py_ssize_t) == 8, so after
> parsing parameters we got half-initialized half-garbled len. On platforms
> where sizeof(Py_ssize_t) == sizeof(int) this bug is unreproducible =)
Hi Maxim,
Oh! Is there any chance you're using a version of python prior to 2.5?
If i'm correct then instead of Py_ssize_t len = 0, you should replace that
line with PyInt len;
This will be defined correctly near the top of if_python.c and work in both
cases. In any case, my original patch should have been done that way. Ugh.
Thanks,
Sean.
>
> Patch is fairly simple
>
> *** /tmp/extdiff.PnMpCM/vim.1052677493be/src/if_py_both.h 2012-09-08
> 01:36:57.452192738 +0400
> --- /home/maxim/Projects/vim/src/if_py_both.h 2012-09-08 01:35:34.074187900
> +0400
> ***************
> *** 74,80 ****
> static PyObject *
> OutputWrite(PyObject *self, PyObject *args)
> {
> ! Py_ssize_t len;
> char *str = NULL;
> int error = ((OutputObject *)(self))->error;
>
> --- 74,80 ----
> static PyObject *
> OutputWrite(PyObject *self, PyObject *args)
> {
> ! Py_ssize_t len = 0;
> char *str = NULL;
> int error = ((OutputObject *)(self))->error;
>
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php