Mercurial > vim
comparison src/if_python.c @ 2735:322a5c8d392b v7.3.144
updated for version 7.3.144
Problem: Crash with ":python help(dir)". (Kearn Holliday)
Solution: Fix the way the type is set on objects. (Tobias Columbus)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Sat, 26 Mar 2011 13:56:48 +0100 |
parents | b803b2776880 |
children | 329a9676040c |
comparison
equal
deleted
inserted
replaced
2734:719ff65f993e | 2735:322a5c8d392b |
---|---|
778 | 778 |
779 static int | 779 static int |
780 PythonIO_Init(void) | 780 PythonIO_Init(void) |
781 { | 781 { |
782 /* Fixups... */ | 782 /* Fixups... */ |
783 OutputType.ob_type = &PyType_Type; | 783 PyType_Ready(&OutputType); |
784 | 784 |
785 return PythonIO_Init_io(); | 785 return PythonIO_Init_io(); |
786 } | 786 } |
787 | 787 |
788 /****************************************************** | 788 /****************************************************** |
1400 PyObject *dict; | 1400 PyObject *dict; |
1401 /* The special value is removed from sys.path in Python_Init(). */ | 1401 /* The special value is removed from sys.path in Python_Init(). */ |
1402 static char *(argv[2]) = {"/must>not&exist/foo", NULL}; | 1402 static char *(argv[2]) = {"/must>not&exist/foo", NULL}; |
1403 | 1403 |
1404 /* Fixups... */ | 1404 /* Fixups... */ |
1405 BufferType.ob_type = &PyType_Type; | 1405 PyType_Ready(&BufferType); |
1406 RangeType.ob_type = &PyType_Type; | 1406 PyType_Ready(&RangeType); |
1407 WindowType.ob_type = &PyType_Type; | 1407 PyType_Ready(&WindowType); |
1408 BufListType.ob_type = &PyType_Type; | 1408 PyType_Ready(&BufListType); |
1409 WinListType.ob_type = &PyType_Type; | 1409 PyType_Ready(&WinListType); |
1410 CurrentType.ob_type = &PyType_Type; | 1410 PyType_Ready(&CurrentType); |
1411 | 1411 |
1412 /* Set sys.argv[] to avoid a crash in warn(). */ | 1412 /* Set sys.argv[] to avoid a crash in warn(). */ |
1413 PySys_SetArgv(1, argv); | 1413 PySys_SetArgv(1, argv); |
1414 | 1414 |
1415 mod = Py_InitModule4("vim", VimMethods, (char *)NULL, (PyObject *)NULL, PYTHON_API_VERSION); | 1415 mod = Py_InitModule4("vim", VimMethods, (char *)NULL, (PyObject *)NULL, PYTHON_API_VERSION); |