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
0ff02f27
Commit
0ff02f27
authored
Aug 04, 2000
by
Moshe Zadka
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removing warnings found by gcc -Wall
parent
ad56a378
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
4 deletions
+9
-4
Objects/bufferobject.c
Objects/bufferobject.c
+5
-4
Objects/object.c
Objects/object.c
+4
-0
No files found.
Objects/bufferobject.c
View file @
0ff02f27
...
...
@@ -141,6 +141,7 @@ PyBuffer_FromReadWriteMemory(void *ptr, int size)
PyObject
*
PyBuffer_New
(
int
size
)
{
PyObject
*
o
;
PyBufferObject
*
b
;
if
(
size
<
0
)
{
...
...
@@ -149,10 +150,10 @@ PyBuffer_New(int size)
return
NULL
;
}
/* PyObject_New is inlined */
b
=
(
PyBufferObject
*
)
PyObject_MALLOC
(
sizeof
(
*
b
)
+
size
);
if
(
b
==
NULL
)
o
=
PyObject_MALLOC
(
sizeof
(
*
b
)
+
size
);
if
(
o
==
NULL
)
return
PyErr_NoMemory
();
PyObject_INIT
((
PyObject
*
)
b
,
&
PyBuffer_Type
);
b
=
(
PyBufferObject
*
)
PyObject_INIT
(
o
,
&
PyBuffer_Type
);
b
->
b_base
=
NULL
;
b
->
b_ptr
=
(
void
*
)(
b
+
1
);
...
...
@@ -162,7 +163,7 @@ PyBuffer_New(int size)
b
->
b_hash
=
-
1
;
#endif
return
(
PyObject
*
)
b
;
return
o
;
}
/* Methods */
...
...
Objects/object.c
View file @
0ff02f27
...
...
@@ -1123,6 +1123,10 @@ _PyTrash_deposit_object(PyObject *op)
typecode
=
Py_TRASHCAN_FRAME
;
else
if
(
PyTraceBack_Check
(
op
))
typecode
=
Py_TRASHCAN_TRACEBACK
;
else
/* We have a bug here -- those are the only types in GC */
{
Py_FatalError
(
"Type not supported in GC -- internal bug"
);
return
;
/* pacify compiler -- execution never here */
}
op
->
ob_refcnt
=
typecode
;
op
->
ob_type
=
(
PyTypeObject
*
)
_PyTrash_delete_later
;
...
...
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