[Checkins] SVN: zope.security/branches/3.4/src/zope/security/_
Merge from trunk:
Philipp von Weitershausen
philikon at philikon.de
Sun Jul 27 17:22:55 EDT 2008
Log message for revision 88834:
Merge from trunk:
------------------------------------------------------------------------
r88348 | shane | 2008-07-14 16:19:44 +0200 (Mon, 14 Jul 2008) | 2 lines
Fixed a comment and silenced a misleading warning about incompatible pointer types.
------------------------------------------------------------------------
r88349 | shane | 2008-07-14 16:20:09 +0200 (Mon, 14 Jul 2008) | 2 lines
Made compatible with Python 2.5 on 64 bit architectures. See PEP 353.
------------------------------------------------------------------------
Changed:
U zope.security/branches/3.4/src/zope/security/_proxy.c
U zope.security/branches/3.4/src/zope/security/_zope_security_checker.c
-=-
Modified: zope.security/branches/3.4/src/zope/security/_proxy.c
===================================================================
--- zope.security/branches/3.4/src/zope/security/_proxy.c 2008-07-27 21:20:44 UTC (rev 88833)
+++ zope.security/branches/3.4/src/zope/security/_proxy.c 2008-07-27 21:22:55 UTC (rev 88834)
@@ -631,7 +631,7 @@
* Sequence methods.
*/
-static int
+static Py_ssize_t
proxy_length(SecurityProxy *self)
{
if (check(self, str_check, str___len__) >= 0)
@@ -644,7 +644,7 @@
static int proxy_setitem(SecurityProxy *, PyObject *, PyObject *);
static PyObject *
-proxy_igetitem(SecurityProxy *self, int i)
+proxy_igetitem(SecurityProxy *self, Py_ssize_t i)
{
PyObject *key = PyInt_FromLong(i);
PyObject *res = NULL;
@@ -658,7 +658,7 @@
static int
-proxy_isetitem(SecurityProxy *self, int i, PyObject *value)
+proxy_isetitem(SecurityProxy *self, Py_ssize_t i, PyObject *value)
{
PyObject *key = PyInt_FromLong(i);
int res = -1;
@@ -671,7 +671,7 @@
}
static PyObject *
-proxy_slice(SecurityProxy *self, int start, int end)
+proxy_slice(SecurityProxy *self, Py_ssize_t start, Py_ssize_t end)
{
PyObject *result = NULL;
@@ -683,7 +683,7 @@
}
static int
-proxy_ass_slice(SecurityProxy *self, int i, int j, PyObject *value)
+proxy_ass_slice(SecurityProxy *self, Py_ssize_t i, Py_ssize_t j, PyObject *value)
{
if (check(self, str_check, str___setslice__) >= 0)
return PySequence_SetSlice(self->proxy.proxy_object, i, j, value);
@@ -783,19 +783,19 @@
static PySequenceMethods
proxy_as_sequence = {
- (inquiry)proxy_length, /* sq_length */
+ (lenfunc)proxy_length, /* sq_length */
0, /* sq_concat */
0, /* sq_repeat */
- (intargfunc)proxy_igetitem, /* sq_item */
- (intintargfunc)proxy_slice, /* sq_slice */
- (intobjargproc)proxy_isetitem, /* sq_ass_item */
- (intintobjargproc)proxy_ass_slice, /* sq_ass_slice */
+ (ssizeargfunc)proxy_igetitem, /* sq_item */
+ (ssizessizeargfunc)proxy_slice, /* sq_slice */
+ (ssizeobjargproc)proxy_isetitem, /* sq_ass_item */
+ (ssizessizeobjargproc)proxy_ass_slice, /* sq_ass_slice */
(objobjproc)proxy_contains, /* sq_contains */
};
static PyMappingMethods
proxy_as_mapping = {
- (inquiry)proxy_length, /* mp_length */
+ (lenfunc)proxy_length, /* mp_length */
(binaryfunc)proxy_getitem, /* mp_subscript */
(objobjargproc)proxy_setitem, /* mp_ass_subscript */
};
Modified: zope.security/branches/3.4/src/zope/security/_zope_security_checker.c
===================================================================
--- zope.security/branches/3.4/src/zope/security/_zope_security_checker.c 2008-07-27 21:20:44 UTC (rev 88833)
+++ zope.security/branches/3.4/src/zope/security/_zope_security_checker.c 2008-07-27 21:22:55 UTC (rev 88834)
@@ -106,8 +106,8 @@
/* def check(self, object, name): */
-/* Note that we have an int version gere because we will use it for
- __setitem__, as describd below */
+/* Note that we have an int version here because we will use it for
+ __setitem__, as described below */
static int
Checker_check_int(Checker *self, PyObject *object, PyObject *name)
@@ -400,7 +400,7 @@
in the same hack. */
static PyMappingMethods Checker_as_mapping = {
- /* mp_length */ (inquiry)NULL,
+ /* mp_length */ NULL,
/* mp_subscript */ (binaryfunc)Checker_proxy,
/* mp_ass_subscript */ (objobjargproc)Checker_check_int,
};
More information about the Checkins
mailing list