Commit ab3434c3 authored by Robert Bradshaw's avatar Robert Bradshaw

Merge pull request #236 from joshayers/stdio_fix

Add missing declarations to libc/stdio.pxd.
parents c144c807 fbc90c18
......@@ -22,6 +22,9 @@ cdef extern from "stdio.h" nogil:
int rename (const char *oldname, const char *newname)
FILE *tmpfile ()
int remove (const char *pathname)
int rename (const char *oldpath, const char *newpath)
enum: _IOFBF
enum: _IOLBF
enum: _IONBF
......@@ -34,8 +37,9 @@ cdef extern from "stdio.h" nogil:
int fflush (FILE *stream)
enum: EOF
int feof (FILE *stream)
int ferror (FILE *stream)
void clearerr (FILE *stream)
int feof (FILE *stream)
int ferror (FILE *stream)
enum: SEEK_SET
enum: SEEK_CUR
......@@ -62,6 +66,15 @@ cdef extern from "stdio.h" nogil:
char *gets (char *s)
char *fgets (char *s, int count, FILE *stream)
int getchar ()
int fgetc (FILE *stream)
int getc (FILE *stream)
int ungetc (int c, FILE *stream)
int puts (const char *s)
int fputs (const char *s, FILE *stream)
int putchar (int c)
int fputc (int c, FILE *stream)
int putc (int c, FILE *stream)
int puts (const char *s)
int fputs (const char *s, FILE *stream)
......@@ -36,6 +36,3 @@ from libc.stdio cimport *
from libc.stdlib 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")
# 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)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment