7373#undef main /* Defined in python.h - aargh */
7474#undef HAVE_FCNTL_H /* Clash with os_win32.h */
7575
76+ // Perhaps leave this out for Python 2.6, which supports bytes?
7677#define PyBytes_FromString PyString_FromString
7778#define PyBytes_Check PyString_Check
7879#define PyBytes_AsStringAndSize PyString_AsStringAndSize
80+ #define PyBytes_FromStringAndSize PyString_FromStringAndSize
7981
8082#if !defined(FEAT_PYTHON ) && defined(PROTO )
8183/* Use this to be able to generate prototypes without python being used. */
@@ -120,10 +122,10 @@ struct PyMethodDef { Py_ssize_t a; };
120122# define PY_CAN_RECURSE
121123#endif
122124
123- # if defined(DYNAMIC_PYTHON ) || defined(PROTO )
124- # ifndef DYNAMIC_PYTHON
125- # define HINSTANCE long_u /* for generating prototypes */
126- # endif
125+ #if defined(DYNAMIC_PYTHON ) || defined(PROTO )
126+ # ifndef DYNAMIC_PYTHON
127+ # define HINSTANCE long_u /* for generating prototypes */
128+ # endif
127129
128130# ifndef WIN3264
129131# include <dlfcn.h>
@@ -489,15 +491,15 @@ static struct
489491 PYTHON_PROC * ptr ;
490492} python_funcname_table [] =
491493{
492- #ifndef PY_SSIZE_T_CLEAN
494+ # ifndef PY_SSIZE_T_CLEAN
493495 {"PyArg_Parse" , (PYTHON_PROC * )& dll_PyArg_Parse },
494496 {"PyArg_ParseTuple" , (PYTHON_PROC * )& dll_PyArg_ParseTuple },
495497 {"Py_BuildValue" , (PYTHON_PROC * )& dll_Py_BuildValue },
496- #else
498+ # else
497499 {"_PyArg_Parse_SizeT" , (PYTHON_PROC * )& dll_PyArg_Parse },
498500 {"_PyArg_ParseTuple_SizeT" , (PYTHON_PROC * )& dll_PyArg_ParseTuple },
499501 {"_Py_BuildValue_SizeT" , (PYTHON_PROC * )& dll_Py_BuildValue },
500- #endif
502+ # endif
501503 {"PyMem_Free" , (PYTHON_PROC * )& dll_PyMem_Free },
502504 {"PyMem_Malloc" , (PYTHON_PROC * )& dll_PyMem_Malloc },
503505 {"PyDict_SetItemString" , (PYTHON_PROC * )& dll_PyDict_SetItemString },
@@ -678,7 +680,7 @@ python_runtime_link_init(char *libname, int verbose)
678680 PYTHON_PROC * ucs_as_encoded_string =
679681 (PYTHON_PROC * )& py_PyUnicode_AsEncodedString ;
680682
681- #if !(defined(PY_NO_RTLD_GLOBAL ) && defined(PY3_NO_RTLD_GLOBAL )) && defined(UNIX ) && defined(FEAT_PYTHON3 )
683+ # if !(defined(PY_NO_RTLD_GLOBAL ) && defined(PY3_NO_RTLD_GLOBAL )) && defined(UNIX ) && defined(FEAT_PYTHON3 )
682684 /* Can't have Python and Python3 loaded at the same time.
683685 * It cause a crash, because RTLD_GLOBAL is needed for
684686 * standard C extension libraries of one or both python versions. */
@@ -688,7 +690,7 @@ python_runtime_link_init(char *libname, int verbose)
688690 emsg (_ ("E836: This Vim cannot execute :python after using :py3" ));
689691 return FAIL ;
690692 }
691- #endif
693+ # endif
692694
693695 if (hinstPython )
694696 return OK ;
0 commit comments