summaryrefslogtreecommitdiff
path: root/src/if_python3.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/if_python3.c')
-rw-r--r--src/if_python3.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/if_python3.c b/src/if_python3.c
index 3c6ee15e3..8b1b5beb6 100644
--- a/src/if_python3.c
+++ b/src/if_python3.c
@@ -799,10 +799,11 @@ static struct PyModuleDef vimmodule;
*/
#include "if_py_both.h"
+// NOTE: Must always be used at the start of a block, since it declares "name".
#define GET_ATTR_STRING(name, nameobj) \
char *name = ""; \
if (PyUnicode_Check(nameobj)) \
- name = _PyUnicode_AsString(nameobj)
+ name = (char *)_PyUnicode_AsString(nameobj)
#define PY3OBJ_DELETED(obj) (obj->ob_base.ob_refcnt<=0)