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
23ed1a34
Commit
23ed1a34
authored
Aug 16, 2015
by
Boxiang Sun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
some Pyston change to structseq
parent
df3e7ee9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
7 deletions
+9
-7
from_cpython/Include/structseq.h
from_cpython/Include/structseq.h
+7
-5
from_cpython/Objects/structseq.c
from_cpython/Objects/structseq.c
+2
-2
No files found.
from_cpython/Include/structseq.h
View file @
23ed1a34
...
...
@@ -8,14 +8,15 @@
extern
"C"
{
#endif
// Pyston changes: change char* to const char*
typedef
struct
PyStructSequence_Field
{
char
*
name
;
char
*
doc
;
c
onst
c
har
*
name
;
c
onst
c
har
*
doc
;
}
PyStructSequence_Field
;
typedef
struct
PyStructSequence_Desc
{
char
*
name
;
char
*
doc
;
c
onst
c
har
*
name
;
c
onst
c
har
*
doc
;
struct
PyStructSequence_Field
*
fields
;
int
n_in_sequence
;
}
PyStructSequence_Desc
;
...
...
@@ -25,7 +26,8 @@ extern char* PyStructSequence_UnnamedField;
PyAPI_FUNC
(
void
)
PyStructSequence_InitType
(
PyTypeObject
*
type
,
PyStructSequence_Desc
*
desc
)
PYSTON_NOEXCEPT
;
PyAPI_FUNC
(
PyObject
*
)
PyStructSequence_New
(
PyTypeObject
*
type
)
PYSTON_NOEXCEPT
;
// Pyston change, change PyTypeObject to struct _typeobject
PyAPI_FUNC
(
PyObject
*
)
PyStructSequence_New
(
struct
_typeobject
*
type
)
PYSTON_NOEXCEPT
;
typedef
struct
{
PyObject_VAR_HEAD
...
...
from_cpython/Objects/structseq.c
View file @
23ed1a34
...
...
@@ -519,12 +519,12 @@ PyStructSequence_InitType(PyTypeObject *type, PyStructSequence_Desc *desc)
for
(
i
=
k
=
0
;
i
<
n_members
;
++
i
)
{
if
(
desc
->
fields
[
i
].
name
==
PyStructSequence_UnnamedField
)
continue
;
members
[
k
].
name
=
desc
->
fields
[
i
].
name
;
members
[
k
].
name
=
(
char
*
)
desc
->
fields
[
i
].
name
;
members
[
k
].
type
=
T_OBJECT
;
members
[
k
].
offset
=
offsetof
(
PyStructSequence
,
ob_item
)
+
i
*
sizeof
(
PyObject
*
);
members
[
k
].
flags
=
READONLY
;
members
[
k
].
doc
=
desc
->
fields
[
i
].
doc
;
members
[
k
].
doc
=
(
char
*
)
desc
->
fields
[
i
].
doc
;
k
++
;
}
members
[
k
].
name
=
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