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
0a3cc077
Commit
0a3cc077
authored
Jan 05, 2021
by
da-woods
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Keep __Pyx_NewRef in a macro
parent
337bf7f3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
Cython/Utility/TypeConversion.c
Cython/Utility/TypeConversion.c
+5
-5
No files found.
Cython/Utility/TypeConversion.c
View file @
0a3cc077
...
...
@@ -466,16 +466,16 @@ static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t ival) {
/////////////// pynumber_float.proto ///////////////
static
CYTHON_INLINE
PyObject
*
__Pyx_PyNumber_Float
(
PyObject
*
obj
);
/* proto */
static
CYTHON_INLINE
PyObject
*
__Pyx__PyNumber_Float
(
PyObject
*
obj
);
/* proto */
#define __Pyx_PyNumber_Float(x) (PyFloat_CheckExact(x) ? __Pyx_NewRef(x) : __Pyx__PyNumber_Float(x))
/////////////// pynumber_float ///////////////
//@requires: Optimize.c::pybytes_as_double
//@requires: Optimize.c::pyunicode_as_double
static
CYTHON_INLINE
PyObject
*
__Pyx_PyNumber_Float
(
PyObject
*
obj
)
{
if
(
PyFloat_CheckExact
(
obj
))
{
return
__Pyx_NewRef
(
obj
);
}
else
if
(
PyUnicode_CheckExact
(
obj
))
{
static
CYTHON_INLINE
PyObject
*
__Pyx__PyNumber_Float
(
PyObject
*
obj
)
{
// obj is PyFloat is handled in the calling macro
if
(
PyUnicode_CheckExact
(
obj
))
{
return
PyFloat_FromDouble
(
__Pyx_PyUnicode_AsDouble
(
obj
));
}
else
if
(
PyBytes_CheckExact
(
obj
))
{
return
PyFloat_FromDouble
(
__Pyx_PyBytes_AsDouble
(
obj
));
...
...
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