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
1e98c40c
Commit
1e98c40c
authored
Mar 28, 2019
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace some external .h files in tests with inline C code in the test file that uses them.
parent
d034742a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
19 deletions
+25
-19
tests/compile/cpp_enums.h
tests/compile/cpp_enums.h
+0
-11
tests/compile/cpp_enums.pyx
tests/compile/cpp_enums.pyx
+18
-2
tests/compile/crunchytype.h
tests/compile/crunchytype.h
+0
-5
tests/compile/crunchytype.pxd
tests/compile/crunchytype.pxd
+7
-1
No files found.
tests/compile/cpp_enums.h
deleted
100644 → 0
View file @
d034742a
enum
Enum1
{
Item1
,
Item2
};
namespace
Namespace1
{
enum
Enum2
{
Item3
,
Item4
};
}
tests/compile/cpp_enums.pyx
View file @
1e98c40c
# tag: cpp
# mode: compile
cdef
extern
from
"cpp_enums.h"
:
cdef
extern
from
*
:
"""
enum Enum1 {
Item1,
Item2
};
"""
cdef
enum
Enum1
:
Item1
Item2
...
...
@@ -13,7 +20,16 @@ cdef Enum1 x, y
x
=
Item1
y
=
Item2
cdef
extern
from
"cpp_enums.h"
namespace
"Namespace1"
:
cdef
extern
from
*
namespace
"Namespace1"
:
"""
namespace Namespace1 {
enum Enum2 {
Item3,
Item4
};
}
"""
cdef
enum
Enum2
:
Item3
Item4
...
...
tests/compile/crunchytype.h
deleted
100644 → 0
View file @
d034742a
struct
CrunchyType
{
int
number
;
PyObject
*
string
;
};
tests/compile/crunchytype.pxd
View file @
1e98c40c
cdef
extern
from
"crunchytype.h"
:
cdef
extern
from
*
:
"""
struct CrunchyType {
int number;
PyObject* string;
};
"""
cdef
class
crunchytype
.
Crunchy
[
object
CrunchyType
]:
cdef
int
number
cdef
object
string
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