Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
ZEO
Commits
eaa9edfe
Commit
eaa9edfe
authored
Mar 28, 2001
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gcc -Wall satisfaction
add parens and module doc string
parent
d36734ea
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
42 deletions
+45
-42
src/Persistence/cPickleCache.c
src/Persistence/cPickleCache.c
+15
-14
src/ZODB/cPickleCache.c
src/ZODB/cPickleCache.c
+15
-14
src/persistent/cPickleCache.c
src/persistent/cPickleCache.c
+15
-14
No files found.
src/Persistence/cPickleCache.c
View file @
eaa9edfe
...
...
@@ -82,7 +82,10 @@
attributions are listed in the accompanying credits file.
****************************************************************************/
static
char
*
what_string
=
"$Id: cPickleCache.c,v 1.31 1999/10/13 12:35:19 jim Exp $"
;
static
char
cPickleCache_doc_string
[]
=
"Defines the PickleCache used by ZODB Connection objects.
\n
"
"
\n
"
"$Id: cPickleCache.c,v 1.32 2001/03/28 00:35:09 jeremy Exp $
\n
"
;
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
...
...
@@ -478,7 +481,7 @@ newccobject(PyObject *jar, int cache_size, int cache_age)
UNLESS
(
self
=
PyObject_NEW
(
ccobject
,
&
Cctype
))
return
NULL
;
self
->
setklassstate
=
self
->
jar
=
NULL
;
if
(
self
->
data
=
PyDict_New
(
))
if
(
(
self
->
data
=
PyDict_New
()
))
{
self
->
jar
=
jar
;
Py_INCREF
(
jar
);
...
...
@@ -542,14 +545,13 @@ cc_getattr(ccobject *self, char *name)
return
self
->
data
;
}
}
if
(
*
name
==
'h'
&&
strcmp
(
name
,
"has_key"
)
==
0
||
*
name
==
'i'
&&
strcmp
(
name
,
"items"
)
==
0
||
*
name
==
'k'
&&
strcmp
(
name
,
"keys"
)
==
0
if
((
*
name
==
'h'
&&
strcmp
(
name
,
"has_key"
)
==
0
)
||
(
*
name
==
'i'
&&
strcmp
(
name
,
"items"
)
==
0
)
||
(
*
name
==
'k'
&&
strcmp
(
name
,
"keys"
)
==
0
)
)
return
PyObject_GetAttrString
(
self
->
data
,
name
);
if
(
r
=
Py_FindMethod
(
cc_methods
,
(
PyObject
*
)
self
,
name
))
if
(
(
r
=
Py_FindMethod
(
cc_methods
,
(
PyObject
*
)
self
,
name
)
))
return
r
;
PyErr_Clear
();
return
PyObject_GetAttrString
(
self
->
data
,
name
);
...
...
@@ -662,7 +664,8 @@ cCM_new(PyObject *self, PyObject *args)
int
cache_size
=
100
,
cache_age
=
1000
;
PyObject
*
jar
;
UNLESS
(
PyArg_ParseTuple
(
args
,
"O|ii"
,
&
jar
,
&
cache_size
,
&
cache_age
))
return
NULL
;
UNLESS
(
PyArg_ParseTuple
(
args
,
"O|ii"
,
&
jar
,
&
cache_size
,
&
cache_age
))
return
NULL
;
return
(
PyObject
*
)
newccobject
(
jar
,
cache_size
,
cache_age
);
}
...
...
@@ -672,17 +675,17 @@ static struct PyMethodDef cCM_methods[] = {
};
void
initcPickleCache
()
initcPickleCache
(
void
)
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.3
1
$"
;
char
*
rev
=
"$Revision: 1.3
2
$"
;
Cctype
.
ob_type
=&
PyType_Type
;
UNLESS
(
ExtensionClassImported
)
return
;
m
=
Py_InitModule4
(
"cPickleCache"
,
cCM_methods
,
""
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
m
=
Py_InitModule4
(
"cPickleCache"
,
cCM_methods
,
cPickleCache_doc_string
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
...
...
@@ -692,6 +695,4 @@ initcPickleCache()
PyDict_SetItemString
(
d
,
"__version__"
,
PyString_FromStringAndSize
(
rev
+
11
,
strlen
(
rev
+
11
)
-
2
));
if
(
PyErr_Occurred
())
Py_FatalError
(
"can't initialize module cCache"
);
}
src/ZODB/cPickleCache.c
View file @
eaa9edfe
...
...
@@ -82,7 +82,10 @@
attributions are listed in the accompanying credits file.
****************************************************************************/
static
char
*
what_string
=
"$Id: cPickleCache.c,v 1.31 1999/10/13 12:35:19 jim Exp $"
;
static
char
cPickleCache_doc_string
[]
=
"Defines the PickleCache used by ZODB Connection objects.
\n
"
"
\n
"
"$Id: cPickleCache.c,v 1.32 2001/03/28 00:35:09 jeremy Exp $
\n
"
;
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
...
...
@@ -478,7 +481,7 @@ newccobject(PyObject *jar, int cache_size, int cache_age)
UNLESS
(
self
=
PyObject_NEW
(
ccobject
,
&
Cctype
))
return
NULL
;
self
->
setklassstate
=
self
->
jar
=
NULL
;
if
(
self
->
data
=
PyDict_New
(
))
if
(
(
self
->
data
=
PyDict_New
()
))
{
self
->
jar
=
jar
;
Py_INCREF
(
jar
);
...
...
@@ -542,14 +545,13 @@ cc_getattr(ccobject *self, char *name)
return
self
->
data
;
}
}
if
(
*
name
==
'h'
&&
strcmp
(
name
,
"has_key"
)
==
0
||
*
name
==
'i'
&&
strcmp
(
name
,
"items"
)
==
0
||
*
name
==
'k'
&&
strcmp
(
name
,
"keys"
)
==
0
if
((
*
name
==
'h'
&&
strcmp
(
name
,
"has_key"
)
==
0
)
||
(
*
name
==
'i'
&&
strcmp
(
name
,
"items"
)
==
0
)
||
(
*
name
==
'k'
&&
strcmp
(
name
,
"keys"
)
==
0
)
)
return
PyObject_GetAttrString
(
self
->
data
,
name
);
if
(
r
=
Py_FindMethod
(
cc_methods
,
(
PyObject
*
)
self
,
name
))
if
(
(
r
=
Py_FindMethod
(
cc_methods
,
(
PyObject
*
)
self
,
name
)
))
return
r
;
PyErr_Clear
();
return
PyObject_GetAttrString
(
self
->
data
,
name
);
...
...
@@ -662,7 +664,8 @@ cCM_new(PyObject *self, PyObject *args)
int
cache_size
=
100
,
cache_age
=
1000
;
PyObject
*
jar
;
UNLESS
(
PyArg_ParseTuple
(
args
,
"O|ii"
,
&
jar
,
&
cache_size
,
&
cache_age
))
return
NULL
;
UNLESS
(
PyArg_ParseTuple
(
args
,
"O|ii"
,
&
jar
,
&
cache_size
,
&
cache_age
))
return
NULL
;
return
(
PyObject
*
)
newccobject
(
jar
,
cache_size
,
cache_age
);
}
...
...
@@ -672,17 +675,17 @@ static struct PyMethodDef cCM_methods[] = {
};
void
initcPickleCache
()
initcPickleCache
(
void
)
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.3
1
$"
;
char
*
rev
=
"$Revision: 1.3
2
$"
;
Cctype
.
ob_type
=&
PyType_Type
;
UNLESS
(
ExtensionClassImported
)
return
;
m
=
Py_InitModule4
(
"cPickleCache"
,
cCM_methods
,
""
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
m
=
Py_InitModule4
(
"cPickleCache"
,
cCM_methods
,
cPickleCache_doc_string
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
...
...
@@ -692,6 +695,4 @@ initcPickleCache()
PyDict_SetItemString
(
d
,
"__version__"
,
PyString_FromStringAndSize
(
rev
+
11
,
strlen
(
rev
+
11
)
-
2
));
if
(
PyErr_Occurred
())
Py_FatalError
(
"can't initialize module cCache"
);
}
src/persistent/cPickleCache.c
View file @
eaa9edfe
...
...
@@ -82,7 +82,10 @@
attributions are listed in the accompanying credits file.
****************************************************************************/
static
char
*
what_string
=
"$Id: cPickleCache.c,v 1.31 1999/10/13 12:35:19 jim Exp $"
;
static
char
cPickleCache_doc_string
[]
=
"Defines the PickleCache used by ZODB Connection objects.
\n
"
"
\n
"
"$Id: cPickleCache.c,v 1.32 2001/03/28 00:35:09 jeremy Exp $
\n
"
;
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
...
...
@@ -478,7 +481,7 @@ newccobject(PyObject *jar, int cache_size, int cache_age)
UNLESS
(
self
=
PyObject_NEW
(
ccobject
,
&
Cctype
))
return
NULL
;
self
->
setklassstate
=
self
->
jar
=
NULL
;
if
(
self
->
data
=
PyDict_New
(
))
if
(
(
self
->
data
=
PyDict_New
()
))
{
self
->
jar
=
jar
;
Py_INCREF
(
jar
);
...
...
@@ -542,14 +545,13 @@ cc_getattr(ccobject *self, char *name)
return
self
->
data
;
}
}
if
(
*
name
==
'h'
&&
strcmp
(
name
,
"has_key"
)
==
0
||
*
name
==
'i'
&&
strcmp
(
name
,
"items"
)
==
0
||
*
name
==
'k'
&&
strcmp
(
name
,
"keys"
)
==
0
if
((
*
name
==
'h'
&&
strcmp
(
name
,
"has_key"
)
==
0
)
||
(
*
name
==
'i'
&&
strcmp
(
name
,
"items"
)
==
0
)
||
(
*
name
==
'k'
&&
strcmp
(
name
,
"keys"
)
==
0
)
)
return
PyObject_GetAttrString
(
self
->
data
,
name
);
if
(
r
=
Py_FindMethod
(
cc_methods
,
(
PyObject
*
)
self
,
name
))
if
(
(
r
=
Py_FindMethod
(
cc_methods
,
(
PyObject
*
)
self
,
name
)
))
return
r
;
PyErr_Clear
();
return
PyObject_GetAttrString
(
self
->
data
,
name
);
...
...
@@ -662,7 +664,8 @@ cCM_new(PyObject *self, PyObject *args)
int
cache_size
=
100
,
cache_age
=
1000
;
PyObject
*
jar
;
UNLESS
(
PyArg_ParseTuple
(
args
,
"O|ii"
,
&
jar
,
&
cache_size
,
&
cache_age
))
return
NULL
;
UNLESS
(
PyArg_ParseTuple
(
args
,
"O|ii"
,
&
jar
,
&
cache_size
,
&
cache_age
))
return
NULL
;
return
(
PyObject
*
)
newccobject
(
jar
,
cache_size
,
cache_age
);
}
...
...
@@ -672,17 +675,17 @@ static struct PyMethodDef cCM_methods[] = {
};
void
initcPickleCache
()
initcPickleCache
(
void
)
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.3
1
$"
;
char
*
rev
=
"$Revision: 1.3
2
$"
;
Cctype
.
ob_type
=&
PyType_Type
;
UNLESS
(
ExtensionClassImported
)
return
;
m
=
Py_InitModule4
(
"cPickleCache"
,
cCM_methods
,
""
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
m
=
Py_InitModule4
(
"cPickleCache"
,
cCM_methods
,
cPickleCache_doc_string
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
...
...
@@ -692,6 +695,4 @@ initcPickleCache()
PyDict_SetItemString
(
d
,
"__version__"
,
PyString_FromStringAndSize
(
rev
+
11
,
strlen
(
rev
+
11
)
-
2
));
if
(
PyErr_Occurred
())
Py_FatalError
(
"can't initialize module cCache"
);
}
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