Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
Pyston
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
Boxiang Sun
Pyston
Commits
28af3827
Commit
28af3827
authored
Feb 03, 2016
by
Kevin Modzelewski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert these to getStaticString
parent
86a995bc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
8 additions
and
8 deletions
+8
-8
src/capi/abstract.cpp
src/capi/abstract.cpp
+4
-4
src/capi/object.cpp
src/capi/object.cpp
+1
-1
src/runtime/builtin_modules/builtins.cpp
src/runtime/builtin_modules/builtins.cpp
+1
-1
src/runtime/classobj.cpp
src/runtime/classobj.cpp
+1
-1
src/runtime/complex.cpp
src/runtime/complex.cpp
+1
-1
No files found.
src/capi/abstract.cpp
View file @
28af3827
...
...
@@ -321,7 +321,7 @@ static PyObject* abstract_get_bases(PyObject* cls) noexcept {
static
PyObject
*
__bases__
=
NULL
;
if
(
__bases__
==
NULL
)
{
__bases__
=
PyString_InternFrom
String
(
"__bases__"
);
__bases__
=
getStatic
String
(
"__bases__"
);
if
(
__bases__
==
NULL
)
return
NULL
;
}
...
...
@@ -394,7 +394,7 @@ static int recursive_isinstance(PyObject* inst, PyObject* cls) noexcept {
static
PyObject
*
__class__
=
NULL
;
if
(
__class__
==
NULL
)
{
__class__
=
PyString_InternFrom
String
(
"__class__"
);
__class__
=
getStatic
String
(
"__class__"
);
if
(
__class__
==
NULL
)
return
-
1
;
}
...
...
@@ -2156,7 +2156,7 @@ extern "C" PyObject* _PyNumber_ConvertIntegralToInt(PyObject* integral, const ch
const
char
*
type_name
;
static
PyObject
*
int_name
=
NULL
;
if
(
int_name
==
NULL
)
{
int_name
=
PyString_InternFrom
String
(
"__int__"
);
int_name
=
getStatic
String
(
"__int__"
);
if
(
int_name
==
NULL
)
return
NULL
;
}
...
...
@@ -2287,7 +2287,7 @@ extern "C" PyObject* PyNumber_Long(PyObject* o) noexcept {
Py_ssize_t
buffer_len
;
if
(
trunc_name
==
NULL
)
{
trunc_name
=
PyString_InternFrom
String
(
"__trunc__"
);
trunc_name
=
getStatic
String
(
"__trunc__"
);
if
(
trunc_name
==
NULL
)
return
NULL
;
}
...
...
src/capi/object.cpp
View file @
28af3827
...
...
@@ -328,7 +328,7 @@ extern "C" PyObject* PyObject_Unicode(PyObject* v) noexcept {
/* We're an instance of a classic class */
/* Try __unicode__ from the instance -- alas we have no type */
if
(
!
unicodestr
)
{
unicodestr
=
PyString_InternFrom
String
(
"__unicode__"
);
unicodestr
=
getStatic
String
(
"__unicode__"
);
if
(
!
unicodestr
)
return
NULL
;
}
...
...
src/runtime/builtin_modules/builtins.cpp
View file @
28af3827
...
...
@@ -173,7 +173,7 @@ Box* min_max(Box* arg0, BoxedTuple* args, BoxedDict* kwargs, int opid) {
Box
*
extremVal
;
if
(
kwargs
&&
kwargs
->
d
.
size
())
{
static
BoxedString
*
key_str
=
static_cast
<
BoxedString
*>
(
PyString_InternFrom
String
(
"key"
));
static
BoxedString
*
key_str
=
static_cast
<
BoxedString
*>
(
getStatic
String
(
"key"
));
auto
it
=
kwargs
->
d
.
find
(
key_str
);
if
(
it
!=
kwargs
->
d
.
end
()
&&
kwargs
->
d
.
size
()
==
1
)
{
key_func
=
it
->
second
;
...
...
src/runtime/classobj.cpp
View file @
28af3827
...
...
@@ -1044,7 +1044,7 @@ static PyObject* half_binop(PyObject* v, PyObject* w, char* opname, binaryfunc t
}
if
(
coerce_obj
==
NULL
)
{
coerce_obj
=
PyString_InternFrom
String
(
"__coerce__"
);
coerce_obj
=
getStatic
String
(
"__coerce__"
);
if
(
coerce_obj
==
NULL
)
return
NULL
;
}
...
...
src/runtime/complex.cpp
View file @
28af3827
...
...
@@ -36,7 +36,7 @@ static PyObject* try_complex_special_method(PyObject* op) noexcept {
static
PyObject
*
complexstr
;
if
(
complexstr
==
NULL
)
{
complexstr
=
PyString_InternFrom
String
(
"__complex__"
);
complexstr
=
getStatic
String
(
"__complex__"
);
if
(
complexstr
==
NULL
)
return
NULL
;
}
...
...
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