diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-12-21 17:19:08 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2009-12-21 17:19:08 -0300 |
commit | 1f0fdbdfa55b027d22fbf492108e6cbce2fffaac (patch) | |
tree | 2b5f2cb56f56b65da6d448e5295b412583e142b5 /libshiboken | |
parent | f54ddefd58b0ee7499c84c26beaab9452cd453cb (diff) |
Refactored SbkType specializations and replaced "long long" by "PY_LONG_LONG".
Diffstat (limited to 'libshiboken')
-rw-r--r-- | libshiboken/conversions.h | 91 |
1 files changed, 13 insertions, 78 deletions
diff --git a/libshiboken/conversions.h b/libshiboken/conversions.h index 8faad93b9..74b975531 100644 --- a/libshiboken/conversions.h +++ b/libshiboken/conversions.h @@ -57,84 +57,19 @@ namespace Shiboken template<typename T> PyTypeObject* SbkType(); -template<> -inline PyTypeObject* SbkType<int>() -{ - return &PyInt_Type; -} - -template<> -inline PyTypeObject* SbkType<unsigned int>() -{ - return &PyLong_Type; -} - -template<> -inline PyTypeObject* SbkType<short>() -{ - return &PyInt_Type; -} - -template<> -inline PyTypeObject* SbkType<unsigned short>() -{ - return &PyInt_Type; -} - -template<> -inline PyTypeObject* SbkType<long>() -{ - return &PyLong_Type; -} - -template<> -inline PyTypeObject* SbkType<unsigned long>() -{ - return &PyLong_Type; -} - - -template<> -inline PyTypeObject* SbkType<long long>() -{ - return &PyLong_Type; -} - -template<> -inline PyTypeObject* SbkType<unsigned long long>() -{ - return &PyLong_Type; -} - -template<> -inline PyTypeObject* SbkType<bool>() -{ - return &PyBool_Type; -} - -template<> -inline PyTypeObject* SbkType<float>() -{ - return &PyFloat_Type; -} - -template<> -inline PyTypeObject* SbkType<double>() -{ - return &PyFloat_Type; -} - -template<> -inline PyTypeObject* SbkType<char>() -{ - return &PyInt_Type; -} - -template<> -inline PyTypeObject* SbkType<unsigned char>() -{ - return &PyInt_Type; -} +template<> inline PyTypeObject* SbkType<int>() { return &PyInt_Type; } +template<> inline PyTypeObject* SbkType<unsigned int>() { return &PyLong_Type; } +template<> inline PyTypeObject* SbkType<short>() { return &PyInt_Type; } +template<> inline PyTypeObject* SbkType<unsigned short>() { return &PyInt_Type; } +template<> inline PyTypeObject* SbkType<long>() { return &PyLong_Type; } +template<> inline PyTypeObject* SbkType<unsigned long>() { return &PyLong_Type; } +template<> inline PyTypeObject* SbkType<PY_LONG_LONG>() { return &PyLong_Type; } +template<> inline PyTypeObject* SbkType<unsigned PY_LONG_LONG>() { return &PyLong_Type; } +template<> inline PyTypeObject* SbkType<bool>() { return &PyBool_Type; } +template<> inline PyTypeObject* SbkType<float>() { return &PyFloat_Type; } +template<> inline PyTypeObject* SbkType<double>() { return &PyFloat_Type; } +template<> inline PyTypeObject* SbkType<char>() { return &PyInt_Type; } +template<> inline PyTypeObject* SbkType<unsigned char>() { return &PyInt_Type; } /** * This function template is used to copy a C++ object using the proper |