Mercurial > vim
comparison src/if_python3.c @ 7823:bcef391c101c v7.4.1208
commit https://github.com/vim/vim/commit/68c2f638e65d914dc6e84eb7ce2624f08af525c0
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jan 30 17:24:07 2016 +0100
patch 7.4.1208
Problem: Using old style function declarations.
Solution: Change to new style function declarations. (script by Hirohito
Higashi)
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Sat, 30 Jan 2016 17:30:04 +0100 |
parents | 37c929c4a073 |
children | 3f7382858d4d |
comparison
equal
deleted
inserted
replaced
7822:c357d21dc1b5 | 7823:bcef391c101c |
---|---|
693 * DLL, as this can cause errors (importing data symbols is not reliable). | 693 * DLL, as this can cause errors (importing data symbols is not reliable). |
694 */ | 694 */ |
695 static void get_py3_exceptions(void); | 695 static void get_py3_exceptions(void); |
696 | 696 |
697 static void | 697 static void |
698 get_py3_exceptions() | 698 get_py3_exceptions(void) |
699 { | 699 { |
700 PyObject *exmod = PyImport_ImportModule("builtins"); | 700 PyObject *exmod = PyImport_ImportModule("builtins"); |
701 PyObject *exdict = PyModule_GetDict(exmod); | 701 PyObject *exdict = PyModule_GetDict(exmod); |
702 p3imp_PyExc_AttributeError = PyDict_GetItemString(exdict, "AttributeError"); | 702 p3imp_PyExc_AttributeError = PyDict_GetItemString(exdict, "AttributeError"); |
703 p3imp_PyExc_IndexError = PyDict_GetItemString(exdict, "IndexError"); | 703 p3imp_PyExc_IndexError = PyDict_GetItemString(exdict, "IndexError"); |
798 /****************************************************** | 798 /****************************************************** |
799 * 1. Python interpreter main program. | 799 * 1. Python interpreter main program. |
800 */ | 800 */ |
801 | 801 |
802 void | 802 void |
803 python3_end() | 803 python3_end(void) |
804 { | 804 { |
805 static int recurse = 0; | 805 static int recurse = 0; |
806 | 806 |
807 /* If a crash occurs while doing this, don't try again. */ | 807 /* If a crash occurs while doing this, don't try again. */ |
808 if (recurse != 0) | 808 if (recurse != 0) |
828 --recurse; | 828 --recurse; |
829 } | 829 } |
830 | 830 |
831 #if (defined(DYNAMIC_PYTHON3) && defined(DYNAMIC_PYTHON) && defined(FEAT_PYTHON) && defined(UNIX)) || defined(PROTO) | 831 #if (defined(DYNAMIC_PYTHON3) && defined(DYNAMIC_PYTHON) && defined(FEAT_PYTHON) && defined(UNIX)) || defined(PROTO) |
832 int | 832 int |
833 python3_loaded() | 833 python3_loaded(void) |
834 { | 834 { |
835 return (hinstPy3 != 0); | 835 return (hinstPy3 != 0); |
836 } | 836 } |
837 #endif | 837 #endif |
838 | 838 |