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
c0cda71c
Commit
c0cda71c
authored
Jan 18, 2013
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
replace 'const_xyz' work-arounds in standard .pxd files by real 'const' declarations
parent
ee5ac4a5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
82 additions
and
76 deletions
+82
-76
Cython/Includes/libc/locale.pxd
Cython/Includes/libc/locale.pxd
+4
-3
Cython/Includes/libc/stdio.pxd
Cython/Includes/libc/stdio.pxd
+21
-20
Cython/Includes/libc/stdlib.pxd
Cython/Includes/libc/stdlib.pxd
+19
-19
Cython/Includes/libc/string.pxd
Cython/Includes/libc/string.pxd
+32
-31
Cython/Includes/libcpp/string.pxd
Cython/Includes/libcpp/string.pxd
+6
-3
No files found.
Cython/Includes/libc/locale.pxd
View file @
c0cda71c
# 7.11 Localization <locale.h>
# 7.11 Localization <locale.h>
cdef
extern
from
*
:
# deprecated cimport for backwards compatibility:
ctypedef
char
const_char
"const char"
from
.string
cimport
const_char
cdef
extern
from
"locale.h"
nogil
:
cdef
extern
from
"locale.h"
nogil
:
...
@@ -39,7 +40,7 @@ cdef extern from "locale.h" nogil:
...
@@ -39,7 +40,7 @@ cdef extern from "locale.h" nogil:
enum
:
LC_TIME
enum
:
LC_TIME
# 7.11.1 Locale control
# 7.11.1 Locale control
char
*
setlocale
(
int
CATEGORY
,
const
_
char
*
LOCALE
)
char
*
setlocale
(
int
CATEGORY
,
const
char
*
LOCALE
)
# 7.11.2 Numeric formatting convention inquiry
# 7.11.2 Numeric formatting convention inquiry
lconv
*
localeconv
()
lconv
*
localeconv
()
Cython/Includes/libc/stdio.pxd
View file @
c0cda71c
# 7.19 Input/output <stdio.h>
# 7.19 Input/output <stdio.h>
cdef
extern
from
*
:
ctypedef
char
const_char
"const char"
# deprecated cimports for backwards compatibility:
ctypedef
void
const_void
"const void"
from
.string
cimport
const_char
,
const_void
cdef
extern
from
"stdio.h"
nogil
:
cdef
extern
from
"stdio.h"
nogil
:
...
@@ -13,11 +14,11 @@ cdef extern from "stdio.h" nogil:
...
@@ -13,11 +14,11 @@ cdef extern from "stdio.h" nogil:
enum
:
FOPEN_MAX
enum
:
FOPEN_MAX
enum
:
FILENAME_MAX
enum
:
FILENAME_MAX
FILE
*
fopen
(
const
_char
*
FILENAME
,
const_
char
*
OPENTYPE
)
FILE
*
fopen
(
const
char
*
FILENAME
,
const
char
*
OPENTYPE
)
FILE
*
freopen
(
const
_char
*
FILENAME
,
const_
char
*
OPENTYPE
,
FILE
*
STREAM
)
FILE
*
freopen
(
const
char
*
FILENAME
,
const
char
*
OPENTYPE
,
FILE
*
STREAM
)
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
()
FILE
*
tmpfile
()
enum
:
_IOFBF
enum
:
_IOFBF
...
@@ -28,7 +29,7 @@ cdef extern from "stdio.h" nogil:
...
@@ -28,7 +29,7 @@ cdef extern from "stdio.h" nogil:
void
setbuf
(
FILE
*
STREAM
,
char
*
BUF
)
void
setbuf
(
FILE
*
STREAM
,
char
*
BUF
)
size_t
fread
(
void
*
DATA
,
size_t
SIZE
,
size_t
COUNT
,
FILE
*
STREAM
)
size_t
fread
(
void
*
DATA
,
size_t
SIZE
,
size_t
COUNT
,
FILE
*
STREAM
)
size_t
fwrite
(
const
_
void
*
DATA
,
size_t
SIZE
,
size_t
COUNT
,
FILE
*
STREAM
)
size_t
fwrite
(
const
void
*
DATA
,
size_t
SIZE
,
size_t
COUNT
,
FILE
*
STREAM
)
int
fflush
(
FILE
*
STREAM
)
int
fflush
(
FILE
*
STREAM
)
enum
:
EOF
enum
:
EOF
...
@@ -43,23 +44,23 @@ cdef extern from "stdio.h" nogil:
...
@@ -43,23 +44,23 @@ cdef extern from "stdio.h" nogil:
long
int
ftell
(
FILE
*
STREAM
)
long
int
ftell
(
FILE
*
STREAM
)
ctypedef
long
long
int
fpos_t
ctypedef
long
long
int
fpos_t
ctypedef
fpos_t
const_fpos_t
"const fpos_t"
ctypedef
const
fpos_t
const_fpos_t
"const fpos_t"
int
fgetpos
(
FILE
*
STREAM
,
fpos_t
*
POSITION
)
int
fgetpos
(
FILE
*
STREAM
,
fpos_t
*
POSITION
)
int
fsetpos
(
FILE
*
STREAM
,
const
_
fpos_t
*
POSITION
)
int
fsetpos
(
FILE
*
STREAM
,
const
fpos_t
*
POSITION
)
int
scanf
(
const
_
char
*
TEMPLATE
,
...)
int
scanf
(
const
char
*
TEMPLATE
,
...)
int
sscanf
(
const
_char
*
S
,
const_
char
*
TEMPLATE
,
...)
int
sscanf
(
const
char
*
S
,
const
char
*
TEMPLATE
,
...)
int
fscanf
(
FILE
*
STREAM
,
const
_
char
*
TEMPLATE
,
...)
int
fscanf
(
FILE
*
STREAM
,
const
char
*
TEMPLATE
,
...)
int
printf
(
const
_
char
*
TEMPLATE
,
...)
int
printf
(
const
char
*
TEMPLATE
,
...)
int
sprintf
(
char
*
S
,
const
_
char
*
TEMPLATE
,
...)
int
sprintf
(
char
*
S
,
const
char
*
TEMPLATE
,
...)
int
snprintf
(
char
*
S
,
size_t
SIZE
,
const
_
char
*
TEMPLATE
,
...)
int
snprintf
(
char
*
S
,
size_t
SIZE
,
const
char
*
TEMPLATE
,
...)
int
fprintf
(
FILE
*
STREAM
,
const
_
char
*
TEMPLATE
,
...)
int
fprintf
(
FILE
*
STREAM
,
const
char
*
TEMPLATE
,
...)
void
perror
(
const
_
char
*
MESSAGE
)
void
perror
(
const
char
*
MESSAGE
)
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
puts
(
const
_
char
*
S
)
int
puts
(
const
char
*
S
)
int
fputs
(
const
_
char
*
S
,
FILE
*
STREAM
)
int
fputs
(
const
char
*
S
,
FILE
*
STREAM
)
Cython/Includes/libc/stdlib.pxd
View file @
c0cda71c
# 7.20 General utilities <stdlib.h>
# 7.20 General utilities <stdlib.h>
cdef
extern
from
*
:
# deprecated cimports for backwards compatibility
:
ctypedef
char
const_char
"const char"
from
.string
cimport
const_char
,
const_void
ctypedef
void
const_void
"const void"
cdef
extern
from
"stdlib.h"
nogil
:
cdef
extern
from
"stdlib.h"
nogil
:
# 7.20.1 Numeric conversion functions
# 7.20.1 Numeric conversion functions
int
atoi
(
const
_
char
*
STRING
)
int
atoi
(
const
char
*
STRING
)
long
atol
(
const
_
char
*
STRING
)
long
atol
(
const
char
*
STRING
)
long
long
atoll
(
const
_
char
*
STRING
)
long
long
atoll
(
const
char
*
STRING
)
double
atof
(
const
_
char
*
STRING
)
double
atof
(
const
char
*
STRING
)
long
strtol
(
const
_
char
*
STRING
,
char
**
TAILPTR
,
int
BASE
)
long
strtol
(
const
char
*
STRING
,
char
**
TAILPTR
,
int
BASE
)
unsigned
long
int
strtoul
(
const
_
char
*
STRING
,
char
**
TAILPTR
,
int
BASE
)
unsigned
long
int
strtoul
(
const
char
*
STRING
,
char
**
TAILPTR
,
int
BASE
)
long
long
int
strtoll
(
const
_
char
*
STRING
,
char
**
TAILPTR
,
int
BASE
)
long
long
int
strtoll
(
const
char
*
STRING
,
char
**
TAILPTR
,
int
BASE
)
unsigned
long
long
int
strtoull
(
const
_
char
*
STRING
,
char
**
TAILPTR
,
int
BASE
)
unsigned
long
long
int
strtoull
(
const
char
*
STRING
,
char
**
TAILPTR
,
int
BASE
)
float
strtof
(
const
_
char
*
STRING
,
char
**
TAILPTR
)
float
strtof
(
const
char
*
STRING
,
char
**
TAILPTR
)
double
strtod
(
const
_
char
*
STRING
,
char
**
TAILPTR
)
double
strtod
(
const
char
*
STRING
,
char
**
TAILPTR
)
long
double
strtold
(
const
_
char
*
STRING
,
char
**
TAILPTR
)
long
double
strtold
(
const
char
*
STRING
,
char
**
TAILPTR
)
# 7.20.2 Pseudo-random sequence generation functions
# 7.20.2 Pseudo-random sequence generation functions
enum
:
RAND_MAX
enum
:
RAND_MAX
...
@@ -37,15 +37,15 @@ cdef extern from "stdlib.h" nogil:
...
@@ -37,15 +37,15 @@ cdef extern from "stdlib.h" nogil:
void
_Exit
(
int
STATUS
)
void
_Exit
(
int
STATUS
)
int
atexit
(
void
(
*
FUNCTION
)
())
int
atexit
(
void
(
*
FUNCTION
)
())
void
abort
()
void
abort
()
char
*
getenv
(
const
_
char
*
NAME
)
char
*
getenv
(
const
char
*
NAME
)
int
system
(
const
_
char
*
COMMAND
)
int
system
(
const
char
*
COMMAND
)
#7.20.5 Searching and sorting utilities
#7.20.5 Searching and sorting utilities
void
*
bsearch
(
const
_void
*
KEY
,
const_
void
*
ARRAY
,
void
*
bsearch
(
const
void
*
KEY
,
const
void
*
ARRAY
,
size_t
COUNT
,
size_t
SIZE
,
size_t
COUNT
,
size_t
SIZE
,
int
(
*
COMPARE
)(
const
_void
*
,
const_
void
*
))
int
(
*
COMPARE
)(
const
void
*
,
const
void
*
))
void
qsort
(
void
*
ARRAY
,
size_t
COUNT
,
size_t
SIZE
,
void
qsort
(
void
*
ARRAY
,
size_t
COUNT
,
size_t
SIZE
,
int
(
*
COMPARE
)(
const
_void
*
,
const_
void
*
))
int
(
*
COMPARE
)(
const
void
*
,
const
void
*
))
# 7.20.6 Integer arithmetic functions
# 7.20.6 Integer arithmetic functions
int
abs
(
int
NUMBER
)
int
abs
(
int
NUMBER
)
...
...
Cython/Includes/libc/string.pxd
View file @
c0cda71c
# 7.21 String handling <string.h>
# 7.21 String handling <string.h>
cdef
extern
from
*
:
cdef
extern
from
*
:
ctypedef
char
const_char
"const char"
# deprecated backwards compatibility declarations
ctypedef
signed
char
const_schar
"const signed char"
ctypedef
const
char
const_char
"const char"
ctypedef
unsigned
char
const_uchar
"const unsigned char"
ctypedef
const
signed
char
const_schar
"const signed char"
ctypedef
void
const_void
"const void"
ctypedef
const
unsigned
char
const_uchar
"const unsigned char"
ctypedef
const
void
const_void
"const void"
cdef
extern
from
"string.h"
nogil
:
cdef
extern
from
"string.h"
nogil
:
void
*
memcpy
(
void
*
TO
,
const
_
void
*
FROM
,
size_t
SIZE
)
void
*
memcpy
(
void
*
TO
,
const
void
*
FROM
,
size_t
SIZE
)
void
*
memmove
(
void
*
TO
,
const
_
void
*
FROM
,
size_t
SIZE
)
void
*
memmove
(
void
*
TO
,
const
void
*
FROM
,
size_t
SIZE
)
void
*
memset
(
void
*
BLOCK
,
int
C
,
size_t
SIZE
)
void
*
memset
(
void
*
BLOCK
,
int
C
,
size_t
SIZE
)
int
memcmp
(
const
_void
*
A1
,
const_
void
*
A2
,
size_t
SIZE
)
int
memcmp
(
const
void
*
A1
,
const
void
*
A2
,
size_t
SIZE
)
void
*
memchr
(
const
_
void
*
BLOCK
,
int
C
,
size_t
SIZE
)
void
*
memchr
(
const
void
*
BLOCK
,
int
C
,
size_t
SIZE
)
void
*
memchr
(
const
_
void
*
BLOCK
,
int
C
,
size_t
SIZE
)
void
*
memchr
(
const
void
*
BLOCK
,
int
C
,
size_t
SIZE
)
void
*
memrchr
(
const
_
void
*
BLOCK
,
int
C
,
size_t
SIZE
)
void
*
memrchr
(
const
void
*
BLOCK
,
int
C
,
size_t
SIZE
)
size_t
strlen
(
const
_
char
*
S
)
size_t
strlen
(
const
char
*
S
)
char
*
strcpy
(
char
*
TO
,
const
_
char
*
FROM
)
char
*
strcpy
(
char
*
TO
,
const
char
*
FROM
)
char
*
strncpy
(
char
*
TO
,
const
_
char
*
FROM
,
size_t
SIZE
)
char
*
strncpy
(
char
*
TO
,
const
char
*
FROM
,
size_t
SIZE
)
char
*
strdup
(
const
_
char
*
S
)
char
*
strdup
(
const
char
*
S
)
char
*
strndup
(
const
_
char
*
S
,
size_t
SIZE
)
char
*
strndup
(
const
char
*
S
,
size_t
SIZE
)
char
*
strcat
(
char
*
TO
,
const
_
char
*
FROM
)
char
*
strcat
(
char
*
TO
,
const
char
*
FROM
)
char
*
strncat
(
char
*
TO
,
const
_
char
*
FROM
,
size_t
SIZE
)
char
*
strncat
(
char
*
TO
,
const
char
*
FROM
,
size_t
SIZE
)
int
strcmp
(
const
_char
*
S1
,
const_
char
*
S2
)
int
strcmp
(
const
char
*
S1
,
const
char
*
S2
)
int
strcasecmp
(
const
_char
*
S1
,
const_
char
*
S2
)
int
strcasecmp
(
const
char
*
S1
,
const
char
*
S2
)
int
strncmp
(
const
_char
*
S1
,
const_
char
*
S2
,
size_t
SIZE
)
int
strncmp
(
const
char
*
S1
,
const
char
*
S2
,
size_t
SIZE
)
int
strncasecmp
(
const
_char
*
S1
,
const_
char
*
S2
,
size_t
N
)
int
strncasecmp
(
const
char
*
S1
,
const
char
*
S2
,
size_t
N
)
int
strcoll
(
const
_char
*
S1
,
const_
char
*
S2
)
int
strcoll
(
const
char
*
S1
,
const
char
*
S2
)
size_t
strxfrm
(
char
*
TO
,
const
_
char
*
FROM
,
size_t
SIZE
)
size_t
strxfrm
(
char
*
TO
,
const
char
*
FROM
,
size_t
SIZE
)
char
*
strerror
(
int
ERRNUM
)
char
*
strerror
(
int
ERRNUM
)
char
*
strchr
(
const
_
char
*
STRING
,
int
C
)
char
*
strchr
(
const
char
*
STRING
,
int
C
)
char
*
strrchr
(
const
_
char
*
STRING
,
int
C
)
char
*
strrchr
(
const
char
*
STRING
,
int
C
)
char
*
strstr
(
const
_char
*
HAYSTACK
,
const_
char
*
NEEDLE
)
char
*
strstr
(
const
char
*
HAYSTACK
,
const
char
*
NEEDLE
)
char
*
strcasestr
(
const
_char
*
HAYSTACK
,
const_
char
*
NEEDLE
)
char
*
strcasestr
(
const
char
*
HAYSTACK
,
const
char
*
NEEDLE
)
size_t
strcspn
(
const
_char
*
STRING
,
const_
char
*
STOPSET
)
size_t
strcspn
(
const
char
*
STRING
,
const
char
*
STOPSET
)
char
*
strpbrk
(
const
_char
*
STRING
,
const_
char
*
STOPSET
)
char
*
strpbrk
(
const
char
*
STRING
,
const
char
*
STOPSET
)
char
*
strtok
(
char
*
NEWSTRING
,
const
_
char
*
DELIMITERS
)
char
*
strtok
(
char
*
NEWSTRING
,
const
char
*
DELIMITERS
)
char
*
strsep
(
char
**
STRING_PTR
,
const
_
char
*
DELIMITER
)
char
*
strsep
(
char
**
STRING_PTR
,
const
char
*
DELIMITER
)
Cython/Includes/libcpp/string.pxd
View file @
c0cda71c
from
libc.string
cimport
const_char
# deprecated cimport for backwards compatibility:
from
.string
cimport
const_char
cdef
extern
from
"<string>"
namespace
"std"
:
cdef
extern
from
"<string>"
namespace
"std"
:
...
@@ -12,8 +15,8 @@ cdef extern from "<string>" namespace "std":
...
@@ -12,8 +15,8 @@ cdef extern from "<string>" namespace "std":
# as a string formed by a repetition of character c, n times.
# as a string formed by a repetition of character c, n times.
string
(
size_t
,
char
)
nogil
except
+
string
(
size_t
,
char
)
nogil
except
+
const
_
char
*
c_str
()
nogil
const
char
*
c_str
()
nogil
const
_
char
*
data
()
nogil
const
char
*
data
()
nogil
size_t
size
()
nogil
size_t
size
()
nogil
size_t
max_size
()
nogil
size_t
max_size
()
nogil
size_t
length
()
nogil
size_t
length
()
nogil
...
...
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