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
36292c55
Commit
36292c55
authored
Sep 04, 2015
by
scoder
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #429 from larsmans/posix
wrap POSIX dynamic linking API and stdio.h extensions
parents
ab78f93b
dc5904f1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
59 additions
and
0 deletions
+59
-0
Cython/Includes/posix/dlfcn.pxd
Cython/Includes/posix/dlfcn.pxd
+14
-0
Cython/Includes/posix/stdio.pxd
Cython/Includes/posix/stdio.pxd
+37
-0
tests/compile/posix_pxds.pyx
tests/compile/posix_pxds.pyx
+8
-0
No files found.
Cython/Includes/posix/dlfcn.pxd
0 → 100644
View file @
36292c55
# POSIX dynamic linking/loading interface.
# http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/dlfcn.h.html
cdef
extern
from
"dlfcn.h"
nogil
:
void
*
dlopen
(
const
char
*
,
int
)
char
*
dlerror
()
void
*
dlsym
(
void
*
,
const
char
*
)
int
dlclose
(
void
*
)
enum
:
RTLD_LAZY
RTLD_NOW
RTLD_GLOBAL
RTLD_LOCAL
Cython/Includes/posix/stdio.pxd
0 → 100644
View file @
36292c55
# POSIX additions to <stdio.h>.
# http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/stdio.h.html
from
libc.stdio
cimport
FILE
from
libc.stddef
cimport
wchar_t
from
posix.types
cimport
off_t
cdef
extern
from
"stdio.h"
nogil
:
# File descriptors
FILE
*
fdopen
(
int
,
const
char
*
)
int
fileno
(
FILE
*
)
# Pipes
FILE
*
popen
(
const
char
*
,
const
char
*
)
int
pclose
(
FILE
*
)
# Memory streams (POSIX.2008)
FILE
*
fmemopen
(
void
*
,
size_t
,
const
char
*
)
FILE
*
open_memstream
(
char
**
,
size_t
*
)
FILE
*
open_wmemstream
(
wchar_t
**
,
size_t
*
)
# Seek and tell with off_t
int
fseeko
(
FILE
*
,
off_t
,
int
)
off_t
ftello
(
FILE
*
)
# Locking (for multithreading)
void
flockfile
(
FILE
*
)
int
ftrylockfile
(
FILE
*
)
void
funlockfile
(
FILE
*
)
int
getc_unlocked
(
FILE
*
)
int
getchar_unlocked
()
int
putc_unlocked
(
int
,
FILE
*
)
int
putchar_unlocked
(
int
)
# Reading lines and records (POSIX.2008)
ssize_t
getline
(
char
**
,
size_t
*
,
FILE
*
)
ssize_t
getdelim
(
char
**
,
size_t
*
,
int
,
FILE
*
)
tests/compile/posix_pxds.pyx
View file @
36292c55
...
...
@@ -23,6 +23,10 @@ cimport posix.stat
from
posix
cimport
stat
from
posix.stat
cimport
*
cimport
posix.stdio
from
posix
cimport
stdio
from
posix.stdio
cimport
*
cimport
posix.stdlib
from
posix
cimport
stdlib
from
posix.stdlib
cimport
*
...
...
@@ -42,3 +46,7 @@ from posix.wait cimport *
cimport
posix.mman
from
posix
cimport
mman
from
posix.mman
cimport
*
cimport
posix.dlfcn
from
posix
cimport
dlfcn
from
posix.dlfcn
cimport
*
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