Mercurial > vim
diff src/if_python.c @ 4966:620d9b59d4ed v7.3.1228
updated for version 7.3.1228
Problem: Python: various inconsistencies and problems.
Solution: StringToLine now supports both bytes() and unicode() objects.
Make function names consistant. Fix memory leak fixed in
StringToLine. (ZyX)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sun, 23 Jun 2013 13:11:18 +0200 |
parents | 52850ef928f8 |
children | f5c822e5a0eb |
line wrap: on
line diff
--- a/src/if_python.c +++ b/src/if_python.c @@ -68,12 +68,9 @@ #undef main /* Defined in python.h - aargh */ #undef HAVE_FCNTL_H /* Clash with os_win32.h */ -#define PyBytes_FromString PyString_FromString -#define PyBytes_Check PyString_Check - -/* No-op conversion functions, use with care! */ -#define PyString_AsBytes(obj) (obj) -#define PyString_FreeBytes(obj) +#define PyBytes_FromString PyString_FromString +#define PyBytes_Check PyString_Check +#define PyBytes_AsStringAndSize PyString_AsStringAndSize #if !defined(FEAT_PYTHON) && defined(PROTO) /* Use this to be able to generate prototypes without python being used. */