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
Gwenaël Samain
cython
Commits
c95ca9f2
Commit
c95ca9f2
authored
Aug 01, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove duplicated "IsLittleEndian" helper (already exists in ModuleSetupCode.c now)
parent
7d70fde4
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
10 deletions
+6
-10
Cython/Compiler/Buffer.py
Cython/Compiler/Buffer.py
+2
-1
Cython/Utility/Buffer.c
Cython/Utility/Buffer.c
+2
-7
Cython/Utility/ModuleSetupCode.c
Cython/Utility/ModuleSetupCode.c
+2
-2
No files found.
Cython/Compiler/Buffer.py
View file @
c95ca9f2
...
@@ -738,7 +738,8 @@ buffer_structs_code = load_buffer_utility(
...
@@ -738,7 +738,8 @@ buffer_structs_code = load_buffer_utility(
"BufferFormatStructs"
,
proto_block
=
'utility_code_proto_before_types'
)
"BufferFormatStructs"
,
proto_block
=
'utility_code_proto_before_types'
)
acquire_utility_code
=
load_buffer_utility
(
"BufferFormatCheck"
,
acquire_utility_code
=
load_buffer_utility
(
"BufferFormatCheck"
,
context
=
context
,
context
=
context
,
requires
=
[
buffer_structs_code
])
requires
=
[
buffer_structs_code
,
UtilityCode
.
load_cached
(
"IsLittleEndian"
,
"ModuleSetupCode.c"
)])
# See utility code BufferFormatFromTypeInfo
# See utility code BufferFormatFromTypeInfo
_typeinfo_to_format_code
=
load_buffer_utility
(
"TypeInfoToFormat"
,
context
=
{},
_typeinfo_to_format_code
=
load_buffer_utility
(
"TypeInfoToFormat"
,
context
=
{},
...
...
Cython/Utility/Buffer.c
View file @
c95ca9f2
...
@@ -166,11 +166,6 @@ static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
...
@@ -166,11 +166,6 @@ static void __Pyx_BufFmt_Init(__Pyx_BufFmt_Context* ctx,
/////////////// BufferFormatCheck ///////////////
/////////////// BufferFormatCheck ///////////////
static
CYTHON_INLINE
int
__Pyx_IsLittleEndian
(
void
)
{
unsigned
int
n
=
1
;
return
*
(
unsigned
char
*
)(
&
n
)
!=
0
;
}
static
void
__Pyx_BufFmt_Init
(
__Pyx_BufFmt_Context
*
ctx
,
static
void
__Pyx_BufFmt_Init
(
__Pyx_BufFmt_Context
*
ctx
,
__Pyx_BufFmt_StackElem
*
stack
,
__Pyx_BufFmt_StackElem
*
stack
,
...
@@ -611,7 +606,7 @@ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const cha
...
@@ -611,7 +606,7 @@ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const cha
++
ts
;
++
ts
;
break
;
break
;
case
'<'
:
case
'<'
:
if
(
!
__Pyx_Is
Little
Endian
())
{
if
(
!
__Pyx_Is
_Little_
Endian
())
{
PyErr_SetString
(
PyExc_ValueError
,
"Little-endian buffer not supported on big-endian compiler"
);
PyErr_SetString
(
PyExc_ValueError
,
"Little-endian buffer not supported on big-endian compiler"
);
return
NULL
;
return
NULL
;
}
}
...
@@ -620,7 +615,7 @@ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const cha
...
@@ -620,7 +615,7 @@ static const char* __Pyx_BufFmt_CheckString(__Pyx_BufFmt_Context* ctx, const cha
break
;
break
;
case
'>'
:
case
'>'
:
case
'!'
:
case
'!'
:
if
(
__Pyx_Is
Little
Endian
())
{
if
(
__Pyx_Is
_Little_
Endian
())
{
PyErr_SetString
(
PyExc_ValueError
,
"Big-endian buffer not supported on little-endian compiler"
);
PyErr_SetString
(
PyExc_ValueError
,
"Big-endian buffer not supported on little-endian compiler"
);
return
NULL
;
return
NULL
;
}
}
...
...
Cython/Utility/ModuleSetupCode.c
View file @
c95ca9f2
...
@@ -720,11 +720,11 @@ static int __Pyx_check_binary_version(void) {
...
@@ -720,11 +720,11 @@ static int __Pyx_check_binary_version(void) {
/////////////// IsLittleEndian.proto ///////////////
/////////////// IsLittleEndian.proto ///////////////
static
int
__Pyx_Is_Little_Endian
(
void
);
static
CYTHON_INLINE
int
__Pyx_Is_Little_Endian
(
void
);
/////////////// IsLittleEndian ///////////////
/////////////// IsLittleEndian ///////////////
static
int
__Pyx_Is_Little_Endian
(
void
)
static
CYTHON_INLINE
int
__Pyx_Is_Little_Endian
(
void
)
{
{
union
{
union
{
uint32_t
u32
;
uint32_t
u32
;
...
...
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