Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Acquisition
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Acquisition
Commits
ac6098b9
Commit
ac6098b9
authored
Aug 02, 2009
by
Tres Seaver
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed 64-bit compatibility issues for Python 2.5.x / 2.6.x.
o See
http://www.python.org/dev/peps/pep-0353/
for details.
parent
e309ea04
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
16 deletions
+31
-16
CHANGES.txt
CHANGES.txt
+7
-3
src/Acquisition/_Acquisition.c
src/Acquisition/_Acquisition.c
+24
-13
No files found.
CHANGES.txt
View file @
ac6098b9
Changelog
=========
2.12.2
- unreleased
2.12.2
(unreleased)
-------------------
- Fixed 64-bit compatibility issues for Python 2.5.x / 2.6.x. See
http://www.python.org/dev/peps/pep-0353/ for details.
2.12.1 - 2009-04-15
2.12.1 (2009-04-15)
-------------------
- Update for iteration proxying: The proxy for `__iter__` must not rely on the
object to have an `__iter__` itself, but also support fall-back iteration via
`__getitem__` (this fixes https://bugs.launchpad.net/zope2/+bug/360761).
2.12 - 2009-01-25
2.12 (2009-01-25)
-----------------
- Release as separate package.
src/Acquisition/_Acquisition.c
View file @
ac6098b9
...
...
@@ -31,6 +31,17 @@ PyVar_Assign(PyObject **v, PyObject *e)
#define UNLESS_ASSIGN(V,E) ASSIGN(V,E); UNLESS(V)
#define OBJECT(O) ((PyObject*)(O))
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef
int
Py_ssize_t
;
typedef
Py_ssize_t
(
*
lenfunc
)(
PyObject
*
);
typedef
PyObject
*
(
*
ssizeargfunc
)(
PyObject
*
,
Py_ssize_t
);
typedef
PyObject
*
(
*
ssizessizeargfunc
)(
PyObject
*
,
Py_ssize_t
,
Py_ssize_t
);
typedef
int
(
*
ssizeobjargproc
)(
PyObject
*
,
Py_ssize_t
,
PyObject
*
);
typedef
int
(
*
ssizessizeobjargproc
)(
PyObject
*
,
Py_ssize_t
,
Py_ssize_t
,
PyObject
*
);
#define PY_SSIZE_T_MAX INT_MAX
#define PY_SSIZE_T_MIN INT_MIN
#endif
static
PyObject
*
py__add__
,
*
py__sub__
,
*
py__mul__
,
*
py__div__
,
*
py__mod__
,
*
py__pow__
,
*
py__divmod__
,
*
py__lshift__
,
*
py__rshift__
,
*
py__and__
,
*
py__or__
,
*
py__xor__
,
*
py__coerce__
,
*
py__neg__
,
...
...
@@ -841,7 +852,7 @@ Wrapper_call(Wrapper *self, PyObject *args, PyObject *kw)
/* Code to handle accessing Wrapper objects as sequence objects */
static
in
t
static
Py_ssize_
t
Wrapper_length
(
Wrapper
*
self
)
{
long
l
;
...
...
@@ -861,26 +872,26 @@ Wrapper_add(Wrapper *self, PyObject *bb)
}
static
PyObject
*
Wrapper_mul
(
Wrapper
*
self
,
in
t
n
)
Wrapper_mul
(
Wrapper
*
self
,
Py_ssize_
t
n
)
{
return
CallMethodO
(
OBJECT
(
self
),
py__mul__
,
Build
(
"(i)"
,
n
),
NULL
);
}
static
PyObject
*
Wrapper_item
(
Wrapper
*
self
,
in
t
i
)
Wrapper_item
(
Wrapper
*
self
,
Py_ssize_
t
i
)
{
return
CallMethodO
(
OBJECT
(
self
),
py__getitem__
,
Build
(
"(i)"
,
i
),
NULL
);
}
static
PyObject
*
Wrapper_slice
(
Wrapper
*
self
,
int
ilow
,
in
t
ihigh
)
Wrapper_slice
(
Wrapper
*
self
,
Py_ssize_t
ilow
,
Py_ssize_
t
ihigh
)
{
return
CallMethodO
(
OBJECT
(
self
),
py__getslice__
,
Build
(
"(ii)"
,
ilow
,
ihigh
),
NULL
);
}
static
int
Wrapper_ass_item
(
Wrapper
*
self
,
in
t
i
,
PyObject
*
v
)
Wrapper_ass_item
(
Wrapper
*
self
,
Py_ssize_
t
i
,
PyObject
*
v
)
{
if
(
v
)
{
...
...
@@ -899,7 +910,7 @@ Wrapper_ass_item(Wrapper *self, int i, PyObject *v)
}
static
int
Wrapper_ass_slice
(
Wrapper
*
self
,
int
ilow
,
int
ihigh
,
PyObject
*
v
)
Wrapper_ass_slice
(
Wrapper
*
self
,
Py_ssize_t
ilow
,
Py_ssize_t
ihigh
,
PyObject
*
v
)
{
if
(
v
)
{
...
...
@@ -936,13 +947,13 @@ Wrapper_iter(Wrapper *self)
}
static
PySequenceMethods
Wrapper_as_sequence
=
{
(
inquiry
)
Wrapper_length
,
/*sq_length*/
(
lenfunc
)
Wrapper_length
,
/*sq_length*/
(
binaryfunc
)
Wrapper_add
,
/*sq_concat*/
(
int
argfunc
)
Wrapper_mul
,
/*sq_repeat*/
(
int
argfunc
)
Wrapper_item
,
/*sq_item*/
(
intint
argfunc
)
Wrapper_slice
,
/*sq_slice*/
(
int
objargproc
)
Wrapper_ass_item
,
/*sq_ass_item*/
(
intint
objargproc
)
Wrapper_ass_slice
,
/*sq_ass_slice*/
(
ssize
argfunc
)
Wrapper_mul
,
/*sq_repeat*/
(
ssize
argfunc
)
Wrapper_item
,
/*sq_item*/
(
ssizessize
argfunc
)
Wrapper_slice
,
/*sq_slice*/
(
ssize
objargproc
)
Wrapper_ass_item
,
/*sq_ass_item*/
(
ssizessize
objargproc
)
Wrapper_ass_slice
,
/*sq_ass_slice*/
(
objobjproc
)
Wrapper_contains
,
/*sq_contains*/
};
...
...
@@ -976,7 +987,7 @@ Wrapper_ass_sub(Wrapper *self, PyObject *key, PyObject *v)
}
static
PyMappingMethods
Wrapper_as_mapping
=
{
(
inquiry
)
Wrapper_length
,
/*mp_length*/
(
lenfunc
)
Wrapper_length
,
/*mp_length*/
(
binaryfunc
)
Wrapper_subscript
,
/*mp_subscript*/
(
objobjargproc
)
Wrapper_ass_sub
,
/*mp_ass_subscript*/
};
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment