Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
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
cython
Commits
be851994
Commit
be851994
authored
Feb 15, 2012
by
Mark Florisson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use Py_intptr_t to check alignment
parent
a03a562d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
20 deletions
+2
-20
Cython/Utility/MemoryView_C.c
Cython/Utility/MemoryView_C.c
+2
-20
No files found.
Cython/Utility/MemoryView_C.c
View file @
be851994
...
...
@@ -81,26 +81,8 @@ typedef volatile __pyx_atomic_int_type __pyx_atomic_int;
////////// Atomics //////////
#if CYTHON_ATOMICS
#define __pyx_check_unaligned(type, pointer) \
(((type) pointer) & (sizeof(pointer) - 1))
static
CYTHON_INLINE
int
__pyx_atomic_unaligned
(
__pyx_atomic_int
*
p
)
{
/* uintptr_t is optional in C99, try other stuff */
if
(
sizeof
(
unsigned
long
)
>=
sizeof
(
p
))
return
__pyx_check_unaligned
(
unsigned
long
,
p
);
else
if
(
sizeof
(
size_t
)
>=
sizeof
(
p
))
return
__pyx_check_unaligned
(
size_t
,
p
);
#if __STDC_VERSION__ >= 199901L
if
(
sizeof
(
unsigned
long
long
)
>=
sizeof
(
p
))
return
__pyx_check_unaligned
(
unsigned
long
long
,
p
);
#endif
return
1
;
}
#define __pyx_atomic_unaligned(pointer) \
(((Py_intptr_t) pointer) & (sizeof(pointer) - 1))
static
CYTHON_INLINE
__pyx_atomic_int_type
__pyx_atomic_incr_maybealigned
(
__pyx_atomic_int
*
value
,
PyThread_type_lock
lock
)
...
...
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