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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
72b9b908
Commit
72b9b908
authored
Aug 02, 2008
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove dependancy on endian.h (which is not available on all systems)
parent
744389c5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Cython/Compiler/Buffer.py
Cython/Compiler/Buffer.py
+4
-4
No files found.
Cython/Compiler/Buffer.py
View file @
72b9b908
...
@@ -29,8 +29,6 @@ class IntroduceBufferAuxiliaryVars(CythonTransform):
...
@@ -29,8 +29,6 @@ class IntroduceBufferAuxiliaryVars(CythonTransform):
self
.
max_ndim
=
0
self
.
max_ndim
=
0
result
=
super
(
IntroduceBufferAuxiliaryVars
,
self
).
__call__
(
node
)
result
=
super
(
IntroduceBufferAuxiliaryVars
,
self
).
__call__
(
node
)
if
self
.
buffers_exists
:
if
self
.
buffers_exists
:
if
"endian.h"
not
in
node
.
scope
.
include_files
:
node
.
scope
.
include_files
.
append
(
"endian.h"
)
use_py2_buffer_functions
(
node
.
scope
)
use_py2_buffer_functions
(
node
.
scope
)
use_empty_bufstruct_code
(
node
.
scope
,
self
.
max_ndim
)
use_empty_bufstruct_code
(
node
.
scope
,
self
.
max_ndim
)
node
.
scope
.
use_utility_code
(
access_utility_code
)
node
.
scope
.
use_utility_code
(
access_utility_code
)
...
@@ -656,18 +654,20 @@ static INLINE const char* __Pyx_ConsumeWhitespace(const char* ts) {
...
@@ -656,18 +654,20 @@ static INLINE const char* __Pyx_ConsumeWhitespace(const char* ts) {
}
}
static INLINE const char* __Pyx_BufferTypestringCheckEndian(const char* ts) {
static INLINE const char* __Pyx_BufferTypestringCheckEndian(const char* ts) {
int num = 1;
int little_endian = ((char*)&num)[0];
int ok = 1;
int ok = 1;
switch (*ts) {
switch (*ts) {
case '@':
case '@':
case '=':
case '=':
++ts; break;
++ts; break;
case '<':
case '<':
if (
__BYTE_ORDER == __LITTLE_ENDIAN
) ++ts;
if (
little_endian
) ++ts;
else ok = 0;
else ok = 0;
break;
break;
case '>':
case '>':
case '!':
case '!':
if (
__BYTE_ORDER == __BIG_ENDIAN
) ++ts;
if (
!little_endian
) ++ts;
else ok = 0;
else ok = 0;
break;
break;
}
}
...
...
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