Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Kirill Smelkov
Zope
Commits
044aba2d
Commit
044aba2d
authored
27 years ago
by
Jim Fulton
Browse files
Options
Download
Email Patches
Plain Diff
Added stupid parens and other changes to make 'gcc -Wall -pedantic'
happy. Got rid of unused macros.
parent
0513b11d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
12 deletions
+14
-12
lib/Components/ExtensionClass/ThreadLock.c
lib/Components/ExtensionClass/ThreadLock.c
+7
-6
lib/Components/ExtensionClass/src/ThreadLock.c
lib/Components/ExtensionClass/src/ThreadLock.c
+7
-6
No files found.
lib/Components/ExtensionClass/ThreadLock.c
View file @
044aba2d
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
static
char
ThreadLock_module_documentation
[]
=
static
char
ThreadLock_module_documentation
[]
=
""
""
"
\n
$Id: ThreadLock.c,v 1.
1
1997/0
4/11 21:44:58
jim Exp $"
"
\n
$Id: ThreadLock.c,v 1.
2
1997/0
7/02 20:21:02
jim Exp $"
;
;
#include "Python.h"
#include "Python.h"
...
@@ -63,10 +63,7 @@ static PyObject *ErrorObject;
...
@@ -63,10 +63,7 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
/* ----------------------------------------------------- */
static
void
PyVar_Assign
(
PyObject
**
v
,
PyObject
*
e
)
{
Py_XDECREF
(
*
v
);
*
v
=
e
;}
#define ASSIGN(V,E) PyVar_Assign(&(V),(E))
#define UNLESS(E) if(!(E))
#define UNLESS(E) if(!(E))
#define UNLESS_ASSIGN(V,E) ASSIGN(V,E); UNLESS(V)
/* Declarations for objects of type ThreadLock */
/* Declarations for objects of type ThreadLock */
...
@@ -189,7 +186,7 @@ ThreadLock_getattr(ThreadLockObject *self, PyObject *name)
...
@@ -189,7 +186,7 @@ ThreadLock_getattr(ThreadLockObject *self, PyObject *name)
{
{
char
*
cname
;
char
*
cname
;
if
(
cname
=
PyString_AsString
(
name
))
if
(
(
cname
=
PyString_AsString
(
name
))
)
{
{
if
(
*
cname
==
'c'
&&
strcmp
(
cname
,
"count"
)
==
0
)
if
(
*
cname
==
'c'
&&
strcmp
(
cname
,
"count"
)
==
0
)
return
PyInt_FromLong
(
self
->
count
);
return
PyInt_FromLong
(
self
->
count
);
...
@@ -275,7 +272,7 @@ void
...
@@ -275,7 +272,7 @@ void
initThreadLock
()
initThreadLock
()
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.
1
$"
;
char
*
rev
=
"$Revision: 1.
2
$"
;
/* Create the module and add the functions */
/* Create the module and add the functions */
m
=
Py_InitModule4
(
"ThreadLock"
,
Module_methods
,
m
=
Py_InitModule4
(
"ThreadLock"
,
Module_methods
,
...
@@ -304,6 +301,10 @@ initThreadLock()
...
@@ -304,6 +301,10 @@ initThreadLock()
Revision Log:
Revision Log:
$Log: ThreadLock.c,v $
$Log: ThreadLock.c,v $
Revision 1.2 1997/07/02 20:21:02 jim
Added stupid parens and other changes to make 'gcc -Wall -pedantic'
happy. Got rid of unused macros.
Revision 1.1 1997/04/11 21:44:58 jim
Revision 1.1 1997/04/11 21:44:58 jim
*** empty log message ***
*** empty log message ***
...
...
This diff is collapsed.
Click to expand it.
lib/Components/ExtensionClass/src/ThreadLock.c
View file @
044aba2d
...
@@ -53,7 +53,7 @@
...
@@ -53,7 +53,7 @@
static
char
ThreadLock_module_documentation
[]
=
static
char
ThreadLock_module_documentation
[]
=
""
""
"
\n
$Id: ThreadLock.c,v 1.
1
1997/0
4/11 21:44:58
jim Exp $"
"
\n
$Id: ThreadLock.c,v 1.
2
1997/0
7/02 20:21:02
jim Exp $"
;
;
#include "Python.h"
#include "Python.h"
...
@@ -63,10 +63,7 @@ static PyObject *ErrorObject;
...
@@ -63,10 +63,7 @@ static PyObject *ErrorObject;
/* ----------------------------------------------------- */
/* ----------------------------------------------------- */
static
void
PyVar_Assign
(
PyObject
**
v
,
PyObject
*
e
)
{
Py_XDECREF
(
*
v
);
*
v
=
e
;}
#define ASSIGN(V,E) PyVar_Assign(&(V),(E))
#define UNLESS(E) if(!(E))
#define UNLESS(E) if(!(E))
#define UNLESS_ASSIGN(V,E) ASSIGN(V,E); UNLESS(V)
/* Declarations for objects of type ThreadLock */
/* Declarations for objects of type ThreadLock */
...
@@ -189,7 +186,7 @@ ThreadLock_getattr(ThreadLockObject *self, PyObject *name)
...
@@ -189,7 +186,7 @@ ThreadLock_getattr(ThreadLockObject *self, PyObject *name)
{
{
char
*
cname
;
char
*
cname
;
if
(
cname
=
PyString_AsString
(
name
))
if
(
(
cname
=
PyString_AsString
(
name
))
)
{
{
if
(
*
cname
==
'c'
&&
strcmp
(
cname
,
"count"
)
==
0
)
if
(
*
cname
==
'c'
&&
strcmp
(
cname
,
"count"
)
==
0
)
return
PyInt_FromLong
(
self
->
count
);
return
PyInt_FromLong
(
self
->
count
);
...
@@ -275,7 +272,7 @@ void
...
@@ -275,7 +272,7 @@ void
initThreadLock
()
initThreadLock
()
{
{
PyObject
*
m
,
*
d
;
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.
1
$"
;
char
*
rev
=
"$Revision: 1.
2
$"
;
/* Create the module and add the functions */
/* Create the module and add the functions */
m
=
Py_InitModule4
(
"ThreadLock"
,
Module_methods
,
m
=
Py_InitModule4
(
"ThreadLock"
,
Module_methods
,
...
@@ -304,6 +301,10 @@ initThreadLock()
...
@@ -304,6 +301,10 @@ initThreadLock()
Revision Log:
Revision Log:
$Log: ThreadLock.c,v $
$Log: ThreadLock.c,v $
Revision 1.2 1997/07/02 20:21:02 jim
Added stupid parens and other changes to make 'gcc -Wall -pedantic'
happy. Got rid of unused macros.
Revision 1.1 1997/04/11 21:44:58 jim
Revision 1.1 1997/04/11 21:44:58 jim
*** empty log message ***
*** empty log message ***
...
...
This diff is collapsed.
Click to expand it.
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