Author: ArcRiley Date: 2009-01-03 18:49:31 -0500 (Sat, 03 Jan 2009) New Revision: 1415
Modified: trunk/concordance/src/__init__.c Log: Commented module init function Modified: trunk/concordance/src/__init__.c =================================================================== --- trunk/concordance/src/__init__.c 2009-01-03 22:39:36 UTC (rev 1414) +++ trunk/concordance/src/__init__.c 2009-01-03 23:49:31 UTC (rev 1415) @@ -28,21 +28,43 @@ static struct PyModuleDef concordanceModule = { PyModuleDef_HEAD_INIT, - "concordance", - "Test Help", - -1, - concordanceMethods, - NULL, NULL, NULL, NULL + "concordance", /*m_name*/ + "Test Help", /*m_doc*/ + -1, /*m_size*/ + concordanceMethods, /*m_methods*/ + NULL, /*m_reload*/ + NULL, /*m_traverse*/ + NULL, /*m_clear*/ + NULL /*m_free*/ }; PyMODINIT_FUNC -PyInit_concordance(void) { - PyObject* module; +PyInit_concordance(void) { /*\ + cdef : \*/ + PyObject* module; + /* Initialize all types prior to module creation + + int PyType_Ready(PyTypeObject*) + Finalize a type object. This should be called on all type objects to + finish their initialization. This function is responsible for adding + inherited slots from a type’s base class. + Return 0 on success, or return -1 and sets an exception on error. + */ if (PyType_Ready(&conCore_Type) < 0) return NULL; + + /* Create concordance module object + + PyObject* PyModule_Create(struct PyModuleDef*) + */ module = PyModule_Create(&concordanceModule); + /* Add Core class to the concordance module object + + int PyModule_AddObject(PyObject*, const char*, PyObject*); + */ Py_INCREF(&conCore_Type); PyModule_AddObject(module, "Core", (PyObject*) &conCore_Type); + return module; } _______________________________________________ PySoy-SVN mailing list PySoy-SVN@pysoy.org http://www.pysoy.org/mailman/listinfo/pysoy-svn