}
}
+ static int
+msg_wrapper(char *text)
+{
+ return msg((char_u *)text);
+}
+
static int
write_output(OutputObject *self, PyObject *string)
{
Py_BEGIN_ALLOW_THREADS
Python_Lock_Vim();
- writer((writefn)(error ? emsg : msg), (char_u *)str, len);
+ writer((writefn)(error ? emsg : msg_wrapper), (char_u *)str, len);
Python_Release_Vim();
Py_END_ALLOW_THREADS
PyMem_Free(str);
else if (msg_list != NULL && *msg_list != NULL)
{
int should_free;
- char_u *msg;
+ char *msg;
msg = get_exception_string(*msg_list, ET_ERROR, NULL, &should_free);
return -1;
}
- PyErr_SetVim((char *) msg);
+ PyErr_SetVim(msg);
free_global_msglist();
static int
set_option_value_err(char_u *key, int numval, char_u *stringval, int opt_flags)
{
- char_u *errmsg;
+ char *errmsg;
if ((errmsg = set_option_value(key, numval, stringval, opt_flags)))
{
if (VimTryEnd())
return FAIL;
- PyErr_SetVim((char *)errmsg);
+ PyErr_SetVim(errmsg);
return FAIL;
}
return OK;
char buffer[2*MAXPATHLEN];
vim_snprintf(buffer, sizeof(buffer),
NOCATGETS("currentFile %d %s"),
- f ? strlen(f) : 0, f ? f : "");
+ f ? (int)strlen(f) : 0, f ? f : "");
workshop_send_message(buffer);
} else if (strcmp(cmd, NOCATGETS("getCursorRow")) == 0) {
int row = workshop_test_getcursorrow();
char buffer[2*MAXPATHLEN];
vim_snprintf(buffer, sizeof(buffer),
NOCATGETS("cursorRowText %d %s"),
- t ? strlen(t) : 0, t ? t : "");
+ t ? (int)strlen(t) : 0, t ? t : "");
workshop_send_message(buffer);
} else if (strcmp(cmd, NOCATGETS("getSelectedText")) == 0) {
char *t = workshop_test_getselectedtext();
char buffer[2*MAXPATHLEN];
vim_snprintf(buffer, sizeof(buffer),
NOCATGETS("selectedText %d %s"),
- t ? strlen(t) : 0, t ? t : "");
+ t ? (int)strlen(t) : 0, t ? t : "");
workshop_send_message(buffer);
#endif
}
else if (varp == &p_guifontset)
{
if (STRCMP(p_guifontset, "*") == 0)
- errmsg = (char_u *)N_("E597: can't select fontset");
+ errmsg = N_("E597: can't select fontset");
else if (gui.in_use && gui_init_font(p_guifontset, TRUE) != OK)
- errmsg = (char_u *)N_("E598: Invalid fontset");
+ errmsg = N_("E598: Invalid fontset");
redraw_gui_only = TRUE;
}
# endif
p = (char_u *)MOUSE_ALL;
#else
if (*p_mouse != NUL)
- errmsg = (char_u *)N_("E538: No mouse support");
+ errmsg = N_("E538: No mouse support");
#endif
}
#if defined(FEAT_GUI)