comparison src/if_py_both.h @ 15543:dd725a8ab112 v8.1.0779

patch 8.1.0779: argument for message functions is inconsistent commit https://github.com/vim/vim/commit/32526b3c1846025f0e655f41efd4e5428da16b6c Author: Bram Moolenaar <Bram@vim.org> Date: Sat Jan 19 17:43:09 2019 +0100 patch 8.1.0779: argument for message functions is inconsistent Problem: Argument for message functions is inconsistent. Solution: Make first argument to msg() "char *".
author Bram Moolenaar <Bram@vim.org>
date Sat, 19 Jan 2019 17:45:07 +0100
parents 0fcc1315c061
children 62b3805506b3
comparison
equal deleted inserted replaced
15542:5baedae7ca7a 15543:dd725a8ab112
408 io_ga.ga_len += (int)n; 408 io_ga.ga_len += (int)n;
409 } 409 }
410 } 410 }
411 411
412 static int 412 static int
413 msg_wrapper(char *text)
414 {
415 return msg((char_u *)text);
416 }
417
418 static int
419 write_output(OutputObject *self, PyObject *string) 413 write_output(OutputObject *self, PyObject *string)
420 { 414 {
421 Py_ssize_t len = 0; 415 Py_ssize_t len = 0;
422 char *str = NULL; 416 char *str = NULL;
423 int error = self->error; 417 int error = self->error;
425 if (!PyArg_Parse(string, "et#", ENC_OPT, &str, &len)) 419 if (!PyArg_Parse(string, "et#", ENC_OPT, &str, &len))
426 return -1; 420 return -1;
427 421
428 Py_BEGIN_ALLOW_THREADS 422 Py_BEGIN_ALLOW_THREADS
429 Python_Lock_Vim(); 423 Python_Lock_Vim();
430 writer((writefn)(error ? emsg : msg_wrapper), (char_u *)str, len); 424 writer((writefn)(error ? emsg : msg), (char_u *)str, len);
431 Python_Release_Vim(); 425 Python_Release_Vim();
432 Py_END_ALLOW_THREADS 426 Py_END_ALLOW_THREADS
433 PyMem_Free(str); 427 PyMem_Free(str);
434 428
435 return 0; 429 return 0;