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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
fbc90c18
Commit
fbc90c18
authored
May 25, 2013
by
Josh Ayers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added tests for some stdio functions.
parent
7f97d71e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
5 deletions
+18
-5
Cython/Includes/libc/stdio.pxd
Cython/Includes/libc/stdio.pxd
+2
-2
tests/compile/libc_all.pyx
tests/compile/libc_all.pyx
+0
-3
tests/compile/libc_stdio.pyx
tests/compile/libc_stdio.pyx
+16
-0
No files found.
Cython/Includes/libc/stdio.pxd
View file @
fbc90c18
...
@@ -20,7 +20,7 @@ cdef extern from "stdio.h" nogil:
...
@@ -20,7 +20,7 @@ cdef extern from "stdio.h" nogil:
int
fclose
(
FILE
*
stream
)
int
fclose
(
FILE
*
stream
)
int
remove
(
const
char
*
filename
)
int
remove
(
const
char
*
filename
)
int
rename
(
const
char
*
oldname
,
const
char
*
newname
)
int
rename
(
const
char
*
oldname
,
const
char
*
newname
)
FILE
*
tmpfile
(
void
)
FILE
*
tmpfile
()
int
remove
(
const
char
*
pathname
)
int
remove
(
const
char
*
pathname
)
int
rename
(
const
char
*
oldpath
,
const
char
*
newpath
)
int
rename
(
const
char
*
oldpath
,
const
char
*
newpath
)
...
@@ -66,7 +66,7 @@ cdef extern from "stdio.h" nogil:
...
@@ -66,7 +66,7 @@ cdef extern from "stdio.h" nogil:
char
*
gets
(
char
*
s
)
char
*
gets
(
char
*
s
)
char
*
fgets
(
char
*
s
,
int
count
,
FILE
*
stream
)
char
*
fgets
(
char
*
s
,
int
count
,
FILE
*
stream
)
int
getchar
(
void
)
int
getchar
()
int
fgetc
(
FILE
*
stream
)
int
fgetc
(
FILE
*
stream
)
int
getc
(
FILE
*
stream
)
int
getc
(
FILE
*
stream
)
int
ungetc
(
int
c
,
FILE
*
stream
)
int
ungetc
(
int
c
,
FILE
*
stream
)
...
...
tests/compile/libc_all.pyx
View file @
fbc90c18
...
@@ -36,6 +36,3 @@ from libc.stdio cimport *
...
@@ -36,6 +36,3 @@ from libc.stdio cimport *
from
libc.stdlib
cimport
*
from
libc.stdlib
cimport
*
from
libc.string
cimport
*
from
libc.string
cimport
*
libc
.
stdio
.
printf
(
"hello %s
\
n
"
,
b"world"
)
stdio
.
printf
(
"hello %s
\
n
"
,
b"world"
)
printf
(
"hello %s
\
n
"
,
b"world"
)
tests/compile/libc_stdio.pyx
0 → 100644
View file @
fbc90c18
# mode: compile
cimport
libc
from
libc
cimport
stdio
from
libc.stdio
cimport
printf
,
puts
,
fputs
,
putchar
,
fputc
,
putc
,
stdout
libc
.
stdio
.
printf
(
"hello %s
\
n
"
,
b"world"
)
stdio
.
printf
(
"hello %s
\
n
"
,
b"world"
)
printf
(
"hello %s
\
n
"
,
b"world"
)
printf
(
"printf_output %d %d
\
n
"
,
1
,
2
)
puts
(
"puts_output"
)
fputs
(
"fputs_output"
,
stdout
)
putchar
(
b'z'
)
fputc
(
b'x'
,
stdout
)
putc
(
b'c'
,
stdout
)
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