diff options
Diffstat (limited to 'lib/kross')
-rw-r--r-- | lib/kross/python/cxx/Config.h (renamed from lib/kross/python/cxx/Config.hxx) | 0 | ||||
-rw-r--r-- | lib/kross/python/cxx/Exception.h (renamed from lib/kross/python/cxx/Exception.hxx) | 4 | ||||
-rw-r--r-- | lib/kross/python/cxx/Extensions.h (renamed from lib/kross/python/cxx/Extensions.hxx) | 4 | ||||
-rw-r--r-- | lib/kross/python/cxx/IndirectPythonInterface.cpp (renamed from lib/kross/python/cxx/IndirectPythonInterface.cxx) | 4 | ||||
-rw-r--r-- | lib/kross/python/cxx/IndirectPythonInterface.h (renamed from lib/kross/python/cxx/IndirectPythonInterface.hxx) | 6 | ||||
-rw-r--r-- | lib/kross/python/cxx/Makefile.am | 6 | ||||
-rw-r--r-- | lib/kross/python/cxx/Objects.h (renamed from lib/kross/python/cxx/Objects.hxx) | 6 | ||||
-rw-r--r-- | lib/kross/python/cxx/PyCXX.html | 26 | ||||
-rw-r--r-- | lib/kross/python/cxx/README.html | 22 | ||||
-rw-r--r-- | lib/kross/python/cxx/cxx_extensions.cpp (renamed from lib/kross/python/cxx/cxx_extensions.cxx) | 4 | ||||
-rw-r--r-- | lib/kross/python/cxx/cxxsupport.cpp (renamed from lib/kross/python/cxx/cxxsupport.cxx) | 2 | ||||
-rw-r--r-- | lib/kross/python/pythonconfig.h | 6 |
12 files changed, 45 insertions, 45 deletions
diff --git a/lib/kross/python/cxx/Config.hxx b/lib/kross/python/cxx/Config.h index 7959c403..7959c403 100644 --- a/lib/kross/python/cxx/Config.hxx +++ b/lib/kross/python/cxx/Config.h diff --git a/lib/kross/python/cxx/Exception.hxx b/lib/kross/python/cxx/Exception.h index 044d4198..94cfcff4 100644 --- a/lib/kross/python/cxx/Exception.hxx +++ b/lib/kross/python/cxx/Exception.h @@ -7,8 +7,8 @@ #define __CXX_Exception_h #include "Python.h" -#include "Config.hxx" -#include "IndirectPythonInterface.hxx" +#include "Config.h" +#include "IndirectPythonInterface.h" #include <string> #include <iostream> diff --git a/lib/kross/python/cxx/Extensions.hxx b/lib/kross/python/cxx/Extensions.h index 5c7c2bcf..48eb4e09 100644 --- a/lib/kross/python/cxx/Extensions.hxx +++ b/lib/kross/python/cxx/Extensions.h @@ -14,8 +14,8 @@ #endif -#include "Config.hxx" -#include "Objects.hxx" +#include "Config.h" +#include "Objects.h" extern "C" { diff --git a/lib/kross/python/cxx/IndirectPythonInterface.cxx b/lib/kross/python/cxx/IndirectPythonInterface.cpp index caaa0913..6f3be354 100644 --- a/lib/kross/python/cxx/IndirectPythonInterface.cxx +++ b/lib/kross/python/cxx/IndirectPythonInterface.cpp @@ -1,8 +1,8 @@ // -// IndirectPythonInterface.cxx +// IndirectPythonInterface.cpp // #undef _XOPEN_SOURCE -#include "IndirectPythonInterface.hxx" +#include "IndirectPythonInterface.h" namespace Py { diff --git a/lib/kross/python/cxx/IndirectPythonInterface.hxx b/lib/kross/python/cxx/IndirectPythonInterface.h index 8f2d275d..8cc0bcec 100644 --- a/lib/kross/python/cxx/IndirectPythonInterface.hxx +++ b/lib/kross/python/cxx/IndirectPythonInterface.h @@ -1,5 +1,5 @@ -#ifndef __CXX_INDIRECT_PYTHON_INTERFACE__HXX__ -#define __CXX_INDIRECT_PYTHON_INTERFACE__HXX__ +#ifndef __CXX_INDIRECT_PYTHON_INTERFACE__H__ +#define __CXX_INDIRECT_PYTHON_INTERFACE__H__ #include <Python.h> @@ -153,4 +153,4 @@ void _XDECREF( PyObject *op ); char *__Py_PackageContext(); } -#endif // __CXX_INDIRECT_PYTHON_INTERFACE__HXX__ +#endif // __CXX_INDIRECT_PYTHON_INTERFACE__H__ diff --git a/lib/kross/python/cxx/Makefile.am b/lib/kross/python/cxx/Makefile.am index 4e1377c0..702027da 100644 --- a/lib/kross/python/cxx/Makefile.am +++ b/lib/kross/python/cxx/Makefile.am @@ -5,10 +5,10 @@ CXXFLAGS += $(USE_EXCEPTIONS) noinst_LTLIBRARIES = libkrosspythoncxx.la libkrosspythoncxx_la_SOURCES = \ - cxxsupport.cxx \ - cxx_extensions.cxx \ + cxxsupport.cpp \ + cxx_extensions.cpp \ cxxextensions.c \ - IndirectPythonInterface.cxx + IndirectPythonInterface.cpp libkrosspythoncxx_la_LDFLAGS = $(LIBPYTHON) $(all_libraries) -Wnounresolved diff --git a/lib/kross/python/cxx/Objects.hxx b/lib/kross/python/cxx/Objects.h index 97e52fc0..b6ab958b 100644 --- a/lib/kross/python/cxx/Objects.hxx +++ b/lib/kross/python/cxx/Objects.h @@ -12,8 +12,8 @@ #endif #include "Python.h" -#include "Config.hxx" -#include "Exception.hxx" +#include "Config.h" +#include "Exception.h" #include <iostream> @@ -110,7 +110,7 @@ namespace Py // If you are inheriting from PythonExtension<T> to define an object // note that it contains PythonExtension<T>::check // which you can use in accepts when writing a wrapper class. - // See Demo/range.h and Demo/range.cxx for an example. + // See Demo/range.h and Demo/range.cpp for an example. class Object { diff --git a/lib/kross/python/cxx/PyCXX.html b/lib/kross/python/cxx/PyCXX.html index 566974c1..0c7172a1 100644 --- a/lib/kross/python/cxx/PyCXX.html +++ b/lib/kross/python/cxx/PyCXX.html @@ -83,7 +83,7 @@ Unix: <cite>/usr/local/PyCXX</cite> Windows: <cite>cl /I=C:\PyCXX ...</cite><br> Unix: <cite>g++ -I/usr/local/PyCXX ...</cite> <li>Include PyCXX headers files in your code using the CXX prefix:<br> -<cite>#include "CXX/Object.hxx"</cite> +<cite>#include "CXX/Object.h"</cite> </ul> <p>The header file CXX/config.h may need to be adjusted for the @@ -100,7 +100,7 @@ the Py:: prefix when referring to them, or include the statement:</p> <h2>Wrappers for standard objects: CXX_Objects.h</h2> -<p>Header file CXX_Objects.h requires adding file Src/cxxsupport.cxx to +<p>Header file CXX_Objects.h requires adding file Src/cxxsupport.cpp to your module sources. CXX_Objects provides a set of wrapper classes that allow you access to most of the Python C API using a C++ notation that closely resembles Python. For example, this Python:</p> @@ -121,7 +121,7 @@ alist = d.keys(); std::cout << alist << std::endl; </pre> -<p>You can optionally use the CXX/Extensions.hxx facility described later +<p>You can optionally use the CXX/Extensions.h facility described later to define Python extension modules and extension objects.</p> <h3>We avoid programming with Python object pointers</h3> @@ -165,8 +165,8 @@ integer argument, that will create a Python <cite>dict</cite> <p>If you have written a significant Python extension, this tedium looks all too familiar. The vast bulk of the coding is error checking and cleanup. Now compare the same thing -written in C++ using CXX/Objects.hxx. The things with Python-like names (Int, Dict, Tuple) are -from CXX/Objects.hxx.</p> +written in C++ using CXX/Objects.h. The things with Python-like names (Int, Dict, Tuple) are +from CXX/Objects.h.</p> <pre>static PyObject* mymodule_addvalue (PyObject* self, PyObject* pargs) { @@ -211,7 +211,7 @@ Object addvalue (Object & self, const Tuple & args) <h2>The basic concept is to wrap Python pointers</h2> -<p>The basic concept of CXX/Objects.hxx is to create a wrapper around +<p>The basic concept of CXX/Objects.h is to create a wrapper around each <cite>PyObject *</cite> so that the reference counting can be done automatically, thus eliminating the most frequent source of errors. In addition, we can then add methods and operators so that Python objects can be manipulated in C++ @@ -223,7 +223,7 @@ the pointer. Since C++ calls the destructors on objects that are about to go out we are guaranteed that we will keep the reference counts right even if we unexpectedly leave a routine with an exception.</p> -<p>As a matter of philosophy, CXX/Objects.hxx prevents the creation of instances of its +<p>As a matter of philosophy, CXX/Objects.h prevents the creation of instances of its classes unless the instance will be a valid instance of its class. When an attempt is made to create an object that will not be valid, an exception is thrown.</p> @@ -1713,17 +1713,17 @@ Exception to clear it.:</p> <h2>Extension Facilities</h2> -<p>CXX/Extensions.hxx provides facilities for: +<p>CXX/Extensions.h provides facilities for: <ul> <li>Creating a Python extension module</li> <li>Creating new Python extension types</li> </ul> -<p>These facilities use CXX/Objects.hxx and its support file cxxsupport.cxx.</p> +<p>These facilities use CXX/Objects.h and its support file cxxsupport.cpp.</p> -<p>If you use CXX/Extensions.hxx you must also include source files cxxextensions.c and -cxx_extensions.cxx</p> +<p>If you use CXX/Extensions.h you must also include source files cxxextensions.c and +cxx_extensions.cpp</p> <h3>Creating an Python extension module</h3> @@ -1745,7 +1745,7 @@ details are necessary: <p>To create an extension module, you inherit from class ExtensionModule templated on yourself: In the constructor, you make calls to register methods of this class with Python as extension module methods. In this example, two methods are added (this is a simplified -form of the example in Demo/example.cxx):</p> +form of the example in Demo/example.cpp):</p> <pre>class example_module : public ExtensionModule<example_module> { @@ -1859,7 +1859,7 @@ addresses of functions can be added in order to give the object the desired beha <p>Creating extension objects is of course harder since you must specify how the object behaves and give it methods. This is shown in some detail in the example -range.h and range.cxx, with the test routine rangetest.cxx, in directory Demo. If you have never +range.h and range.cpp, with the test routine rangetest.cpp, in directory Demo. If you have never created a Python extension before, you should read the Extension manual first and be very familiar with Python's "special class methods". Then what follows will make more sense.</p> diff --git a/lib/kross/python/cxx/README.html b/lib/kross/python/cxx/README.html index d698725a..b29f5b15 100644 --- a/lib/kross/python/cxx/README.html +++ b/lib/kross/python/cxx/README.html @@ -176,8 +176,8 @@ is not compiled and linked to support C and C++.</p> <p>New in this release:</p> <ul> <li>Support for the Windows Linker /DELAYLOAD feature. Enable this feature by -defining PY_WIN32_DELAYLOAD_PYTHON_DLL when compiling IndirectPythonInterface.cxx -<li>Remove "CXX/Array.hxx" and associated code - its does not belong in PyCXX +defining PY_WIN32_DELAYLOAD_PYTHON_DLL when compiling IndirectPythonInterface.cpp +<li>Remove "CXX/Array.h" and associated code - its does not belong in PyCXX <li>Work on the docs. Mostly to clean up the HTML to allow more extensive work. <li>Reformated the sources to a consistent style. The mix of styles and tabs sizes was making working on the sources error prone. @@ -193,10 +193,10 @@ C++ header files. <p> <table cellspacing=0 cellpadding=3px> <tr><th>Old</th><th>New</th></tr> -<tr><td>#include "CXX_Config.h"</td><td>#include "CXX/Config.hxx"</td> -<tr><td>#include "CXX_Exception.h"</td><td>#include "CXX/Exception.hxx"</td> -<tr><td>#include "CXX_Extensions.h"</td><td>#include "CXX/Extensions.hxx"</td> -<tr><td>#include "CXX_Objects.h"</td><td>#include "CXX/Objects.hxx"</td> +<tr><td>#include "CXX_Config.h"</td><td>#include "CXX/Config.h"</td> +<tr><td>#include "CXX_Exception.h"</td><td>#include "CXX/Exception.h"</td> +<tr><td>#include "CXX_Extensions.h"</td><td>#include "CXX/Extensions.h"</td> +<tr><td>#include "CXX_Objects.h"</td><td>#include "CXX/Objects.h"</td> </table> <h3>Version 5 (May 18, 2000)</h3> @@ -254,7 +254,7 @@ coding so much that we think it is worth the disruption.</p> <p>To create an extension module, you inherit from class ExtensionModule templated on yourself: In the constructor, you make calls to register methods of this class with Python as extension module methods. In this example, two methods are added (this is a simplified -form of the example in Demo/example.cxx):</p> +form of the example in Demo/example.cpp):</p> <pre>class example_module : public ExtensionModule<example_module> { @@ -309,8 +309,8 @@ return its dictionary.</p> <h4>Creating extension objects</h4> <p>Creating extension objects is of course harder since you must specify how the object -behaves and give it methods. This is shown in some detail in the example range.h and range.cxx, -with the test routine rangetest.cxx, in directory Demo.</p> +behaves and give it methods. This is shown in some detail in the example range.h and range.cpp, +with the test routine rangetest.cpp, in directory Demo.</p> <p>Here is a brief overview. You create a class that inherits from PythonExtension templated upon itself. You override various methods from PythonExtension to implement @@ -426,8 +426,8 @@ setenv CCC "KCC -x" <p>before running makethis.py.</p> -<p>There is also a python.cxx file for making a stand-alone Python containing this -example, as well as a similar file arraytest.cxx for testing Array.</p> +<p>There is also a python.cpp file for making a stand-alone Python containing this +example, as well as a similar file arraytest.cpp for testing Array.</p> <p>Comments to [email protected], please.</p> diff --git a/lib/kross/python/cxx/cxx_extensions.cxx b/lib/kross/python/cxx/cxx_extensions.cpp index f9c942ad..6bbe1278 100644 --- a/lib/kross/python/cxx/cxx_extensions.cxx +++ b/lib/kross/python/cxx/cxx_extensions.cpp @@ -1,5 +1,5 @@ -#include "Extensions.hxx" -#include "Exception.hxx" +#include "Extensions.h" +#include "Exception.h" #include <assert.h> diff --git a/lib/kross/python/cxx/cxxsupport.cxx b/lib/kross/python/cxx/cxxsupport.cpp index 7bab6cc3..6f2234b2 100644 --- a/lib/kross/python/cxx/cxxsupport.cxx +++ b/lib/kross/python/cxx/cxxsupport.cpp @@ -3,7 +3,7 @@ // All rights reserved. See Legal.htm for full text and disclaimer. //---------------------------------------------------------------------------// -#include "Objects.hxx" +#include "Objects.h" namespace Py { Py_UNICODE unicode_null_string[1] = { 0 }; diff --git a/lib/kross/python/pythonconfig.h b/lib/kross/python/pythonconfig.h index 64b4eefb..349d838b 100644 --- a/lib/kross/python/pythonconfig.h +++ b/lib/kross/python/pythonconfig.h @@ -38,9 +38,9 @@ #include <frameobject.h> // Include the PyCXX stuff. -#include "cxx/Config.hxx" -#include "cxx/Objects.hxx" -#include "cxx/Extensions.hxx" +#include "cxx/Config.h" +#include "cxx/Objects.h" +#include "cxx/Extensions.h" namespace Kross { |