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
9dccb017
Commit
9dccb017
authored
Jan 10, 2013
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
use PyInt_FromSsize_t instead of PyLong_FromSsize_t (#10182)
parent
d618684d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Modules/_sre.c
Modules/_sre.c
+4
-4
No files found.
Modules/_sre.c
View file @
9dccb017
...
@@ -1636,7 +1636,7 @@ static PyObject*pattern_scanner(PatternObject*, PyObject*);
...
@@ -1636,7 +1636,7 @@ static PyObject*pattern_scanner(PatternObject*, PyObject*);
static
PyObject
*
static
PyObject
*
sre_codesize
(
PyObject
*
self
,
PyObject
*
unused
)
sre_codesize
(
PyObject
*
self
,
PyObject
*
unused
)
{
{
return
Py
Long
_FromSize_t
(
sizeof
(
SRE_CODE
));
return
Py
Int
_FromSize_t
(
sizeof
(
SRE_CODE
));
}
}
static
PyObject
*
static
PyObject
*
...
@@ -3389,7 +3389,7 @@ match_start(MatchObject* self, PyObject* args)
...
@@ -3389,7 +3389,7 @@ match_start(MatchObject* self, PyObject* args)
}
}
/* mark is -1 if group is undefined */
/* mark is -1 if group is undefined */
return
Py
Long
_FromSsize_t
(
self
->
mark
[
index
*
2
]);
return
Py
Int
_FromSsize_t
(
self
->
mark
[
index
*
2
]);
}
}
static
PyObject
*
static
PyObject
*
...
@@ -3412,7 +3412,7 @@ match_end(MatchObject* self, PyObject* args)
...
@@ -3412,7 +3412,7 @@ match_end(MatchObject* self, PyObject* args)
}
}
/* mark is -1 if group is undefined */
/* mark is -1 if group is undefined */
return
Py
Long
_FromSsize_t
(
self
->
mark
[
index
*
2
+
1
]);
return
Py
Int
_FromSsize_t
(
self
->
mark
[
index
*
2
+
1
]);
}
}
LOCAL
(
PyObject
*
)
LOCAL
(
PyObject
*
)
...
@@ -3602,7 +3602,7 @@ static PyObject *
...
@@ -3602,7 +3602,7 @@ static PyObject *
match_lastindex_get
(
MatchObject
*
self
)
match_lastindex_get
(
MatchObject
*
self
)
{
{
if
(
self
->
lastindex
>=
0
)
if
(
self
->
lastindex
>=
0
)
return
Py
Long
_FromSsize_t
(
self
->
lastindex
);
return
Py
Int
_FromSsize_t
(
self
->
lastindex
);
Py_INCREF
(
Py_None
);
Py_INCREF
(
Py_None
);
return
Py_None
;
return
Py_None
;
}
}
...
...
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