Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
39 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
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
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 |
---|---|---|
@@ -1,11 +1,12 @@ | ||
# mode: compile | ||
|
||
cdef const_args(const int a, const int *b, const (int*) c): | ||
cdef const_args(const int a, const int *b, const (int*) c, int *const d): | ||
print a | ||
print b[0] | ||
b = NULL # OK, the pointer itself is not const | ||
c[0] = 4 # OK, the value is not const | ||
d[0] = 7 # OK, the value is not const | ||
|
||
def call_const_args(x): | ||
cdef int k = x | ||
const_args(x, &k, &k) | ||
const_args(x, &k, &k, &k) |
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