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
d1cf2648
Commit
d1cf2648
authored
Oct 02, 2018
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix type import enum.
parent
34bc649f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
Cython/Compiler/ModuleNode.py
Cython/Compiler/ModuleNode.py
+1
-0
Cython/Utility/ImportExport.c
Cython/Utility/ImportExport.c
+4
-7
No files found.
Cython/Compiler/ModuleNode.py
View file @
d1cf2648
...
...
@@ -276,6 +276,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
if
api_funcs
:
h_code
.
put
(
UtilityCode
.
load_as_string
(
"FunctionImport"
,
"ImportExport.c"
)[
1
])
if
api_extension_types
:
h_code
.
put
(
UtilityCode
.
load_as_string
(
"TypeImport"
,
"ImportExport.c"
)[
0
])
h_code
.
put
(
UtilityCode
.
load_as_string
(
"TypeImport"
,
"ImportExport.c"
)[
1
])
h_code
.
putln
(
""
)
h_code
.
putln
(
"static int import_%s(void) {"
%
self
.
api_name
(
env
))
...
...
Cython/Utility/ImportExport.c
View file @
d1cf2648
...
...
@@ -308,6 +308,8 @@ set_path:
/////////////// TypeImport.proto ///////////////
#ifndef __PYX_HAVE_RT_ImportType_proto
#define __PYX_HAVE_RT_ImportType_proto
enum
__Pyx_ImportType_CheckSize
{
__Pyx_ImportType_CheckSize_Error
=
0
,
...
...
@@ -315,9 +317,10 @@ enum __Pyx_ImportType_CheckSize {
__Pyx_ImportType_CheckSize_Ignore
=
2
};
static
PyTypeObject
*
__Pyx_ImportType
(
PyObject
*
module
,
const
char
*
module_name
,
const
char
*
class_name
,
size_t
size
,
enum
__Pyx_ImportType_CheckSize
check_size
);
/*proto*/
#endif
/////////////// TypeImport ///////////////
#ifndef __PYX_HAVE_RT_ImportType
...
...
@@ -325,12 +328,6 @@ static PyTypeObject *__Pyx_ImportType(PyObject* module, const char *module_name,
static
PyTypeObject
*
__Pyx_ImportType
(
PyObject
*
module
,
const
char
*
module_name
,
const
char
*
class_name
,
size_t
size
,
enum
__Pyx_ImportType_CheckSize
check_size
)
{
/*
* 'check_size' tells what to do if tp_basicsize is different from size:
* 0 - Error (originates in check_size=error)
* 1 - Error if tp_basicsize is smaller, warn if larger (originates in check_size=warn)
* 2 - Error if tp_basicsize is smaller, but allow compatible extensions (originates in check_size=extend)
*/
PyObject
*
result
=
0
;
char
warning
[
200
];
Py_ssize_t
basicsize
;
...
...
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