aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken/helper.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/shiboken2/libshiboken/helper.h')
-rw-r--r--sources/shiboken2/libshiboken/helper.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/sources/shiboken2/libshiboken/helper.h b/sources/shiboken2/libshiboken/helper.h
index b215142c7..9b6d8903f 100644
--- a/sources/shiboken2/libshiboken/helper.h
+++ b/sources/shiboken2/libshiboken/helper.h
@@ -77,7 +77,12 @@ template<class T>
class AutoArrayPointer
{
public:
- AutoArrayPointer(int size) { data = new T[size]; }
+ AutoArrayPointer(const AutoArrayPointer&) = delete;
+ AutoArrayPointer(AutoArrayPointer&&) = delete;
+ AutoArrayPointer& operator=(const AutoArrayPointer&) = delete;
+ AutoArrayPointer& operator=(AutoArrayPointer&&) = delete;
+
+ explicit AutoArrayPointer(int size) { data = new T[size]; }
T& operator[](int pos) { return data[pos]; }
operator T*() const { return data; }
~AutoArrayPointer() { delete[] data; }
@@ -85,6 +90,10 @@ class AutoArrayPointer
T* data;
};
+typedef unsigned long long ThreadId;
+LIBSHIBOKEN_API ThreadId currentThreadId();
+LIBSHIBOKEN_API ThreadId mainThreadId();
+
/**
* An utility function used to call PyErr_WarnEx with a formatted message.
*/