Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
d49cb7ca
Commit
d49cb7ca
authored
Dec 26, 2000
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed memory leak affecting methods (and other bindable attributes) of
(dynamic) classes. Updated copyright date.
parent
3b37a997
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
8 deletions
+12
-8
lib/Components/ExtensionClass/ExtensionClass.c
lib/Components/ExtensionClass/ExtensionClass.c
+6
-4
lib/Components/ExtensionClass/src/ExtensionClass.c
lib/Components/ExtensionClass/src/ExtensionClass.c
+6
-4
No files found.
lib/Components/ExtensionClass/ExtensionClass.c
View file @
d49cb7ca
/*
Copyright (c) 1996-
1998
, Digital Creations, Fredericksburg, VA, USA.
Copyright (c) 1996-
2000
, Digital Creations, Fredericksburg, VA, USA.
All rights reserved.
Redistribution and use in source and binary forms, with or without
...
...
@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
$Id: ExtensionClass.c,v 1.4
0 2000/11/04 16:18:56
jim Exp $
$Id: ExtensionClass.c,v 1.4
1 2000/12/26 15:20:23
jim Exp $
If you have questions regarding this software,
contact:
...
...
@@ -54,7 +54,7 @@ static char ExtensionClass_module_documentation[] =
" - They provide access to unbound methods,
\n
"
" - They can be called to create instances.
\n
"
"
\n
"
"$Id: ExtensionClass.c,v 1.4
0 2000/11/04 16:18:56
jim Exp $
\n
"
"$Id: ExtensionClass.c,v 1.4
1 2000/12/26 15:20:23
jim Exp $
\n
"
;
#include <stdio.h>
...
...
@@ -704,6 +704,7 @@ bindPMethod(PMethod *m, PyObject *inst)
Py_INCREF
(
inst
);
Py_INCREF
(
m
->
type
);
Py_INCREF
(
m
->
meth
);
self
->
type
=
m
->
type
;
self
->
self
=
inst
;
self
->
meth
=
m
->
meth
;
...
...
@@ -733,6 +734,7 @@ PMethod_dealloc(PMethod *self)
#endif
Py_XDECREF
(
self
->
type
);
Py_XDECREF
(
self
->
self
);
Py_XDECREF
(
self
->
meth
);
self
->
self
=
(
PyObject
*
)
freePMethod
;
freePMethod
=
self
;
#ifdef TRACE_DEALLOC
...
...
@@ -3521,7 +3523,7 @@ void
initExtensionClass
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.4
0
$"
;
char
*
rev
=
"$Revision: 1.4
1
$"
;
PURE_MIXIN_CLASS
(
Base
,
"Minimalbase class for Extension Classes"
,
NULL
);
PMethodType
.
ob_type
=&
PyType_Type
;
...
...
lib/Components/ExtensionClass/src/ExtensionClass.c
View file @
d49cb7ca
/*
Copyright (c) 1996-
1998
, Digital Creations, Fredericksburg, VA, USA.
Copyright (c) 1996-
2000
, Digital Creations, Fredericksburg, VA, USA.
All rights reserved.
Redistribution and use in source and binary forms, with or without
...
...
@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
$Id: ExtensionClass.c,v 1.4
0 2000/11/04 16:18:56
jim Exp $
$Id: ExtensionClass.c,v 1.4
1 2000/12/26 15:20:23
jim Exp $
If you have questions regarding this software,
contact:
...
...
@@ -54,7 +54,7 @@ static char ExtensionClass_module_documentation[] =
" - They provide access to unbound methods,
\n
"
" - They can be called to create instances.
\n
"
"
\n
"
"$Id: ExtensionClass.c,v 1.4
0 2000/11/04 16:18:56
jim Exp $
\n
"
"$Id: ExtensionClass.c,v 1.4
1 2000/12/26 15:20:23
jim Exp $
\n
"
;
#include <stdio.h>
...
...
@@ -704,6 +704,7 @@ bindPMethod(PMethod *m, PyObject *inst)
Py_INCREF
(
inst
);
Py_INCREF
(
m
->
type
);
Py_INCREF
(
m
->
meth
);
self
->
type
=
m
->
type
;
self
->
self
=
inst
;
self
->
meth
=
m
->
meth
;
...
...
@@ -733,6 +734,7 @@ PMethod_dealloc(PMethod *self)
#endif
Py_XDECREF
(
self
->
type
);
Py_XDECREF
(
self
->
self
);
Py_XDECREF
(
self
->
meth
);
self
->
self
=
(
PyObject
*
)
freePMethod
;
freePMethod
=
self
;
#ifdef TRACE_DEALLOC
...
...
@@ -3521,7 +3523,7 @@ void
initExtensionClass
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.4
0
$"
;
char
*
rev
=
"$Revision: 1.4
1
$"
;
PURE_MIXIN_CLASS
(
Base
,
"Minimalbase class for Extension Classes"
,
NULL
);
PMethodType
.
ob_type
=&
PyType_Type
;
...
...
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