Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kirill Smelkov
ZODB
Commits
18b7f452
Commit
18b7f452
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
b869e112
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
42 deletions
+45
-42
trunk/src/Persistence/cPickleCache.c
trunk/src/Persistence/cPickleCache.c
+15
-14
trunk/src/ZODB/cPickleCache.c
trunk/src/ZODB/cPickleCache.c
+15
-14
trunk/src/persistent/cPickleCache.c
trunk/src/persistent/cPickleCache.c
+15
-14
No files found.
trunk/src/Persistence/cPickleCache.c
View file @
18b7f452
...
@@ -82,7 +82,10 @@
...
@@ -82,7 +82,10 @@
attributions are listed in the accompanying credits file.
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 ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
#define UNLESS(E) if(!(E))
...
@@ -478,7 +481,7 @@ newccobject(PyObject *jar, int cache_size, int cache_age)
...
@@ -478,7 +481,7 @@ newccobject(PyObject *jar, int cache_size, int cache_age)
UNLESS
(
self
=
PyObject_NEW
(
ccobject
,
&
Cctype
))
return
NULL
;
UNLESS
(
self
=
PyObject_NEW
(
ccobject
,
&
Cctype
))
return
NULL
;
self
->
setklassstate
=
self
->
jar
=
NULL
;
self
->
setklassstate
=
self
->
jar
=
NULL
;
if
(
self
->
data
=
PyDict_New
(
))
if
(
(
self
->
data
=
PyDict_New
()
))
{
{
self
->
jar
=
jar
;
self
->
jar
=
jar
;
Py_INCREF
(
jar
);
Py_INCREF
(
jar
);
...
@@ -542,14 +545,13 @@ cc_getattr(ccobject *self, char *name)
...
@@ -542,14 +545,13 @@ cc_getattr(ccobject *self, char *name)
return
self
->
data
;
return
self
->
data
;
}
}
}
}
if
(
if
((
*
name
==
'h'
&&
strcmp
(
name
,
"has_key"
)
==
0
)
||
*
name
==
'h'
&&
strcmp
(
name
,
"has_key"
)
==
0
||
(
*
name
==
'i'
&&
strcmp
(
name
,
"items"
)
==
0
)
||
*
name
==
'i'
&&
strcmp
(
name
,
"items"
)
==
0
||
(
*
name
==
'k'
&&
strcmp
(
name
,
"keys"
)
==
0
)
*
name
==
'k'
&&
strcmp
(
name
,
"keys"
)
==
0
)
)
return
PyObject_GetAttrString
(
self
->
data
,
name
);
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
;
return
r
;
PyErr_Clear
();
PyErr_Clear
();
return
PyObject_GetAttrString
(
self
->
data
,
name
);
return
PyObject_GetAttrString
(
self
->
data
,
name
);
...
@@ -662,7 +664,8 @@ cCM_new(PyObject *self, PyObject *args)
...
@@ -662,7 +664,8 @@ cCM_new(PyObject *self, PyObject *args)
int
cache_size
=
100
,
cache_age
=
1000
;
int
cache_size
=
100
,
cache_age
=
1000
;
PyObject
*
jar
;
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
);
return
(
PyObject
*
)
newccobject
(
jar
,
cache_size
,
cache_age
);
}
}
...
@@ -672,17 +675,17 @@ static struct PyMethodDef cCM_methods[] = {
...
@@ -672,17 +675,17 @@ static struct PyMethodDef cCM_methods[] = {
};
};
void
void
initcPickleCache
()
initcPickleCache
(
void
)
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.3
1
$"
;
char
*
rev
=
"$Revision: 1.3
2
$"
;
Cctype
.
ob_type
=&
PyType_Type
;
Cctype
.
ob_type
=&
PyType_Type
;
UNLESS
(
ExtensionClassImported
)
return
;
UNLESS
(
ExtensionClassImported
)
return
;
m
=
Py_InitModule4
(
"cPickleCache"
,
cCM_methods
,
""
,
m
=
Py_InitModule4
(
"cPickleCache"
,
cCM_methods
,
cPickleCache_doc_string
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
d
=
PyModule_GetDict
(
m
);
...
@@ -692,6 +695,4 @@ initcPickleCache()
...
@@ -692,6 +695,4 @@ initcPickleCache()
PyDict_SetItemString
(
d
,
"__version__"
,
PyDict_SetItemString
(
d
,
"__version__"
,
PyString_FromStringAndSize
(
rev
+
11
,
strlen
(
rev
+
11
)
-
2
));
PyString_FromStringAndSize
(
rev
+
11
,
strlen
(
rev
+
11
)
-
2
));
if
(
PyErr_Occurred
())
Py_FatalError
(
"can't initialize module cCache"
);
}
}
trunk/src/ZODB/cPickleCache.c
View file @
18b7f452
...
@@ -82,7 +82,10 @@
...
@@ -82,7 +82,10 @@
attributions are listed in the accompanying credits file.
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 ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
#define UNLESS(E) if(!(E))
...
@@ -478,7 +481,7 @@ newccobject(PyObject *jar, int cache_size, int cache_age)
...
@@ -478,7 +481,7 @@ newccobject(PyObject *jar, int cache_size, int cache_age)
UNLESS
(
self
=
PyObject_NEW
(
ccobject
,
&
Cctype
))
return
NULL
;
UNLESS
(
self
=
PyObject_NEW
(
ccobject
,
&
Cctype
))
return
NULL
;
self
->
setklassstate
=
self
->
jar
=
NULL
;
self
->
setklassstate
=
self
->
jar
=
NULL
;
if
(
self
->
data
=
PyDict_New
(
))
if
(
(
self
->
data
=
PyDict_New
()
))
{
{
self
->
jar
=
jar
;
self
->
jar
=
jar
;
Py_INCREF
(
jar
);
Py_INCREF
(
jar
);
...
@@ -542,14 +545,13 @@ cc_getattr(ccobject *self, char *name)
...
@@ -542,14 +545,13 @@ cc_getattr(ccobject *self, char *name)
return
self
->
data
;
return
self
->
data
;
}
}
}
}
if
(
if
((
*
name
==
'h'
&&
strcmp
(
name
,
"has_key"
)
==
0
)
||
*
name
==
'h'
&&
strcmp
(
name
,
"has_key"
)
==
0
||
(
*
name
==
'i'
&&
strcmp
(
name
,
"items"
)
==
0
)
||
*
name
==
'i'
&&
strcmp
(
name
,
"items"
)
==
0
||
(
*
name
==
'k'
&&
strcmp
(
name
,
"keys"
)
==
0
)
*
name
==
'k'
&&
strcmp
(
name
,
"keys"
)
==
0
)
)
return
PyObject_GetAttrString
(
self
->
data
,
name
);
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
;
return
r
;
PyErr_Clear
();
PyErr_Clear
();
return
PyObject_GetAttrString
(
self
->
data
,
name
);
return
PyObject_GetAttrString
(
self
->
data
,
name
);
...
@@ -662,7 +664,8 @@ cCM_new(PyObject *self, PyObject *args)
...
@@ -662,7 +664,8 @@ cCM_new(PyObject *self, PyObject *args)
int
cache_size
=
100
,
cache_age
=
1000
;
int
cache_size
=
100
,
cache_age
=
1000
;
PyObject
*
jar
;
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
);
return
(
PyObject
*
)
newccobject
(
jar
,
cache_size
,
cache_age
);
}
}
...
@@ -672,17 +675,17 @@ static struct PyMethodDef cCM_methods[] = {
...
@@ -672,17 +675,17 @@ static struct PyMethodDef cCM_methods[] = {
};
};
void
void
initcPickleCache
()
initcPickleCache
(
void
)
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.3
1
$"
;
char
*
rev
=
"$Revision: 1.3
2
$"
;
Cctype
.
ob_type
=&
PyType_Type
;
Cctype
.
ob_type
=&
PyType_Type
;
UNLESS
(
ExtensionClassImported
)
return
;
UNLESS
(
ExtensionClassImported
)
return
;
m
=
Py_InitModule4
(
"cPickleCache"
,
cCM_methods
,
""
,
m
=
Py_InitModule4
(
"cPickleCache"
,
cCM_methods
,
cPickleCache_doc_string
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
d
=
PyModule_GetDict
(
m
);
...
@@ -692,6 +695,4 @@ initcPickleCache()
...
@@ -692,6 +695,4 @@ initcPickleCache()
PyDict_SetItemString
(
d
,
"__version__"
,
PyDict_SetItemString
(
d
,
"__version__"
,
PyString_FromStringAndSize
(
rev
+
11
,
strlen
(
rev
+
11
)
-
2
));
PyString_FromStringAndSize
(
rev
+
11
,
strlen
(
rev
+
11
)
-
2
));
if
(
PyErr_Occurred
())
Py_FatalError
(
"can't initialize module cCache"
);
}
}
trunk/src/persistent/cPickleCache.c
View file @
18b7f452
...
@@ -82,7 +82,10 @@
...
@@ -82,7 +82,10 @@
attributions are listed in the accompanying credits file.
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 ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
#define UNLESS(E) if(!(E))
...
@@ -478,7 +481,7 @@ newccobject(PyObject *jar, int cache_size, int cache_age)
...
@@ -478,7 +481,7 @@ newccobject(PyObject *jar, int cache_size, int cache_age)
UNLESS
(
self
=
PyObject_NEW
(
ccobject
,
&
Cctype
))
return
NULL
;
UNLESS
(
self
=
PyObject_NEW
(
ccobject
,
&
Cctype
))
return
NULL
;
self
->
setklassstate
=
self
->
jar
=
NULL
;
self
->
setklassstate
=
self
->
jar
=
NULL
;
if
(
self
->
data
=
PyDict_New
(
))
if
(
(
self
->
data
=
PyDict_New
()
))
{
{
self
->
jar
=
jar
;
self
->
jar
=
jar
;
Py_INCREF
(
jar
);
Py_INCREF
(
jar
);
...
@@ -542,14 +545,13 @@ cc_getattr(ccobject *self, char *name)
...
@@ -542,14 +545,13 @@ cc_getattr(ccobject *self, char *name)
return
self
->
data
;
return
self
->
data
;
}
}
}
}
if
(
if
((
*
name
==
'h'
&&
strcmp
(
name
,
"has_key"
)
==
0
)
||
*
name
==
'h'
&&
strcmp
(
name
,
"has_key"
)
==
0
||
(
*
name
==
'i'
&&
strcmp
(
name
,
"items"
)
==
0
)
||
*
name
==
'i'
&&
strcmp
(
name
,
"items"
)
==
0
||
(
*
name
==
'k'
&&
strcmp
(
name
,
"keys"
)
==
0
)
*
name
==
'k'
&&
strcmp
(
name
,
"keys"
)
==
0
)
)
return
PyObject_GetAttrString
(
self
->
data
,
name
);
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
;
return
r
;
PyErr_Clear
();
PyErr_Clear
();
return
PyObject_GetAttrString
(
self
->
data
,
name
);
return
PyObject_GetAttrString
(
self
->
data
,
name
);
...
@@ -662,7 +664,8 @@ cCM_new(PyObject *self, PyObject *args)
...
@@ -662,7 +664,8 @@ cCM_new(PyObject *self, PyObject *args)
int
cache_size
=
100
,
cache_age
=
1000
;
int
cache_size
=
100
,
cache_age
=
1000
;
PyObject
*
jar
;
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
);
return
(
PyObject
*
)
newccobject
(
jar
,
cache_size
,
cache_age
);
}
}
...
@@ -672,17 +675,17 @@ static struct PyMethodDef cCM_methods[] = {
...
@@ -672,17 +675,17 @@ static struct PyMethodDef cCM_methods[] = {
};
};
void
void
initcPickleCache
()
initcPickleCache
(
void
)
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.3
1
$"
;
char
*
rev
=
"$Revision: 1.3
2
$"
;
Cctype
.
ob_type
=&
PyType_Type
;
Cctype
.
ob_type
=&
PyType_Type
;
UNLESS
(
ExtensionClassImported
)
return
;
UNLESS
(
ExtensionClassImported
)
return
;
m
=
Py_InitModule4
(
"cPickleCache"
,
cCM_methods
,
""
,
m
=
Py_InitModule4
(
"cPickleCache"
,
cCM_methods
,
cPickleCache_doc_string
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
d
=
PyModule_GetDict
(
m
);
d
=
PyModule_GetDict
(
m
);
...
@@ -692,6 +695,4 @@ initcPickleCache()
...
@@ -692,6 +695,4 @@ initcPickleCache()
PyDict_SetItemString
(
d
,
"__version__"
,
PyDict_SetItemString
(
d
,
"__version__"
,
PyString_FromStringAndSize
(
rev
+
11
,
strlen
(
rev
+
11
)
-
2
));
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