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
a2cb98ae
Commit
a2cb98ae
authored
Nov 17, 1998
by
Jim Fulton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new copyright.
parent
5a9a8a1a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
208 additions
and
342 deletions
+208
-342
lib/Components/ExtensionClass/Sync.c
lib/Components/ExtensionClass/Sync.c
+57
-82
lib/Components/ExtensionClass/ThreadLock.c
lib/Components/ExtensionClass/ThreadLock.c
+47
-89
lib/Components/ExtensionClass/src/Sync.c
lib/Components/ExtensionClass/src/Sync.c
+57
-82
lib/Components/ExtensionClass/src/ThreadLock.c
lib/Components/ExtensionClass/src/ThreadLock.c
+47
-89
No files found.
lib/Components/ExtensionClass/Sync.c
View file @
a2cb98ae
/***********************************************************
Copyright
Copyright 1997 Digital Creations, L.L.C., 910 Princess Anne
Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All
rights reserved. Copyright in this software is owned by DCLC,
unless otherwise indicated. Note that any product, process or
technology described in this software may be the subject of
other Intellectual Property rights reserved by Digital
Creations, L.C. and are not licensed hereunder.
Trademarks
Digital Creations & DCLC, are trademarks of Digital Creations, L.C..
All other trademarks are owned by their respective companies.
No Warranty
The software is provided "as is" without warranty of any kind,
either express or implied, including, but not limited to, the
implied warranties of merchantability, fitness for a particular
purpose, or non-infringement. This software could include
technical inaccuracies or typographical errors. Changes are
periodically made to the software; these changes will be
incorporated in new editions of the software. DCLC may make
improvements and/or changes in this software at any time
without notice.
Limitation Of Liability
In no event will DCLC be liable for direct, indirect, special,
incidental, economic, cover, or consequential damages arising
out of the use of or inability to use this software even if
advised of the possibility of such damages. Some states do not
allow the exclusion or limitation of implied warranties or
limitation of liability for incidental or consequential
damages, so the above limitation or exclusion may not apply to
you.
If you have questions regarding this software,
contact:
Digital Creations L.L.C.
info@digicool.com
(540) 371-6909
******************************************************************/
/*
Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
o Redistributions of source code must retain the above copyright
notice, this list of conditions, and the disclaimer that follows.
o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
o Neither the name of Digital Creations nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS
IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL
CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
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 $
If you have questions regarding this software,
contact:
Digital Creations L.C.
info@digicool.com
(540) 371-6909
*/
static
char
Sync_module_documentation
[]
=
""
"
\n
$Id: Sync.c,v 1.
1 1997/09/18 20:36:37
jim Exp $"
"
\n
$Id: Sync.c,v 1.
2 1998/11/17 20:22:34
jim Exp $"
;
#include "ExtensionClass.h"
...
...
@@ -107,29 +105,25 @@ static struct PyMethodDef Synchronized_methods[] = {
{
"__call_method__"
,
(
PyCFunction
)
Synchronized___call_method__
,
METH_VARARGS
,
"Call a method by first getting a thread lock"
},
{
NULL
,
NULL
}
/* sentinel */
{
NULL
,
NULL
}
};
/* List of methods defined in the module */
static
struct
PyMethodDef
Module_Level__methods
[]
=
{
{
NULL
,
(
PyCFunction
)
NULL
,
0
,
NULL
}
/* sentinel */
static
struct
PyMethodDef
Module_Level__methods
[]
=
{
{
NULL
,
(
PyCFunction
)
NULL
,
0
,
NULL
}
};
/* Initialization function for the module (*must* be called initSync) */
void
initSync
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.1 $"
;
PURE_MIXIN_CLASS
(
Synchronized
,
"Mix-in class that provides synchonization of method calls
\n
"
"
\n
"
"Only one thread is allowed to call a synchronized
\n
"
"object's methods.
\n
"
,
Synchronized_methods
);
char
*
rev
=
"$Revision: 1.2 $"
;
PURE_MIXIN_CLASS
(
Synchronized
,
"Mix-in class that provides synchonization of method calls
\n
"
"
\n
"
"Only one thread is allowed to call a synchronized
\n
"
"object's methods.
\n
"
,
Synchronized_methods
);
UNLESS
((
lockstr
=
PyString_FromString
(
"_sync__lock"
))
&&
(
aqstr
=
PyString_FromString
(
"acquire"
))
&&
...
...
@@ -140,33 +134,14 @@ initSync()
ASSIGN
(
newlock
,
PyObject_GetAttrString
(
newlock
,
"allocate_lock"
));
UNLESS
(
newlock
)
return
;
/* Create the module and add the functions */
m
=
Py_InitModule4
(
"Sync"
,
Module_Level__methods
,
Sync_module_documentation
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
/* Add some symbolic constants to the module */
d
=
PyModule_GetDict
(
m
);
PyExtensionClass_Export
(
d
,
"Synchronized"
,
SynchronizedType
);
PyDict_SetItemString
(
d
,
"__version__"
,
PyString_FromStringAndSize
(
rev
+
11
,
strlen
(
rev
+
11
)
-
2
));
/* Check for errors */
CHECK_FOR_ERRORS
(
"can't initialize module MethodObject"
);
}
/*****************************************************************************
Revision Log:
$Log: Sync.c,v $
Revision 1.1 1997/09/18 20:36:37 jim
*** empty log message ***
$Revision 1.2 1997/06/21 15:22:03 jim
$Removed "object" suffix from generates C type names
$
$Revision 1.1 1997/02/24 23:25:42 jim
$initial
$
*****************************************************************************/
lib/Components/ExtensionClass/ThreadLock.c
View file @
a2cb98ae
/***********************************************************
Copyright
Copyright 1997 Digital Creations, L.L.C., 910 Princess Anne
Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All
rights reserved. Copyright in this software is owned by DCLC,
unless otherwise indicated. Permission to use, copy and
distribute this software is hereby granted, provided that the
above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear. Note that
any product, process or technology described in this software
may be the subject of other Intellectual Property rights
reserved by Digital Creations, L.C. and are not licensed
hereunder.
Trademarks
Digital Creations & DCLC, are trademarks of Digital Creations, L.C..
All other trademarks are owned by their respective companies.
No Warranty
The software is provided "as is" without warranty of any kind,
either express or implied, including, but not limited to, the
implied warranties of merchantability, fitness for a particular
purpose, or non-infringement. This software could include
technical inaccuracies or typographical errors. Changes are
periodically made to the software; these changes will be
incorporated in new editions of the software. DCLC may make
improvements and/or changes in this software at any time
without notice.
Limitation Of Liability
In no event will DCLC be liable for direct, indirect, special,
incidental, economic, cover, or consequential damages arising
out of the use of or inability to use this software even if
advised of the possibility of such damages. Some states do not
allow the exclusion or limitation of implied warranties or
limitation of liability for incidental or consequential
damages, so the above limitation or exclusion may not apply to
you.
If you have questions regarding this software,
contact:
Digital Creations L.L.C.
info@digicool.com
(540) 371-6909
******************************************************************/
/*
Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
o Redistributions of source code must retain the above copyright
notice, this list of conditions, and the disclaimer that follows.
o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
o Neither the name of Digital Creations nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS
IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL
CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
$Id: ThreadLock.c,v 1.4 1998/11/17 20:23:42 jim Exp $
If you have questions regarding this software,
contact:
Digital Creations L.C.
info@digicool.com
(540) 371-6909
*/
static
char
ThreadLock_module_documentation
[]
=
""
"
\n
$Id: ThreadLock.c,v 1.
3 1997/10/30 15:29:21
jim Exp $"
"
\n
$Id: ThreadLock.c,v 1.
4 1998/11/17 20:23:42
jim Exp $"
;
#include "Python.h"
...
...
@@ -80,8 +73,6 @@ typedef struct {
staticforward
PyTypeObject
ThreadLockType
;
/* ---------------------------------------------------------------- */
static
int
cacquire
(
ThreadLockObject
*
self
)
{
...
...
@@ -187,9 +178,6 @@ static struct PyMethodDef ThreadLock_methods[] = {
{
NULL
,
NULL
}
/* sentinel */
};
/* ---------- */
static
void
ThreadLock_dealloc
(
ThreadLockObject
*
self
)
{
...
...
@@ -247,9 +235,6 @@ static PyTypeObject ThreadLockType = {
"This is useful for locking instances in possibly nested method calls
\n
"
};
/* End of code for ThreadLock objects */
/* -------------------------------------------------------- */
static
PyObject
*
newThreadLockObject
(
ThreadLockObject
*
self
,
PyObject
*
args
)
{
...
...
@@ -278,8 +263,6 @@ ident(PyObject *self, PyObject *args)
#endif
}
/* List of methods defined in the module */
static
struct
PyMethodDef
Module_methods
[]
=
{
{
"allocate_lock"
,
(
PyCFunction
)
newThreadLockObject
,
1
,
"allocate_lock() -- Return a new lock object"
...
...
@@ -290,20 +273,16 @@ static struct PyMethodDef Module_methods[] = {
{
NULL
,
(
PyCFunction
)
NULL
,
0
,
NULL
}
/* sentinel */
};
/* Initialization function for the module (*must* be called initThreadLock) */
void
initThreadLock
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.
3
$"
;
char
*
rev
=
"$Revision: 1.
4
$"
;
/* Create the module and add the functions */
m
=
Py_InitModule4
(
"ThreadLock"
,
Module_methods
,
ThreadLock_module_documentation
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
/* Add some symbolic constants to the module */
d
=
PyModule_GetDict
(
m
);
ThreadLockType
.
ob_type
=&
PyType_Type
;
...
...
@@ -325,24 +304,3 @@ initThreadLock()
if
(
PyErr_Occurred
())
Py_FatalError
(
"can't initialize module ThreadLock"
);
}
/*****************************************************************************
Revision Log:
$Log: ThreadLock.c,v $
Revision 1.3 1997/10/30 15:29:21 jim
Added conditional compilation logic to allow compilation in
non-threaded environments.
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
*** empty log message ***
$Revision 1.1 1997/02/24 23:25:42 jim
$initial
$
*****************************************************************************/
lib/Components/ExtensionClass/src/Sync.c
View file @
a2cb98ae
/***********************************************************
Copyright
Copyright 1997 Digital Creations, L.L.C., 910 Princess Anne
Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All
rights reserved. Copyright in this software is owned by DCLC,
unless otherwise indicated. Note that any product, process or
technology described in this software may be the subject of
other Intellectual Property rights reserved by Digital
Creations, L.C. and are not licensed hereunder.
Trademarks
Digital Creations & DCLC, are trademarks of Digital Creations, L.C..
All other trademarks are owned by their respective companies.
No Warranty
The software is provided "as is" without warranty of any kind,
either express or implied, including, but not limited to, the
implied warranties of merchantability, fitness for a particular
purpose, or non-infringement. This software could include
technical inaccuracies or typographical errors. Changes are
periodically made to the software; these changes will be
incorporated in new editions of the software. DCLC may make
improvements and/or changes in this software at any time
without notice.
Limitation Of Liability
In no event will DCLC be liable for direct, indirect, special,
incidental, economic, cover, or consequential damages arising
out of the use of or inability to use this software even if
advised of the possibility of such damages. Some states do not
allow the exclusion or limitation of implied warranties or
limitation of liability for incidental or consequential
damages, so the above limitation or exclusion may not apply to
you.
If you have questions regarding this software,
contact:
Digital Creations L.L.C.
info@digicool.com
(540) 371-6909
******************************************************************/
/*
Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
o Redistributions of source code must retain the above copyright
notice, this list of conditions, and the disclaimer that follows.
o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
o Neither the name of Digital Creations nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS
IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL
CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
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 $
If you have questions regarding this software,
contact:
Digital Creations L.C.
info@digicool.com
(540) 371-6909
*/
static
char
Sync_module_documentation
[]
=
""
"
\n
$Id: Sync.c,v 1.
1 1997/09/18 20:36:37
jim Exp $"
"
\n
$Id: Sync.c,v 1.
2 1998/11/17 20:22:34
jim Exp $"
;
#include "ExtensionClass.h"
...
...
@@ -107,29 +105,25 @@ static struct PyMethodDef Synchronized_methods[] = {
{
"__call_method__"
,
(
PyCFunction
)
Synchronized___call_method__
,
METH_VARARGS
,
"Call a method by first getting a thread lock"
},
{
NULL
,
NULL
}
/* sentinel */
{
NULL
,
NULL
}
};
/* List of methods defined in the module */
static
struct
PyMethodDef
Module_Level__methods
[]
=
{
{
NULL
,
(
PyCFunction
)
NULL
,
0
,
NULL
}
/* sentinel */
static
struct
PyMethodDef
Module_Level__methods
[]
=
{
{
NULL
,
(
PyCFunction
)
NULL
,
0
,
NULL
}
};
/* Initialization function for the module (*must* be called initSync) */
void
initSync
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.1 $"
;
PURE_MIXIN_CLASS
(
Synchronized
,
"Mix-in class that provides synchonization of method calls
\n
"
"
\n
"
"Only one thread is allowed to call a synchronized
\n
"
"object's methods.
\n
"
,
Synchronized_methods
);
char
*
rev
=
"$Revision: 1.2 $"
;
PURE_MIXIN_CLASS
(
Synchronized
,
"Mix-in class that provides synchonization of method calls
\n
"
"
\n
"
"Only one thread is allowed to call a synchronized
\n
"
"object's methods.
\n
"
,
Synchronized_methods
);
UNLESS
((
lockstr
=
PyString_FromString
(
"_sync__lock"
))
&&
(
aqstr
=
PyString_FromString
(
"acquire"
))
&&
...
...
@@ -140,33 +134,14 @@ initSync()
ASSIGN
(
newlock
,
PyObject_GetAttrString
(
newlock
,
"allocate_lock"
));
UNLESS
(
newlock
)
return
;
/* Create the module and add the functions */
m
=
Py_InitModule4
(
"Sync"
,
Module_Level__methods
,
Sync_module_documentation
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
/* Add some symbolic constants to the module */
d
=
PyModule_GetDict
(
m
);
PyExtensionClass_Export
(
d
,
"Synchronized"
,
SynchronizedType
);
PyDict_SetItemString
(
d
,
"__version__"
,
PyString_FromStringAndSize
(
rev
+
11
,
strlen
(
rev
+
11
)
-
2
));
/* Check for errors */
CHECK_FOR_ERRORS
(
"can't initialize module MethodObject"
);
}
/*****************************************************************************
Revision Log:
$Log: Sync.c,v $
Revision 1.1 1997/09/18 20:36:37 jim
*** empty log message ***
$Revision 1.2 1997/06/21 15:22:03 jim
$Removed "object" suffix from generates C type names
$
$Revision 1.1 1997/02/24 23:25:42 jim
$initial
$
*****************************************************************************/
lib/Components/ExtensionClass/src/ThreadLock.c
View file @
a2cb98ae
/***********************************************************
Copyright
Copyright 1997 Digital Creations, L.L.C., 910 Princess Anne
Street, Suite 300, Fredericksburg, Virginia 22401 U.S.A. All
rights reserved. Copyright in this software is owned by DCLC,
unless otherwise indicated. Permission to use, copy and
distribute this software is hereby granted, provided that the
above copyright notice appear in all copies and that both that
copyright notice and this permission notice appear. Note that
any product, process or technology described in this software
may be the subject of other Intellectual Property rights
reserved by Digital Creations, L.C. and are not licensed
hereunder.
Trademarks
Digital Creations & DCLC, are trademarks of Digital Creations, L.C..
All other trademarks are owned by their respective companies.
No Warranty
The software is provided "as is" without warranty of any kind,
either express or implied, including, but not limited to, the
implied warranties of merchantability, fitness for a particular
purpose, or non-infringement. This software could include
technical inaccuracies or typographical errors. Changes are
periodically made to the software; these changes will be
incorporated in new editions of the software. DCLC may make
improvements and/or changes in this software at any time
without notice.
Limitation Of Liability
In no event will DCLC be liable for direct, indirect, special,
incidental, economic, cover, or consequential damages arising
out of the use of or inability to use this software even if
advised of the possibility of such damages. Some states do not
allow the exclusion or limitation of implied warranties or
limitation of liability for incidental or consequential
damages, so the above limitation or exclusion may not apply to
you.
If you have questions regarding this software,
contact:
Digital Creations L.L.C.
info@digicool.com
(540) 371-6909
******************************************************************/
/*
Copyright (c) 1996-1998, Digital Creations, Fredericksburg, VA, USA.
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:
o Redistributions of source code must retain the above copyright
notice, this list of conditions, and the disclaimer that follows.
o Redistributions in binary form must reproduce the above copyright
notice, this list of conditions, and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
o Neither the name of Digital Creations nor the names of its
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY DIGITAL CREATIONS AND CONTRIBUTORS *AS
IS* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL DIGITAL
CREATIONS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
DAMAGE.
$Id: ThreadLock.c,v 1.4 1998/11/17 20:23:42 jim Exp $
If you have questions regarding this software,
contact:
Digital Creations L.C.
info@digicool.com
(540) 371-6909
*/
static
char
ThreadLock_module_documentation
[]
=
""
"
\n
$Id: ThreadLock.c,v 1.
3 1997/10/30 15:29:21
jim Exp $"
"
\n
$Id: ThreadLock.c,v 1.
4 1998/11/17 20:23:42
jim Exp $"
;
#include "Python.h"
...
...
@@ -80,8 +73,6 @@ typedef struct {
staticforward
PyTypeObject
ThreadLockType
;
/* ---------------------------------------------------------------- */
static
int
cacquire
(
ThreadLockObject
*
self
)
{
...
...
@@ -187,9 +178,6 @@ static struct PyMethodDef ThreadLock_methods[] = {
{
NULL
,
NULL
}
/* sentinel */
};
/* ---------- */
static
void
ThreadLock_dealloc
(
ThreadLockObject
*
self
)
{
...
...
@@ -247,9 +235,6 @@ static PyTypeObject ThreadLockType = {
"This is useful for locking instances in possibly nested method calls
\n
"
};
/* End of code for ThreadLock objects */
/* -------------------------------------------------------- */
static
PyObject
*
newThreadLockObject
(
ThreadLockObject
*
self
,
PyObject
*
args
)
{
...
...
@@ -278,8 +263,6 @@ ident(PyObject *self, PyObject *args)
#endif
}
/* List of methods defined in the module */
static
struct
PyMethodDef
Module_methods
[]
=
{
{
"allocate_lock"
,
(
PyCFunction
)
newThreadLockObject
,
1
,
"allocate_lock() -- Return a new lock object"
...
...
@@ -290,20 +273,16 @@ static struct PyMethodDef Module_methods[] = {
{
NULL
,
(
PyCFunction
)
NULL
,
0
,
NULL
}
/* sentinel */
};
/* Initialization function for the module (*must* be called initThreadLock) */
void
initThreadLock
()
{
PyObject
*
m
,
*
d
;
char
*
rev
=
"$Revision: 1.
3
$"
;
char
*
rev
=
"$Revision: 1.
4
$"
;
/* Create the module and add the functions */
m
=
Py_InitModule4
(
"ThreadLock"
,
Module_methods
,
ThreadLock_module_documentation
,
(
PyObject
*
)
NULL
,
PYTHON_API_VERSION
);
/* Add some symbolic constants to the module */
d
=
PyModule_GetDict
(
m
);
ThreadLockType
.
ob_type
=&
PyType_Type
;
...
...
@@ -325,24 +304,3 @@ initThreadLock()
if
(
PyErr_Occurred
())
Py_FatalError
(
"can't initialize module ThreadLock"
);
}
/*****************************************************************************
Revision Log:
$Log: ThreadLock.c,v $
Revision 1.3 1997/10/30 15:29:21 jim
Added conditional compilation logic to allow compilation in
non-threaded environments.
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
*** empty log message ***
$Revision 1.1 1997/02/24 23:25:42 jim
$initial
$
*****************************************************************************/
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