Commit 72f736c7 authored by Jim Fulton's avatar Jim Fulton

Fixed bug in mix-in class declaration.

Added __version__.
parent e1b8ed5f
/* /*
$Id: Acquisition.c,v 1.1 1997/02/17 15:05:40 jim Exp $ $Id: Acquisition.c,v 1.2 1997/02/17 16:20:11 jim Exp $
Acquisition Wrappers -- Implementation of acquisition through wrappers Acquisition Wrappers -- Implementation of acquisition through wrappers
...@@ -59,6 +59,10 @@ ...@@ -59,6 +59,10 @@
Full description Full description
$Log: Acquisition.c,v $ $Log: Acquisition.c,v $
Revision 1.2 1997/02/17 16:20:11 jim
Fixed bug in mix-in class declaration.
Added __version__.
Revision 1.1 1997/02/17 15:05:40 jim Revision 1.1 1997/02/17 15:05:40 jim
*** empty log message *** *** empty log message ***
...@@ -529,19 +533,22 @@ void ...@@ -529,19 +533,22 @@ void
initAcquisition() initAcquisition()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.2 $";
PURE_MIXIN_CLASS(Acquirer, PURE_MIXIN_CLASS(Acquirer,
"Base class for objects that acquire attributes from containers\n" "Base class for objects that acquire attributes from containers\n"
, Acquirer_methods) , Acquirer_methods);
/* Create the module and add the functions */ /* Create the module and add the functions */
m = Py_InitModule4("Acquisition", methods, m = Py_InitModule4("Acquisition", methods,
"", "",
(PyObject*)NULL,PYTHON_API_VERSION); (PyObject*)NULL,PYTHON_API_VERSION);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
init_py_names(); init_py_names();
PyExtensionClass_Export(d,"Acquirer",AcquirerType); PyExtensionClass_Export(d,"Acquirer",AcquirerType);
PyExtensionClass_Export(d,"Wrapper",Wrappertype); PyExtensionClass_Export(d,"Wrapper",Wrappertype);
PyDict_SetItemString(d,"__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
CHECK_FOR_ERRORS("can't initialize module Acquisition"); CHECK_FOR_ERRORS("can't initialize module Acquisition");
} }
...@@ -21,6 +21,7 @@ void ...@@ -21,6 +21,7 @@ void
initMethodObject() initMethodObject()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.2 $";
PURE_MIXIN_CLASS(Method, PURE_MIXIN_CLASS(Method,
"Base class for objects that want to be treated as methods\n" "Base class for objects that want to be treated as methods\n"
"\n" "\n"
...@@ -31,15 +32,17 @@ initMethodObject() ...@@ -31,15 +32,17 @@ initMethodObject()
"will call the method and pass the instance in addition to\n" "will call the method and pass the instance in addition to\n"
"other arguments. It is the responsibility of Method objects\n" "other arguments. It is the responsibility of Method objects\n"
"to implement (or inherit) a __call__ method.\n", "to implement (or inherit) a __call__ method.\n",
Method_methods) Method_methods);
/* Create the module and add the functions */ /* Create the module and add the functions */
m = Py_InitModule4("MethodObject", methods, m = Py_InitModule4("MethodObject", methods,
"Method-object mix-in class module", "Method-object mix-in class module",
(PyObject*)NULL,PYTHON_API_VERSION); (PyObject*)NULL,PYTHON_API_VERSION);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
PyExtensionClass_Export(d,"Method",MethodType); PyExtensionClass_Export(d,"Method",MethodType);
PyDict_SetItemString(d,"__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
/* Check for errors */ /* Check for errors */
CHECK_FOR_ERRORS("can't initialize module MethodObject"); CHECK_FOR_ERRORS("can't initialize module MethodObject");
......
/* /*
$Id: Acquisition.c,v 1.1 1997/02/17 15:05:40 jim Exp $ $Id: Acquisition.c,v 1.2 1997/02/17 16:20:11 jim Exp $
Acquisition Wrappers -- Implementation of acquisition through wrappers Acquisition Wrappers -- Implementation of acquisition through wrappers
...@@ -59,6 +59,10 @@ ...@@ -59,6 +59,10 @@
Full description Full description
$Log: Acquisition.c,v $ $Log: Acquisition.c,v $
Revision 1.2 1997/02/17 16:20:11 jim
Fixed bug in mix-in class declaration.
Added __version__.
Revision 1.1 1997/02/17 15:05:40 jim Revision 1.1 1997/02/17 15:05:40 jim
*** empty log message *** *** empty log message ***
...@@ -529,19 +533,22 @@ void ...@@ -529,19 +533,22 @@ void
initAcquisition() initAcquisition()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.2 $";
PURE_MIXIN_CLASS(Acquirer, PURE_MIXIN_CLASS(Acquirer,
"Base class for objects that acquire attributes from containers\n" "Base class for objects that acquire attributes from containers\n"
, Acquirer_methods) , Acquirer_methods);
/* Create the module and add the functions */ /* Create the module and add the functions */
m = Py_InitModule4("Acquisition", methods, m = Py_InitModule4("Acquisition", methods,
"", "",
(PyObject*)NULL,PYTHON_API_VERSION); (PyObject*)NULL,PYTHON_API_VERSION);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
init_py_names(); init_py_names();
PyExtensionClass_Export(d,"Acquirer",AcquirerType); PyExtensionClass_Export(d,"Acquirer",AcquirerType);
PyExtensionClass_Export(d,"Wrapper",Wrappertype); PyExtensionClass_Export(d,"Wrapper",Wrappertype);
PyDict_SetItemString(d,"__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
CHECK_FOR_ERRORS("can't initialize module Acquisition"); CHECK_FOR_ERRORS("can't initialize module Acquisition");
} }
...@@ -21,6 +21,7 @@ void ...@@ -21,6 +21,7 @@ void
initMethodObject() initMethodObject()
{ {
PyObject *m, *d; PyObject *m, *d;
char *rev="$Revision: 1.2 $";
PURE_MIXIN_CLASS(Method, PURE_MIXIN_CLASS(Method,
"Base class for objects that want to be treated as methods\n" "Base class for objects that want to be treated as methods\n"
"\n" "\n"
...@@ -31,15 +32,17 @@ initMethodObject() ...@@ -31,15 +32,17 @@ initMethodObject()
"will call the method and pass the instance in addition to\n" "will call the method and pass the instance in addition to\n"
"other arguments. It is the responsibility of Method objects\n" "other arguments. It is the responsibility of Method objects\n"
"to implement (or inherit) a __call__ method.\n", "to implement (or inherit) a __call__ method.\n",
Method_methods) Method_methods);
/* Create the module and add the functions */ /* Create the module and add the functions */
m = Py_InitModule4("MethodObject", methods, m = Py_InitModule4("MethodObject", methods,
"Method-object mix-in class module", "Method-object mix-in class module",
(PyObject*)NULL,PYTHON_API_VERSION); (PyObject*)NULL,PYTHON_API_VERSION);
d = PyModule_GetDict(m); d = PyModule_GetDict(m);
PyExtensionClass_Export(d,"Method",MethodType); PyExtensionClass_Export(d,"Method",MethodType);
PyDict_SetItemString(d,"__version__",
PyString_FromStringAndSize(rev+11,strlen(rev+11)-2));
/* Check for errors */ /* Check for errors */
CHECK_FOR_ERRORS("can't initialize module MethodObject"); CHECK_FOR_ERRORS("can't initialize module MethodObject");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment