|
Karsten Hopp |
60c4f8 |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
60c4f8 |
Subject: Patch 7.3.1049
|
|
Karsten Hopp |
60c4f8 |
Fcc: outbox
|
|
Karsten Hopp |
60c4f8 |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
60c4f8 |
Mime-Version: 1.0
|
|
Karsten Hopp |
60c4f8 |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
60c4f8 |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
60c4f8 |
------------
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
Patch 7.3.1049
|
|
Karsten Hopp |
60c4f8 |
Problem: Python: no consistent naming
|
|
Karsten Hopp |
60c4f8 |
Solution: Python patch 10: Rename DICTKEY_GET_NOTEMPTY to DICTKEY_GET. (ZyX)
|
|
Karsten Hopp |
60c4f8 |
Files: src/if_py_both.h
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
*** ../vim-7.3.1048/src/if_py_both.h 2013-05-29 22:39:46.000000000 +0200
|
|
Karsten Hopp |
60c4f8 |
--- src/if_py_both.h 2013-05-29 22:42:26.000000000 +0200
|
|
Karsten Hopp |
60c4f8 |
***************
|
|
Karsten Hopp |
60c4f8 |
*** 34,40 ****
|
|
Karsten Hopp |
60c4f8 |
PyObject *dictkey_todecref;
|
|
Karsten Hopp |
60c4f8 |
#define DICTKEY_GET(err) \
|
|
Karsten Hopp |
60c4f8 |
if (!(key = StringToChars(keyObject, &dictkey_todecref))) \
|
|
Karsten Hopp |
60c4f8 |
! return err;
|
|
Karsten Hopp |
60c4f8 |
#define DICTKEY_UNREF \
|
|
Karsten Hopp |
60c4f8 |
Py_XDECREF(dictkey_todecref);
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
--- 34,45 ----
|
|
Karsten Hopp |
60c4f8 |
PyObject *dictkey_todecref;
|
|
Karsten Hopp |
60c4f8 |
#define DICTKEY_GET(err) \
|
|
Karsten Hopp |
60c4f8 |
if (!(key = StringToChars(keyObject, &dictkey_todecref))) \
|
|
Karsten Hopp |
60c4f8 |
! return err; \
|
|
Karsten Hopp |
60c4f8 |
! if (*key == NUL) \
|
|
Karsten Hopp |
60c4f8 |
! { \
|
|
Karsten Hopp |
60c4f8 |
! PyErr_SetString(PyExc_ValueError, _("empty keys are not allowed")); \
|
|
Karsten Hopp |
60c4f8 |
! return err; \
|
|
Karsten Hopp |
60c4f8 |
! }
|
|
Karsten Hopp |
60c4f8 |
#define DICTKEY_UNREF \
|
|
Karsten Hopp |
60c4f8 |
Py_XDECREF(dictkey_todecref);
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
***************
|
|
Karsten Hopp |
60c4f8 |
*** 851,864 ****
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
static PyTypeObject DictionaryType;
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
- #define DICTKEY_GET_NOTEMPTY(err) \
|
|
Karsten Hopp |
60c4f8 |
- DICTKEY_GET(err) \
|
|
Karsten Hopp |
60c4f8 |
- if (*key == NUL) \
|
|
Karsten Hopp |
60c4f8 |
- { \
|
|
Karsten Hopp |
60c4f8 |
- PyErr_SetString(PyExc_ValueError, _("empty keys are not allowed")); \
|
|
Karsten Hopp |
60c4f8 |
- return err; \
|
|
Karsten Hopp |
60c4f8 |
- }
|
|
Karsten Hopp |
60c4f8 |
-
|
|
Karsten Hopp |
60c4f8 |
typedef struct
|
|
Karsten Hopp |
60c4f8 |
{
|
|
Karsten Hopp |
60c4f8 |
PyObject_HEAD
|
|
Karsten Hopp |
60c4f8 |
--- 856,861 ----
|
|
Karsten Hopp |
60c4f8 |
***************
|
|
Karsten Hopp |
60c4f8 |
*** 950,956 ****
|
|
Karsten Hopp |
60c4f8 |
dictitem_T *di;
|
|
Karsten Hopp |
60c4f8 |
DICTKEY_DECL
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
! DICTKEY_GET_NOTEMPTY(NULL)
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
di = dict_find(self->dict, key, -1);
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
--- 947,953 ----
|
|
Karsten Hopp |
60c4f8 |
dictitem_T *di;
|
|
Karsten Hopp |
60c4f8 |
DICTKEY_DECL
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
! DICTKEY_GET(NULL)
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
di = dict_find(self->dict, key, -1);
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
***************
|
|
Karsten Hopp |
60c4f8 |
*** 980,986 ****
|
|
Karsten Hopp |
60c4f8 |
return -1;
|
|
Karsten Hopp |
60c4f8 |
}
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
! DICTKEY_GET_NOTEMPTY(-1)
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
di = dict_find(dict, key, -1);
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
--- 977,983 ----
|
|
Karsten Hopp |
60c4f8 |
return -1;
|
|
Karsten Hopp |
60c4f8 |
}
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
! DICTKEY_GET(-1)
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
di = dict_find(dict, key, -1);
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
***************
|
|
Karsten Hopp |
60c4f8 |
*** 1653,1659 ****
|
|
Karsten Hopp |
60c4f8 |
if (self->Check(self->from))
|
|
Karsten Hopp |
60c4f8 |
return NULL;
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
! DICTKEY_GET_NOTEMPTY(NULL)
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
flags = get_option_value_strict(key, &numval, &stringval,
|
|
Karsten Hopp |
60c4f8 |
self->opt_type, self->from);
|
|
Karsten Hopp |
60c4f8 |
--- 1650,1656 ----
|
|
Karsten Hopp |
60c4f8 |
if (self->Check(self->from))
|
|
Karsten Hopp |
60c4f8 |
return NULL;
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
! DICTKEY_GET(NULL)
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
flags = get_option_value_strict(key, &numval, &stringval,
|
|
Karsten Hopp |
60c4f8 |
self->opt_type, self->from);
|
|
Karsten Hopp |
60c4f8 |
***************
|
|
Karsten Hopp |
60c4f8 |
*** 1792,1798 ****
|
|
Karsten Hopp |
60c4f8 |
if (self->Check(self->from))
|
|
Karsten Hopp |
60c4f8 |
return -1;
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
! DICTKEY_GET_NOTEMPTY(-1)
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
flags = get_option_value_strict(key, NULL, NULL,
|
|
Karsten Hopp |
60c4f8 |
self->opt_type, self->from);
|
|
Karsten Hopp |
60c4f8 |
--- 1789,1795 ----
|
|
Karsten Hopp |
60c4f8 |
if (self->Check(self->from))
|
|
Karsten Hopp |
60c4f8 |
return -1;
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
! DICTKEY_GET(-1)
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
flags = get_option_value_strict(key, NULL, NULL,
|
|
Karsten Hopp |
60c4f8 |
self->opt_type, self->from);
|
|
Karsten Hopp |
60c4f8 |
***************
|
|
Karsten Hopp |
60c4f8 |
*** 4037,4043 ****
|
|
Karsten Hopp |
60c4f8 |
if (valObject == NULL)
|
|
Karsten Hopp |
60c4f8 |
return -1;
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
! DICTKEY_GET_NOTEMPTY(-1)
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
di = dictitem_alloc(key);
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
--- 4034,4040 ----
|
|
Karsten Hopp |
60c4f8 |
if (valObject == NULL)
|
|
Karsten Hopp |
60c4f8 |
return -1;
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
! DICTKEY_GET(-1)
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
di = dictitem_alloc(key);
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
***************
|
|
Karsten Hopp |
60c4f8 |
*** 4111,4117 ****
|
|
Karsten Hopp |
60c4f8 |
return -1;
|
|
Karsten Hopp |
60c4f8 |
}
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
! DICTKEY_GET_NOTEMPTY(-1)
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
valObject = PyTuple_GetItem(litem, 1);
|
|
Karsten Hopp |
60c4f8 |
if (valObject == NULL)
|
|
Karsten Hopp |
60c4f8 |
--- 4108,4114 ----
|
|
Karsten Hopp |
60c4f8 |
return -1;
|
|
Karsten Hopp |
60c4f8 |
}
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
! DICTKEY_GET(-1)
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
valObject = PyTuple_GetItem(litem, 1);
|
|
Karsten Hopp |
60c4f8 |
if (valObject == NULL)
|
|
Karsten Hopp |
60c4f8 |
*** ../vim-7.3.1048/src/version.c 2013-05-29 22:39:46.000000000 +0200
|
|
Karsten Hopp |
60c4f8 |
--- src/version.c 2013-05-29 22:42:23.000000000 +0200
|
|
Karsten Hopp |
60c4f8 |
***************
|
|
Karsten Hopp |
60c4f8 |
*** 730,731 ****
|
|
Karsten Hopp |
60c4f8 |
--- 730,733 ----
|
|
Karsten Hopp |
60c4f8 |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
60c4f8 |
+ /**/
|
|
Karsten Hopp |
60c4f8 |
+ 1049,
|
|
Karsten Hopp |
60c4f8 |
/**/
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
--
|
|
Karsten Hopp |
60c4f8 |
hundred-and-one symptoms of being an internet addict:
|
|
Karsten Hopp |
60c4f8 |
24. You realize there is not a sound in the house and you have no idea where
|
|
Karsten Hopp |
60c4f8 |
your children are.
|
|
Karsten Hopp |
60c4f8 |
|
|
Karsten Hopp |
60c4f8 |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
60c4f8 |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
60c4f8 |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
60c4f8 |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|