diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2011-10-17 20:07:57 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:18:29 -0300 |
commit | 58665363412d5f43704d69440082fd8e87a23086 (patch) | |
tree | 3bd1a901feb74c37c9b1035a698b1b4bf7d771f8 /tests | |
parent | 074f99759150eaa5e4adf8d501396a67fd370404 (diff) |
Modifies HANDLE test to fix win32 linking problem.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/libsample/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/libsample/handle.cpp | 33 | ||||
-rw-r--r-- | tests/libsample/handle.h | 17 |
3 files changed, 39 insertions, 12 deletions
diff --git a/tests/libsample/CMakeLists.txt b/tests/libsample/CMakeLists.txt index 6b951b6df..408920c9c 100644 --- a/tests/libsample/CMakeLists.txt +++ b/tests/libsample/CMakeLists.txt @@ -11,6 +11,7 @@ onlycopy.cpp derived.cpp echo.cpp functions.cpp +handle.cpp implicitconv.cpp injectcode.cpp listuser.cpp diff --git a/tests/libsample/handle.cpp b/tests/libsample/handle.cpp new file mode 100644 index 000000000..3fe91124a --- /dev/null +++ b/tests/libsample/handle.cpp @@ -0,0 +1,33 @@ +/* + * This file is part of the Shiboken Python Binding Generator project. + * + * Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies). + * + * Contact: PySide team <contact@pyside.org> + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +#include "handle.h" + +HANDLE HandleHolder::createHandle() +{ + return (HANDLE) new OBJ; +} + +bool HandleHolder::compare(HandleHolder* other) +{ + return other->m_handle == m_handle; +} diff --git a/tests/libsample/handle.h b/tests/libsample/handle.h index d6651cdd1..c75f3e46a 100644 --- a/tests/libsample/handle.h +++ b/tests/libsample/handle.h @@ -1,7 +1,7 @@ /* * This file is part of the Shiboken Python Binding Generator project. * - * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). + * Copyright (C) 2010-2011 Nokia Corporation and/or its subsidiary(-ies). * * Contact: PySide team <contact@pyside.org> * @@ -25,7 +25,7 @@ #include "libsamplemacros.h" -class OBJ +class LIBSAMPLE_API OBJ { }; @@ -38,20 +38,13 @@ public: void set(HANDLE ptr) { m_handle = m_handle; } HANDLE get() { return m_handle; } - static HANDLE createHandle() - { - return (HANDLE) new OBJ; - } - - bool compare(HandleHolder* other) - { - return other->m_handle == m_handle; - } + static HANDLE createHandle(); + bool compare(HandleHolder* other); private: HANDLE m_handle; }; -struct PrimitiveStruct {}; +struct LIBSAMPLE_API PrimitiveStruct {}; typedef struct PrimitiveStruct* PrimitiveStructPtr; struct LIBSAMPLE_API PrimitiveStructPointerHolder { |