Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
a6d80faf
Commit
a6d80faf
authored
Jun 12, 2006
by
Neal Norwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Impl ssize_t
parent
052cbcf6
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
110 additions
and
105 deletions
+110
-105
Modules/_sre.c
Modules/_sre.c
+98
-93
Modules/sre.h
Modules/sre.h
+12
-12
No files found.
Modules/_sre.c
View file @
a6d80faf
This diff is collapsed.
Click to expand it.
Modules/sre.h
View file @
a6d80faf
...
...
@@ -23,7 +23,7 @@
typedef
struct
{
PyObject_VAR_HEAD
in
t
groups
;
/* must be first! */
Py_ssize_
t
groups
;
/* must be first! */
PyObject
*
groupindex
;
PyObject
*
indexgroup
;
/* compatibility */
...
...
@@ -31,7 +31,7 @@ typedef struct {
int
flags
;
/* flags used when compiling pattern source */
PyObject
*
weakreflist
;
/* List of weak references */
/* pattern code */
in
t
codesize
;
Py_ssize_
t
codesize
;
SRE_CODE
code
[
1
];
}
PatternObject
;
...
...
@@ -42,10 +42,10 @@ typedef struct {
PyObject
*
string
;
/* link to the target string (must be first) */
PyObject
*
regs
;
/* cached list of matching spans */
PatternObject
*
pattern
;
/* link to the regex (pattern) object */
in
t
pos
,
endpos
;
/* current target slice */
in
t
lastindex
;
/* last index marker seen by the engine (-1 if none) */
in
t
groups
;
/* number of groups (start/end marks) */
in
t
mark
[
1
];
Py_ssize_
t
pos
,
endpos
;
/* current target slice */
Py_ssize_
t
lastindex
;
/* last index marker seen by the engine (-1 if none) */
Py_ssize_
t
groups
;
/* number of groups (start/end marks) */
Py_ssize_
t
mark
[
1
];
}
MatchObject
;
typedef
unsigned
int
(
*
SRE_TOLOWER_HOOK
)(
unsigned
int
ch
);
...
...
@@ -54,7 +54,7 @@ typedef unsigned int (*SRE_TOLOWER_HOOK)(unsigned int ch);
#define SRE_MARK_SIZE 200
typedef
struct
SRE_REPEAT_T
{
in
t
count
;
Py_ssize_
t
count
;
SRE_CODE
*
pattern
;
/* points to REPEAT operator arguments */
void
*
last_ptr
;
/* helper to check for infinite loops */
struct
SRE_REPEAT_T
*
prev
;
/* points to previous repeat context */
...
...
@@ -68,17 +68,17 @@ typedef struct {
void
*
end
;
/* end of original string */
/* attributes for the match object */
PyObject
*
string
;
in
t
pos
,
endpos
;
Py_ssize_
t
pos
,
endpos
;
/* character size */
int
charsize
;
/* registers */
in
t
lastindex
;
in
t
lastmark
;
Py_ssize_
t
lastindex
;
Py_ssize_
t
lastmark
;
void
*
mark
[
SRE_MARK_SIZE
];
/* dynamically allocated stuff */
char
*
data_stack
;
unsigned
in
t
data_stack_size
;
unsigned
in
t
data_stack_base
;
size_
t
data_stack_size
;
size_
t
data_stack_base
;
/* current repeat context */
SRE_REPEAT
*
repeat
;
/* hooks */
...
...
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