|
Karsten Hopp |
ae61a4 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
ae61a4 |
Subject: Patch 7.3.998
|
|
Karsten Hopp |
ae61a4 |
Fcc: outbox
|
|
Karsten Hopp |
ae61a4 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
ae61a4 |
Mime-Version: 1.0
|
|
Karsten Hopp |
ae61a4 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
ae61a4 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
ae61a4 |
------------
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
Patch 7.3.998
|
|
Karsten Hopp |
ae61a4 |
Problem: Python: garbage collection issues.
|
|
Karsten Hopp |
ae61a4 |
Solution: Fix the GC issues: Use proper DESTRUCTOR_FINISH: avoids negative
|
|
Karsten Hopp |
ae61a4 |
refcounts, use PyObject_GC_* for objects with tp_traverse and
|
|
Karsten Hopp |
ae61a4 |
tp_clear, add RangeTraverse and RangeClear, use Py_XDECREF in some
|
|
Karsten Hopp |
ae61a4 |
places. (ZyX)
|
|
Karsten Hopp |
ae61a4 |
Files: src/if_py_both.h, src/if_python3.c, src/if_python.c
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
*** ../vim-7.3.997/src/if_py_both.h 2013-05-21 20:40:35.000000000 +0200
|
|
Karsten Hopp |
ae61a4 |
--- src/if_py_both.h 2013-05-21 20:44:44.000000000 +0200
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 461,467 ****
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
static PyObject *
|
|
Karsten Hopp |
ae61a4 |
! VimEval(PyObject *self UNUSED, PyObject *args UNUSED)
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
char *expr;
|
|
Karsten Hopp |
ae61a4 |
typval_T *our_tv;
|
|
Karsten Hopp |
ae61a4 |
--- 461,467 ----
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
static PyObject *
|
|
Karsten Hopp |
ae61a4 |
! VimEval(PyObject *self UNUSED, PyObject *args)
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
char *expr;
|
|
Karsten Hopp |
ae61a4 |
typval_T *our_tv;
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 602,608 ****
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
IterObject *self;
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
! self = PyObject_NEW(IterObject, &IterType);
|
|
Karsten Hopp |
ae61a4 |
self->cur = start;
|
|
Karsten Hopp |
ae61a4 |
self->next = next;
|
|
Karsten Hopp |
ae61a4 |
self->destruct = destruct;
|
|
Karsten Hopp |
ae61a4 |
--- 602,608 ----
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
IterObject *self;
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
! self = PyObject_GC_New(IterObject, &IterType);
|
|
Karsten Hopp |
ae61a4 |
self->cur = start;
|
|
Karsten Hopp |
ae61a4 |
self->next = next;
|
|
Karsten Hopp |
ae61a4 |
self->destruct = destruct;
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 615,623 ****
|
|
Karsten Hopp |
ae61a4 |
static void
|
|
Karsten Hopp |
ae61a4 |
IterDestructor(IterObject *self)
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
self->destruct(self->cur);
|
|
Karsten Hopp |
ae61a4 |
!
|
|
Karsten Hopp |
ae61a4 |
! DESTRUCTOR_FINISH(self);
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
static int
|
|
Karsten Hopp |
ae61a4 |
--- 615,623 ----
|
|
Karsten Hopp |
ae61a4 |
static void
|
|
Karsten Hopp |
ae61a4 |
IterDestructor(IterObject *self)
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
+ PyObject_GC_UnTrack((void *)(self));
|
|
Karsten Hopp |
ae61a4 |
self->destruct(self->cur);
|
|
Karsten Hopp |
ae61a4 |
! PyObject_GC_Del((void *)(self));
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
static int
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 1414,1420 ****
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
OptionsObject *self;
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
! self = PyObject_NEW(OptionsObject, &OptionsType);
|
|
Karsten Hopp |
ae61a4 |
if (self == NULL)
|
|
Karsten Hopp |
ae61a4 |
return NULL;
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
--- 1414,1420 ----
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
OptionsObject *self;
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
! self = PyObject_GC_New(OptionsObject, &OptionsType);
|
|
Karsten Hopp |
ae61a4 |
if (self == NULL)
|
|
Karsten Hopp |
ae61a4 |
return NULL;
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 1431,1439 ****
|
|
Karsten Hopp |
ae61a4 |
static void
|
|
Karsten Hopp |
ae61a4 |
OptionsDestructor(OptionsObject *self)
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
! if (self->fromObj)
|
|
Karsten Hopp |
ae61a4 |
! Py_DECREF(self->fromObj);
|
|
Karsten Hopp |
ae61a4 |
! DESTRUCTOR_FINISH(self);
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
static int
|
|
Karsten Hopp |
ae61a4 |
--- 1431,1439 ----
|
|
Karsten Hopp |
ae61a4 |
static void
|
|
Karsten Hopp |
ae61a4 |
OptionsDestructor(OptionsObject *self)
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
! PyObject_GC_UnTrack((void *)(self));
|
|
Karsten Hopp |
ae61a4 |
! Py_XDECREF(self->fromObj);
|
|
Karsten Hopp |
ae61a4 |
! PyObject_GC_Del((void *)(self));
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
static int
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 1869,1875 ****
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
else
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
! self = PyObject_NEW(WindowObject, &WindowType);
|
|
Karsten Hopp |
ae61a4 |
if (self == NULL)
|
|
Karsten Hopp |
ae61a4 |
return NULL;
|
|
Karsten Hopp |
ae61a4 |
self->win = win;
|
|
Karsten Hopp |
ae61a4 |
--- 1869,1875 ----
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
else
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
! self = PyObject_GC_New(WindowObject, &WindowType);
|
|
Karsten Hopp |
ae61a4 |
if (self == NULL)
|
|
Karsten Hopp |
ae61a4 |
return NULL;
|
|
Karsten Hopp |
ae61a4 |
self->win = win;
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 1884,1895 ****
|
|
Karsten Hopp |
ae61a4 |
static void
|
|
Karsten Hopp |
ae61a4 |
WindowDestructor(WindowObject *self)
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
if (self->win && self->win != INVALID_WINDOW_VALUE)
|
|
Karsten Hopp |
ae61a4 |
WIN_PYTHON_REF(self->win) = NULL;
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
! Py_DECREF(((PyObject *)(self->tabObject)));
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
! DESTRUCTOR_FINISH(self);
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
static win_T *
|
|
Karsten Hopp |
ae61a4 |
--- 1884,1908 ----
|
|
Karsten Hopp |
ae61a4 |
static void
|
|
Karsten Hopp |
ae61a4 |
WindowDestructor(WindowObject *self)
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
+ PyObject_GC_UnTrack((void *)(self));
|
|
Karsten Hopp |
ae61a4 |
if (self->win && self->win != INVALID_WINDOW_VALUE)
|
|
Karsten Hopp |
ae61a4 |
WIN_PYTHON_REF(self->win) = NULL;
|
|
Karsten Hopp |
ae61a4 |
+ Py_XDECREF(((PyObject *)(self->tabObject)));
|
|
Karsten Hopp |
ae61a4 |
+ PyObject_GC_Del((void *)(self));
|
|
Karsten Hopp |
ae61a4 |
+ }
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
! static int
|
|
Karsten Hopp |
ae61a4 |
! WindowTraverse(WindowObject *self, visitproc visit, void *arg)
|
|
Karsten Hopp |
ae61a4 |
! {
|
|
Karsten Hopp |
ae61a4 |
! Py_VISIT(((PyObject *)(self->tabObject)));
|
|
Karsten Hopp |
ae61a4 |
! return 0;
|
|
Karsten Hopp |
ae61a4 |
! }
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
! static int
|
|
Karsten Hopp |
ae61a4 |
! WindowClear(WindowObject *self)
|
|
Karsten Hopp |
ae61a4 |
! {
|
|
Karsten Hopp |
ae61a4 |
! Py_CLEAR(self->tabObject);
|
|
Karsten Hopp |
ae61a4 |
! return 0;
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
static win_T *
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 1909,1927 ****
|
|
Karsten Hopp |
ae61a4 |
else
|
|
Karsten Hopp |
ae61a4 |
return firstwin;
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
- static int
|
|
Karsten Hopp |
ae61a4 |
- WindowTraverse(WindowObject *self, visitproc visit, void *arg)
|
|
Karsten Hopp |
ae61a4 |
- {
|
|
Karsten Hopp |
ae61a4 |
- Py_VISIT(((PyObject *)(self->tabObject)));
|
|
Karsten Hopp |
ae61a4 |
- return 0;
|
|
Karsten Hopp |
ae61a4 |
- }
|
|
Karsten Hopp |
ae61a4 |
-
|
|
Karsten Hopp |
ae61a4 |
- static int
|
|
Karsten Hopp |
ae61a4 |
- WindowClear(WindowObject *self)
|
|
Karsten Hopp |
ae61a4 |
- {
|
|
Karsten Hopp |
ae61a4 |
- Py_CLEAR(self->tabObject);
|
|
Karsten Hopp |
ae61a4 |
- return 0;
|
|
Karsten Hopp |
ae61a4 |
- }
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
static PyObject *
|
|
Karsten Hopp |
ae61a4 |
WindowAttr(WindowObject *self, char *name)
|
|
Karsten Hopp |
ae61a4 |
--- 1922,1927 ----
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 2917,2923 ****
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
BufferObject *bufr;
|
|
Karsten Hopp |
ae61a4 |
RangeObject *self;
|
|
Karsten Hopp |
ae61a4 |
! self = PyObject_NEW(RangeObject, &RangeType);
|
|
Karsten Hopp |
ae61a4 |
if (self == NULL)
|
|
Karsten Hopp |
ae61a4 |
return NULL;
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
--- 2917,2923 ----
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
BufferObject *bufr;
|
|
Karsten Hopp |
ae61a4 |
RangeObject *self;
|
|
Karsten Hopp |
ae61a4 |
! self = PyObject_GC_New(RangeObject, &RangeType);
|
|
Karsten Hopp |
ae61a4 |
if (self == NULL)
|
|
Karsten Hopp |
ae61a4 |
return NULL;
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 2939,2946 ****
|
|
Karsten Hopp |
ae61a4 |
static void
|
|
Karsten Hopp |
ae61a4 |
RangeDestructor(RangeObject *self)
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
Py_XDECREF(self->buf);
|
|
Karsten Hopp |
ae61a4 |
! DESTRUCTOR_FINISH(self);
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
static PyInt
|
|
Karsten Hopp |
ae61a4 |
--- 2939,2961 ----
|
|
Karsten Hopp |
ae61a4 |
static void
|
|
Karsten Hopp |
ae61a4 |
RangeDestructor(RangeObject *self)
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
+ PyObject_GC_UnTrack((void *)(self));
|
|
Karsten Hopp |
ae61a4 |
Py_XDECREF(self->buf);
|
|
Karsten Hopp |
ae61a4 |
! PyObject_GC_Del((void *)(self));
|
|
Karsten Hopp |
ae61a4 |
! }
|
|
Karsten Hopp |
ae61a4 |
!
|
|
Karsten Hopp |
ae61a4 |
! static int
|
|
Karsten Hopp |
ae61a4 |
! RangeTraverse(RangeObject *self, visitproc visit, void *arg)
|
|
Karsten Hopp |
ae61a4 |
! {
|
|
Karsten Hopp |
ae61a4 |
! Py_VISIT(((PyObject *)(self->buf)));
|
|
Karsten Hopp |
ae61a4 |
! return 0;
|
|
Karsten Hopp |
ae61a4 |
! }
|
|
Karsten Hopp |
ae61a4 |
!
|
|
Karsten Hopp |
ae61a4 |
! static int
|
|
Karsten Hopp |
ae61a4 |
! RangeClear(RangeObject *self)
|
|
Karsten Hopp |
ae61a4 |
! {
|
|
Karsten Hopp |
ae61a4 |
! Py_CLEAR(self->buf);
|
|
Karsten Hopp |
ae61a4 |
! return 0;
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
static PyInt
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 3267,3280 ****
|
|
Karsten Hopp |
ae61a4 |
static int
|
|
Karsten Hopp |
ae61a4 |
BufMapIterTraverse(PyObject *buffer, visitproc visit, void *arg)
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
! Py_VISIT(buffer);
|
|
Karsten Hopp |
ae61a4 |
return 0;
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
static int
|
|
Karsten Hopp |
ae61a4 |
BufMapIterClear(PyObject **buffer)
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
! Py_CLEAR(*buffer);
|
|
Karsten Hopp |
ae61a4 |
return 0;
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
--- 3282,3297 ----
|
|
Karsten Hopp |
ae61a4 |
static int
|
|
Karsten Hopp |
ae61a4 |
BufMapIterTraverse(PyObject *buffer, visitproc visit, void *arg)
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
! if (buffer)
|
|
Karsten Hopp |
ae61a4 |
! Py_VISIT(buffer);
|
|
Karsten Hopp |
ae61a4 |
return 0;
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
static int
|
|
Karsten Hopp |
ae61a4 |
BufMapIterClear(PyObject **buffer)
|
|
Karsten Hopp |
ae61a4 |
{
|
|
Karsten Hopp |
ae61a4 |
! if (*buffer)
|
|
Karsten Hopp |
ae61a4 |
! Py_CLEAR(*buffer);
|
|
Karsten Hopp |
ae61a4 |
return 0;
|
|
Karsten Hopp |
ae61a4 |
}
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 4144,4149 ****
|
|
Karsten Hopp |
ae61a4 |
--- 4161,4168 ----
|
|
Karsten Hopp |
ae61a4 |
RangeType.tp_flags = Py_TPFLAGS_DEFAULT;
|
|
Karsten Hopp |
ae61a4 |
RangeType.tp_doc = "vim Range object";
|
|
Karsten Hopp |
ae61a4 |
RangeType.tp_methods = RangeMethods;
|
|
Karsten Hopp |
ae61a4 |
+ RangeType.tp_traverse = (traverseproc)RangeTraverse;
|
|
Karsten Hopp |
ae61a4 |
+ RangeType.tp_clear = (inquiry)RangeClear;
|
|
Karsten Hopp |
ae61a4 |
#if PY_MAJOR_VERSION >= 3
|
|
Karsten Hopp |
ae61a4 |
RangeType.tp_getattro = (getattrofunc)RangeGetattro;
|
|
Karsten Hopp |
ae61a4 |
RangeType.tp_alloc = call_PyType_GenericAlloc;
|
|
Karsten Hopp |
ae61a4 |
*** ../vim-7.3.997/src/if_python3.c 2013-05-21 19:10:56.000000000 +0200
|
|
Karsten Hopp |
ae61a4 |
--- src/if_python3.c 2013-05-21 20:44:44.000000000 +0200
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 213,218 ****
|
|
Karsten Hopp |
ae61a4 |
--- 213,221 ----
|
|
Karsten Hopp |
ae61a4 |
# define PyObject_Malloc py3_PyObject_Malloc
|
|
Karsten Hopp |
ae61a4 |
# define PyObject_Free py3_PyObject_Free
|
|
Karsten Hopp |
ae61a4 |
# endif
|
|
Karsten Hopp |
ae61a4 |
+ # define _PyObject_GC_New py3__PyObject_GC_New
|
|
Karsten Hopp |
ae61a4 |
+ # define PyObject_GC_Del py3_PyObject_GC_Del
|
|
Karsten Hopp |
ae61a4 |
+ # define PyObject_GC_UnTrack py3_PyObject_GC_UnTrack
|
|
Karsten Hopp |
ae61a4 |
# define PyType_GenericAlloc py3_PyType_GenericAlloc
|
|
Karsten Hopp |
ae61a4 |
# define PyType_GenericNew py3_PyType_GenericNew
|
|
Karsten Hopp |
ae61a4 |
# define PyModule_Create2 py3_PyModule_Create2
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 334,339 ****
|
|
Karsten Hopp |
ae61a4 |
--- 337,345 ----
|
|
Karsten Hopp |
ae61a4 |
static void (*py3_PyObject_Free)(void*);
|
|
Karsten Hopp |
ae61a4 |
static void* (*py3_PyObject_Malloc)(size_t);
|
|
Karsten Hopp |
ae61a4 |
# endif
|
|
Karsten Hopp |
ae61a4 |
+ static PyObject*(*py3__PyObject_GC_New)(PyTypeObject *);
|
|
Karsten Hopp |
ae61a4 |
+ static void(*py3_PyObject_GC_Del)(void *);
|
|
Karsten Hopp |
ae61a4 |
+ static void(*py3_PyObject_GC_UnTrack)(void *);
|
|
Karsten Hopp |
ae61a4 |
static int (*py3_PyType_IsSubtype)(PyTypeObject *, PyTypeObject *);
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
static HINSTANCE hinstPy3 = 0; /* Instance of python.dll */
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 463,468 ****
|
|
Karsten Hopp |
ae61a4 |
--- 469,477 ----
|
|
Karsten Hopp |
ae61a4 |
{"PyObject_Malloc", (PYTHON_PROC*)&py3_PyObject_Malloc},
|
|
Karsten Hopp |
ae61a4 |
{"PyObject_Free", (PYTHON_PROC*)&py3_PyObject_Free},
|
|
Karsten Hopp |
ae61a4 |
# endif
|
|
Karsten Hopp |
ae61a4 |
+ {"_PyObject_GC_New", (PYTHON_PROC*)&py3__PyObject_GC_New},
|
|
Karsten Hopp |
ae61a4 |
+ {"PyObject_GC_Del", (PYTHON_PROC*)&py3_PyObject_GC_Del},
|
|
Karsten Hopp |
ae61a4 |
+ {"PyObject_GC_UnTrack", (PYTHON_PROC*)&py3_PyObject_GC_UnTrack},
|
|
Karsten Hopp |
ae61a4 |
{"PyType_IsSubtype", (PYTHON_PROC*)&py3_PyType_IsSubtype},
|
|
Karsten Hopp |
ae61a4 |
{"PyCapsule_New", (PYTHON_PROC*)&py3_PyCapsule_New},
|
|
Karsten Hopp |
ae61a4 |
{"PyCapsule_GetPointer", (PYTHON_PROC*)&py3_PyCapsule_GetPointer},
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 638,644 ****
|
|
Karsten Hopp |
ae61a4 |
if (bytes != NULL) \
|
|
Karsten Hopp |
ae61a4 |
Py_XDECREF(bytes);
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
! #define DESTRUCTOR_FINISH(self) Py_TYPE(self)->tp_free((PyObject*)self);
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
#define WIN_PYTHON_REF(win) win->w_python3_ref
|
|
Karsten Hopp |
ae61a4 |
#define BUF_PYTHON_REF(buf) buf->b_python3_ref
|
|
Karsten Hopp |
ae61a4 |
--- 647,653 ----
|
|
Karsten Hopp |
ae61a4 |
if (bytes != NULL) \
|
|
Karsten Hopp |
ae61a4 |
Py_XDECREF(bytes);
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
! #define DESTRUCTOR_FINISH(self) Py_TYPE(self)->tp_free((PyObject*)self)
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
#define WIN_PYTHON_REF(win) win->w_python3_ref
|
|
Karsten Hopp |
ae61a4 |
#define BUF_PYTHON_REF(buf) buf->b_python3_ref
|
|
Karsten Hopp |
ae61a4 |
*** ../vim-7.3.997/src/if_python.c 2013-05-21 19:10:56.000000000 +0200
|
|
Karsten Hopp |
ae61a4 |
--- src/if_python.c 2013-05-21 20:44:44.000000000 +0200
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 224,229 ****
|
|
Karsten Hopp |
ae61a4 |
--- 224,232 ----
|
|
Karsten Hopp |
ae61a4 |
# define Py_Finalize dll_Py_Finalize
|
|
Karsten Hopp |
ae61a4 |
# define Py_IsInitialized dll_Py_IsInitialized
|
|
Karsten Hopp |
ae61a4 |
# define _PyObject_New dll__PyObject_New
|
|
Karsten Hopp |
ae61a4 |
+ # define _PyObject_GC_New dll__PyObject_GC_New
|
|
Karsten Hopp |
ae61a4 |
+ # define PyObject_GC_Del dll_PyObject_GC_Del
|
|
Karsten Hopp |
ae61a4 |
+ # define PyObject_GC_UnTrack dll_PyObject_GC_UnTrack
|
|
Karsten Hopp |
ae61a4 |
# if defined(PY_VERSION_HEX) && PY_VERSION_HEX >= 0x02070000
|
|
Karsten Hopp |
ae61a4 |
# define _PyObject_NextNotImplemented (*dll__PyObject_NextNotImplemented)
|
|
Karsten Hopp |
ae61a4 |
# endif
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 331,336 ****
|
|
Karsten Hopp |
ae61a4 |
--- 334,342 ----
|
|
Karsten Hopp |
ae61a4 |
static void(*dll_Py_Finalize)(void);
|
|
Karsten Hopp |
ae61a4 |
static int(*dll_Py_IsInitialized)(void);
|
|
Karsten Hopp |
ae61a4 |
static PyObject*(*dll__PyObject_New)(PyTypeObject *, PyObject *);
|
|
Karsten Hopp |
ae61a4 |
+ static PyObject*(*dll__PyObject_GC_New)(PyTypeObject *);
|
|
Karsten Hopp |
ae61a4 |
+ static void(*dll_PyObject_GC_Del)(void *);
|
|
Karsten Hopp |
ae61a4 |
+ static void(*dll_PyObject_GC_UnTrack)(void *);
|
|
Karsten Hopp |
ae61a4 |
static PyObject*(*dll__PyObject_Init)(PyObject *, PyTypeObject *);
|
|
Karsten Hopp |
ae61a4 |
static PyObject* (*dll_PyObject_GetIter)(PyObject *);
|
|
Karsten Hopp |
ae61a4 |
static int (*dll_PyObject_IsTrue)(PyObject *);
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 474,479 ****
|
|
Karsten Hopp |
ae61a4 |
--- 480,488 ----
|
|
Karsten Hopp |
ae61a4 |
{"Py_Finalize", (PYTHON_PROC*)&dll_Py_Finalize},
|
|
Karsten Hopp |
ae61a4 |
{"Py_IsInitialized", (PYTHON_PROC*)&dll_Py_IsInitialized},
|
|
Karsten Hopp |
ae61a4 |
{"_PyObject_New", (PYTHON_PROC*)&dll__PyObject_New},
|
|
Karsten Hopp |
ae61a4 |
+ {"_PyObject_GC_New", (PYTHON_PROC*)&dll__PyObject_GC_New},
|
|
Karsten Hopp |
ae61a4 |
+ {"PyObject_GC_Del", (PYTHON_PROC*)&dll_PyObject_GC_Del},
|
|
Karsten Hopp |
ae61a4 |
+ {"PyObject_GC_UnTrack", (PYTHON_PROC*)&dll_PyObject_GC_UnTrack},
|
|
Karsten Hopp |
ae61a4 |
{"PyObject_Init", (PYTHON_PROC*)&dll__PyObject_Init},
|
|
Karsten Hopp |
ae61a4 |
{"PyObject_GetIter", (PYTHON_PROC*)&dll_PyObject_GetIter},
|
|
Karsten Hopp |
ae61a4 |
{"PyObject_IsTrue", (PYTHON_PROC*)&dll_PyObject_IsTrue},
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 632,638 ****
|
|
Karsten Hopp |
ae61a4 |
#define DICTKEY_UNREF
|
|
Karsten Hopp |
ae61a4 |
#define DICTKEY_DECL
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
! #define DESTRUCTOR_FINISH(self) Py_DECREF(self);
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
#define WIN_PYTHON_REF(win) win->w_python_ref
|
|
Karsten Hopp |
ae61a4 |
#define BUF_PYTHON_REF(buf) buf->b_python_ref
|
|
Karsten Hopp |
ae61a4 |
--- 641,647 ----
|
|
Karsten Hopp |
ae61a4 |
#define DICTKEY_UNREF
|
|
Karsten Hopp |
ae61a4 |
#define DICTKEY_DECL
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
! #define DESTRUCTOR_FINISH(self) Py_TYPE(self)->tp_free((PyObject*)self);
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
#define WIN_PYTHON_REF(win) win->w_python_ref
|
|
Karsten Hopp |
ae61a4 |
#define BUF_PYTHON_REF(buf) buf->b_python_ref
|
|
Karsten Hopp |
ae61a4 |
*** ../vim-7.3.997/src/version.c 2013-05-21 20:40:35.000000000 +0200
|
|
Karsten Hopp |
ae61a4 |
--- src/version.c 2013-05-21 20:43:56.000000000 +0200
|
|
Karsten Hopp |
ae61a4 |
***************
|
|
Karsten Hopp |
ae61a4 |
*** 730,731 ****
|
|
Karsten Hopp |
ae61a4 |
--- 730,733 ----
|
|
Karsten Hopp |
ae61a4 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
ae61a4 |
+ /**/
|
|
Karsten Hopp |
ae61a4 |
+ 998,
|
|
Karsten Hopp |
ae61a4 |
/**/
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
--
|
|
Karsten Hopp |
ae61a4 |
The problem with political jokes is that they get elected.
|
|
Karsten Hopp |
ae61a4 |
|
|
Karsten Hopp |
ae61a4 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
ae61a4 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
ae61a4 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
ae61a4 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|