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
0b900229
Commit
0b900229
authored
Mar 28, 2001
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gcc -Wall cleanup
- make function decls prototypes - remove unreferenced functions
parent
464858e1
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
31 additions
and
82 deletions
+31
-82
lib/Components/ExtensionClass/src/Acquisition.c
lib/Components/ExtensionClass/src/Acquisition.c
+5
-5
lib/Components/ExtensionClass/src/ExtensionClass.c
lib/Components/ExtensionClass/src/ExtensionClass.c
+5
-59
lib/Components/ExtensionClass/src/MethodObject.c
lib/Components/ExtensionClass/src/MethodObject.c
+4
-4
lib/Components/ExtensionClass/src/Missing.c
lib/Components/ExtensionClass/src/Missing.c
+9
-4
lib/Components/ExtensionClass/src/MultiMapping.c
lib/Components/ExtensionClass/src/MultiMapping.c
+4
-4
lib/Components/ExtensionClass/src/Sync.c
lib/Components/ExtensionClass/src/Sync.c
+4
-6
No files found.
lib/Components/ExtensionClass/src/Acquisition.c
View file @
0b900229
...
...
@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
$Id: Acquisition.c,v 1.5
0 2001/03/27 03:36:30 brian
Exp $
$Id: Acquisition.c,v 1.5
1 2001/03/28 14:06:50 jeremy
Exp $
If you have questions regarding this software,
contact:
...
...
@@ -70,7 +70,7 @@ static PyObject *py__add__, *py__sub__, *py__mul__, *py__div__,
static
PyObject
*
Acquired
=
0
;
static
void
init_py_names
()
init_py_names
(
void
)
{
#define INIT_PY_NAME(N) py ## N = PyString_FromString(#N)
INIT_PY_NAME
(
__add__
);
...
...
@@ -1424,10 +1424,10 @@ static struct PyMethodDef methods[] = {
};
void
initAcquisition
()
initAcquisition
(
void
)
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.5
0
$"
;
char
*
rev
=
"$Revision: 1.5
1
$"
;
PURE_MIXIN_CLASS
(
Acquirer
,
"Base class for objects that implicitly"
" acquire attributes from containers
\n
"
...
...
@@ -1446,7 +1446,7 @@ initAcquisition()
/* Create the module and add the functions */
m
=
Py_InitModule4
(
"Acquisition"
,
methods
,
"Provide base classes for acquiring objects
\n\n
"
"$Id: Acquisition.c,v 1.5
0 2001/03/27 03:36:30 brian
Exp $
\n
"
,
"$Id: Acquisition.c,v 1.5
1 2001/03/28 14:06:50 jeremy
Exp $
\n
"
,
OBJECT
(
NULL
),
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
...
...
lib/Components/ExtensionClass/src/ExtensionClass.c
View file @
0b900229
...
...
@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
$Id: ExtensionClass.c,v 1.4
5 2001/03/27 21:09:4
0 jeremy Exp $
$Id: ExtensionClass.c,v 1.4
6 2001/03/28 14:06:5
0 jeremy 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
5 2001/03/27 21:09:4
0 jeremy Exp $
\n
"
"$Id: ExtensionClass.c,v 1.4
6 2001/03/28 14:06:5
0 jeremy Exp $
\n
"
;
#include <stdio.h>
...
...
@@ -622,24 +622,6 @@ CMethod_getattro(CMethod *self, PyObject *oname)
return
NULL
;
}
static
int
CMethod_setattro
(
CMethod
*
self
,
PyObject
*
oname
,
PyObject
*
v
)
{
int
r
;
if
(
self
->
self
&&
!
PyEval_GetRestricted
())
/* Psuedo attributes */
{
UNLESS
(
oname
=
Py_BuildValue
(
"sO"
,
self
->
name
,
oname
))
return
-
1
;
UNLESS_ASSIGN
(
oname
,
PyString_Format
(
concat_fmt
,
oname
))
return
-
1
;
r
=
PyObject_SetAttr
(
self
->
self
,
oname
,
v
);
Py_DECREF
(
oname
);
return
r
;
}
PyErr_SetObject
(
PyExc_AttributeError
,
oname
);
return
-
1
;
}
static
PyTypeObject
CMethodType
=
{
PyObject_HEAD_INIT
(
NULL
)
0
,
/*ob_size*/
...
...
@@ -660,7 +642,7 @@ static PyTypeObject CMethodType = {
(
ternaryfunc
)
CMethod_call
,
/*tp_call*/
(
reprfunc
)
0
,
/*tp_str*/
(
getattrofunc
)
CMethod_getattro
,
/* tp_getattro */
(
setattrofunc
)
0
/*CMethod_setattro*/
,
/* tp_setattro */
(
setattrofunc
)
0
,
/* tp_setattro */
/* Space for future expansion */
0L
,
0L
,
...
...
@@ -940,42 +922,6 @@ PMethod_getattro(PMethod *self, PyObject *oname)
return
PyObject_GetAttr
(
self
->
meth
,
oname
);
}
static
int
PMethod_setattro
(
PMethod
*
self
,
PyObject
*
oname
,
PyObject
*
v
)
{
int
r
;
PyObject
*
spam
;
if
(
self
->
meth
)
{
if
((
spam
=
PyObject_GetAttr
(
self
->
meth
,
oname
)))
{
Py_DECREF
(
spam
);
PyErr_SetString
(
PyExc_TypeError
,
"Attempt to overwrite shared method attribute"
);
return
-
1
;
}
else
PyErr_Clear
();
if
(
self
->
self
&&
!
PyEval_GetRestricted
())
/* Psuedo attrs */
{
PyObject
*
myname
;
UNLESS
(
myname
=
PyObject_GetAttr
(
self
->
meth
,
py__name__
))
return
-
1
;
oname
=
Py_BuildValue
(
"OO"
,
myname
,
oname
);
Py_DECREF
(
myname
);
UNLESS
(
oname
)
return
-
1
;
UNLESS_ASSIGN
(
oname
,
PyString_Format
(
concat_fmt
,
oname
))
return
-
1
;
r
=
PyObject_SetAttr
(
self
->
self
,
oname
,
v
);
Py_DECREF
(
oname
);
return
r
;
}
}
PyErr_SetObject
(
PyExc_AttributeError
,
oname
);
return
-
1
;
}
static
PyTypeObject
PMethodType
=
{
PyObject_HEAD_INIT
(
NULL
)
0
,
/*ob_size*/
...
...
@@ -996,7 +942,7 @@ static PyTypeObject PMethodType = {
(
ternaryfunc
)
PMethod_call
,
/*tp_call*/
(
reprfunc
)
0
,
/*tp_str*/
(
getattrofunc
)
PMethod_getattro
,
/*tp_getattro*/
(
setattrofunc
)
0
/*PMethod_setattro*/
,
/* tp_setattro */
(
setattrofunc
)
0
,
/* tp_setattro */
/* Space for future expansion */
0L
,
0L
,
...
...
@@ -3530,7 +3476,7 @@ void
initExtensionClass
(
void
)
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.4
5
$"
;
char
*
rev
=
"$Revision: 1.4
6
$"
;
PURE_MIXIN_CLASS
(
Base
,
"Minimalbase class for Extension Classes"
,
NULL
);
PMethodType
.
ob_type
=&
PyType_Type
;
...
...
lib/Components/ExtensionClass/src/MethodObject.c
View file @
0b900229
...
...
@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
$Id: MethodObject.c,v 1.
5 1998/11/17 19:50:20 jim
Exp $
$Id: MethodObject.c,v 1.
6 2001/03/28 14:06:51 jeremy
Exp $
If you have questions regarding this software,
contact:
...
...
@@ -64,10 +64,10 @@ struct PyMethodDef Method_methods[] = {
static
struct
PyMethodDef
methods
[]
=
{{
NULL
,
NULL
}};
void
initMethodObject
()
initMethodObject
(
void
)
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.
5
$"
;
char
*
rev
=
"$Revision: 1.
6
$"
;
PURE_MIXIN_CLASS
(
Method
,
"Base class for objects that want to be treated as methods
\n
"
"
\n
"
...
...
@@ -83,7 +83,7 @@ initMethodObject()
/* Create the module and add the functions */
m
=
Py_InitModule4
(
"MethodObject"
,
methods
,
"Method-object mix-in class module
\n\n
"
"$Id: MethodObject.c,v 1.
5 1998/11/17 19:50:20 jim
Exp $
\n
"
,
"$Id: MethodObject.c,v 1.
6 2001/03/28 14:06:51 jeremy
Exp $
\n
"
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
...
...
lib/Components/ExtensionClass/src/Missing.c
View file @
0b900229
...
...
@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
$Id: Missing.c,v 1.1
0 1999/08/25 20:15:29 jim
Exp $
$Id: Missing.c,v 1.1
1 2001/03/28 14:06:51 jeremy
Exp $
If you have questions regarding this software,
contact:
...
...
@@ -47,7 +47,7 @@
static
char
Missing_module_documentation
[]
=
""
"
\n
$Id: Missing.c,v 1.1
0 1999/08/25 20:15:29 jim
Exp $"
"
\n
$Id: Missing.c,v 1.1
1 2001/03/28 14:06:51 jeremy
Exp $"
;
#include <string.h>
...
...
@@ -301,10 +301,10 @@ static struct PyMethodDef Module_Level__methods[] = {
};
void
initMissing
()
initMissing
(
void
)
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.1
0
$"
;
char
*
rev
=
"$Revision: 1.1
1
$"
;
if
(
!
((
vname
=
PyString_FromString
(
"V"
))
&&
(
Missing_dot_Value
=
PyString_FromString
(
"Missing.Value"
))
...
...
@@ -340,6 +340,11 @@ initMissing()
Revision Log:
$Log: Missing.c,v $
Revision 1.11 2001/03/28 14:06:51 jeremy
gcc -Wall cleanup
- make function decls prototypes
- remove unreferenced functions
Revision 1.10 1999/08/25 20:15:29 jim
Made getattr a bit pickler to prevent getting attributes like "%f5.3".
...
...
lib/Components/ExtensionClass/src/MultiMapping.c
View file @
0b900229
...
...
@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
$Id: MultiMapping.c,v 1.
8 1999/06/10 20:10:46 jim
Exp $
$Id: MultiMapping.c,v 1.
9 2001/03/28 14:06:51 jeremy
Exp $
If you have questions regarding this software,
contact:
...
...
@@ -231,16 +231,16 @@ static struct PyMethodDef MultiMapping_methods[] = {
};
void
initMultiMapping
()
initMultiMapping
(
void
)
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.
8
$"
;
char
*
rev
=
"$Revision: 1.
9
$"
;
m
=
Py_InitModule4
(
"MultiMapping"
,
MultiMapping_methods
,
"MultiMapping -- Wrap multiple mapping objects for lookup"
"
\n\n
"
"$Id: MultiMapping.c,v 1.
8 1999/06/10 20:10:46 jim
Exp $
\n
"
,
"$Id: MultiMapping.c,v 1.
9 2001/03/28 14:06:51 jeremy
Exp $
\n
"
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
PyExtensionClass_Export
(
d
,
"MultiMapping"
,
MMtype
);
...
...
lib/Components/ExtensionClass/src/Sync.c
View file @
0b900229
...
...
@@ -33,7 +33,7 @@
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
$Id: Sync.c,v 1.
2 1998/11/17 20:22:34 jim
Exp $
$Id: Sync.c,v 1.
3 2001/03/28 14:06:51 jeremy
Exp $
If you have questions regarding this software,
contact:
...
...
@@ -47,13 +47,11 @@
static
char
Sync_module_documentation
[]
=
""
"
\n
$Id: Sync.c,v 1.
2 1998/11/17 20:22:34 jim
Exp $"
"
\n
$Id: Sync.c,v 1.
3 2001/03/28 14:06:51 jeremy
Exp $"
;
#include "ExtensionClass.h"
static
PyObject
*
ErrorObject
;
/* ----------------------------------------------------- */
static
void
PyVar_Assign
(
PyObject
**
v
,
PyObject
*
e
)
{
Py_XDECREF
(
*
v
);
*
v
=
e
;}
...
...
@@ -113,10 +111,10 @@ static struct PyMethodDef Module_Level__methods[] = {
};
void
initSync
()
initSync
(
void
)
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.
2
$"
;
char
*
rev
=
"$Revision: 1.
3
$"
;
PURE_MIXIN_CLASS
(
Synchronized
,
"Mix-in class that provides synchonization of method calls
\n
"
...
...
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