Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Put a code snippet from external_c_code.rst into the examples directo…
…ry for testing.
- Loading branch information
gabrieldemarmiesse
committed
Jun 17, 2018
1 parent
5c04c1a
commit 63b3b84
Showing
2 changed files
with
11 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
cdef extern from *: | ||
""" | ||
/* This is C code which will be put | ||
* in the .c file output by Cython */ | ||
static long square(long x) {return x * x;} | ||
#define assign(x, y) ((x) = (y)) | ||
""" | ||
long square(long x) | ||
void assign(long& x, long y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters