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
b60654bc
Commit
b60654bc
authored
Feb 26, 2001
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
The return value from PyObject_ClearWeakRefs() is no longer meaningful,
so make it void.
parent
4f9b13ba
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
9 deletions
+8
-9
Include/object.h
Include/object.h
+1
-1
Modules/_weakref.c
Modules/_weakref.c
+3
-3
Objects/classobject.c
Objects/classobject.c
+1
-2
Objects/object.c
Objects/object.c
+3
-3
No files found.
Include/object.h
View file @
b60654bc
...
...
@@ -284,7 +284,7 @@ extern DL_IMPORT(int) PyCallable_Check(PyObject *);
extern
DL_IMPORT
(
int
)
PyNumber_Coerce
(
PyObject
**
,
PyObject
**
);
extern
DL_IMPORT
(
int
)
PyNumber_CoerceEx
(
PyObject
**
,
PyObject
**
);
extern
DL_IMPORT
(
int
)
(
*
PyObject_ClearWeakRefs
)(
PyObject
*
);
extern
DL_IMPORT
(
void
)
(
*
PyObject_ClearWeakRefs
)(
PyObject
*
);
/* Helpers for printing recursive container types */
extern
DL_IMPORT
(
int
)
Py_ReprEnter
(
PyObject
*
);
...
...
Modules/_weakref.c
View file @
b60654bc
...
...
@@ -692,7 +692,7 @@ weakref_proxy(PyObject *self, PyObject *args)
* until one resurrects the object, at which point it stops invalidating
* weak references and returns false.
*/
static
int
static
cleanup_helper
(
PyObject
*
object
)
{
PyWeakReference
**
list
;
...
...
@@ -702,7 +702,7 @@ cleanup_helper(PyObject *object)
||
object
->
ob_refcnt
!=
0
)
{
PyErr_BadInternalCall
();
/* not sure what we should return here */
return
1
;
return
;
}
list
=
GET_WEAKREFS_LISTPTR
(
object
);
while
(
*
list
!=
NULL
)
{
...
...
@@ -722,7 +722,7 @@ cleanup_helper(PyObject *object)
Py_DECREF
(
callback
);
}
}
return
(
object
->
ob_refcnt
>
0
?
0
:
1
)
;
return
;
}
...
...
Objects/classobject.c
View file @
b60654bc
...
...
@@ -516,8 +516,7 @@ instance_dealloc(register PyInstanceObject *inst)
extern
long
_Py_RefTotal
;
#endif
if
(
!
PyObject_ClearWeakRefs
((
PyObject
*
)
inst
))
return
;
PyObject_ClearWeakRefs
((
PyObject
*
)
inst
);
/* Temporarily resurrect the object. */
#ifdef Py_TRACE_REFS
...
...
Objects/object.c
View file @
b60654bc
...
...
@@ -1475,13 +1475,13 @@ PyObject_Free(void *p)
call site instead of requiring a test for NULL.
*/
static
int
static
void
empty_clear_weak_refs
(
PyObject
*
o
)
{
return
1
;
return
;
}
int
(
*
PyObject_ClearWeakRefs
)(
PyObject
*
)
=
empty_clear_weak_refs
;
void
(
*
PyObject_ClearWeakRefs
)(
PyObject
*
)
=
empty_clear_weak_refs
;
...
...
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