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
2771e522
Commit
2771e522
authored
Jan 01, 1992
by
Guido van Rossum
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
'regs' is a read-only data member, not a function.
parent
3a1433ff
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
14 deletions
+8
-14
Modules/regexmodule.c
Modules/regexmodule.c
+8
-14
No files found.
Modules/regexmodule.c
View file @
2771e522
...
@@ -146,23 +146,9 @@ reg_search(re, args)
...
@@ -146,23 +146,9 @@ reg_search(re, args)
return
newintobject
((
long
)
result
);
/* Position of the match or -1 */
return
newintobject
((
long
)
result
);
/* Position of the match or -1 */
}
}
static
object
*
reg_regs
(
re
,
args
)
regexobject
*
re
;
object
*
args
;
{
if
(
!
re
->
re_regs_valid
)
{
err_setstr
(
RegexError
,
"regs only valid after successful match/search"
);
return
NULL
;
}
return
makeresult
(
&
re
->
re_regs
);
}
static
struct
methodlist
reg_methods
[]
=
{
static
struct
methodlist
reg_methods
[]
=
{
{
"match"
,
reg_match
},
{
"match"
,
reg_match
},
{
"search"
,
reg_search
},
{
"search"
,
reg_search
},
{
"regs"
,
reg_regs
},
{
NULL
,
NULL
}
/* sentinel */
{
NULL
,
NULL
}
/* sentinel */
};
};
...
@@ -171,6 +157,14 @@ reg_getattr(re, name)
...
@@ -171,6 +157,14 @@ reg_getattr(re, name)
regexobject
*
re
;
regexobject
*
re
;
char
*
name
;
char
*
name
;
{
{
if
(
strcmp
(
name
,
"regs"
)
==
0
)
{
if
(
!
re
->
re_regs_valid
)
{
err_setstr
(
RegexError
,
"regs only valid after successful match/search"
);
return
NULL
;
}
return
makeresult
(
&
re
->
re_regs
);
}
return
findmethod
(
reg_methods
,
(
object
*
)
re
,
name
);
return
findmethod
(
reg_methods
,
(
object
*
)
re
,
name
);
}
}
...
...
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