diff options
| author | Ben Finney <ben@benfinney.id.au> | 2008-05-16 14:58:00 +1000 |
|---|---|---|
| committer | Ben Finney <ben@benfinney.id.au> | 2008-05-16 14:58:00 +1000 |
| commit | b147f1846cd26ab25ad925105f52421992395918 (patch) | |
| tree | f1cb14ef290ab7ef91668b1b2a6f1a1bf41d3329 /python/generic.h | |
| parent | 44faadf294230dc6384b309b06089520d562f199 (diff) | |
| download | python-apt-b147f1846cd26ab25ad925105f52421992395918.tar.gz | |
Remove trailing whitespace.
Diffstat (limited to 'python/generic.h')
| -rw-r--r-- | python/generic.h | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/python/generic.h b/python/generic.h index a1b662bb..ce79a54c 100644 --- a/python/generic.h +++ b/python/generic.h @@ -4,24 +4,24 @@ /* ###################################################################### generic - Some handy functions to make integration a tad simpler - - Python needs this little _HEAD tacked onto the front of the object.. + + Python needs this little _HEAD tacked onto the front of the object.. This complicates the integration with C++. We use some templates to make that quite transparent to us. It would have been nice if Python internally used a page from the C++ ref counting book to hide its little header from the world, but it doesn't. - The CppPyObject has the target object and the Python header, this is - needed to ensure proper alignment. + The CppPyObject has the target object and the Python header, this is + needed to ensure proper alignment. GetCpp returns the C++ object from a PyObject. CppPyObject_NEW creates the Python object and then uses placement new to init the C++ class.. This is good for simple situations and as an example on how to do it in other more specific cases. - CppPyObject_Dealloc should be used in the Type as the destructor + CppPyObject_Dealloc should be used in the Type as the destructor function. HandleErrors converts errors from the internal _error stack into Python exceptions and makes sure the _error stack is empty. - + ##################################################################### */ /*}}}*/ #ifndef GENERIC_H @@ -38,7 +38,7 @@ typedef int Py_ssize_t; template <class T> struct CppPyObject : public PyObject { // We are only using CppPyObject and friends as dumb structs only, ie the - // c'tor is never called. + // c'tor is never called. // However if T doesn't have a default c'tor C++ doesn't generate one for // CppPyObject (since it can't know how it should initialize Object). // |
