mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
* various modules: #include "Python.h" and remove most remporary
renaming hacks
This commit is contained in:
parent
a96720907a
commit
602099a756
6 changed files with 19 additions and 66 deletions
|
|
@ -206,10 +206,8 @@ strop_find(self, args)
|
|||
if (getargs(args, "(s#s#i)", &s, &len, &sub, &n, &i)) {
|
||||
if (i < 0)
|
||||
i += len;
|
||||
if (i < 0 || i+n > len) {
|
||||
err_setstr(ValueError, "start offset out of range");
|
||||
return NULL;
|
||||
}
|
||||
if (i < 0)
|
||||
i = 0;
|
||||
}
|
||||
else {
|
||||
err_clear();
|
||||
|
|
@ -242,10 +240,8 @@ strop_rfind(self, args)
|
|||
if (getargs(args, "(s#s#i)", &s, &len, &sub, &n, &i)) {
|
||||
if (i < 0)
|
||||
i += len;
|
||||
if (i < 0 || i+n > len) {
|
||||
err_setstr(ValueError, "start offset out of range");
|
||||
return NULL;
|
||||
}
|
||||
if (i < 0)
|
||||
i = 0;
|
||||
}
|
||||
else {
|
||||
err_clear();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue