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
4da6fd63
Commit
4da6fd63
authored
May 29, 2002
by
Marc-André Lemburg
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug [ 561796 ] string.find causes lazy error
parent
1e1542fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
3 deletions
+4
-3
Include/unicodeobject.h
Include/unicodeobject.h
+2
-1
Objects/unicodeobject.c
Objects/unicodeobject.c
+2
-2
No files found.
Include/unicodeobject.h
View file @
4da6fd63
...
...
@@ -983,7 +983,8 @@ extern DL_IMPORT(int) PyUnicode_Tailmatch(
);
/* Return the first position of substr in str[start:end] using the
given search direction or -1 if not found. */
given search direction or -1 if not found. -2 is returned in case
an error occurred and an exception is set. */
extern
DL_IMPORT
(
int
)
PyUnicode_Find
(
PyObject
*
str
,
/* String */
...
...
Objects/unicodeobject.c
View file @
4da6fd63
...
...
@@ -2887,11 +2887,11 @@ int PyUnicode_Find(PyObject *str,
str
=
PyUnicode_FromObject
(
str
);
if
(
str
==
NULL
)
return
-
1
;
return
-
2
;
substr
=
PyUnicode_FromObject
(
substr
);
if
(
substr
==
NULL
)
{
Py_DECREF
(
substr
);
return
-
1
;
return
-
2
;
}
result
=
findstring
((
PyUnicodeObject
*
)
str
,
...
...
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