We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b63ea4f commit 7ba945eCopy full SHA for 7ba945e
source/mock/ur_mock_helpers.hpp
@@ -41,6 +41,13 @@ template <class T> inline T createDummyHandle(size_t Size = 0) {
41
return reinterpret_cast<T>(DummyHandlePtr);
42
}
43
44
+// Allocates a dummy handle of type T with support of reference counting
45
+// and associates it with the provided Data.
46
+template <class T> inline T createDummyHandleWithData(unsigned char *Data) {
47
+ auto DummyHandlePtr = new dummy_handle_t_(Data);
48
+ return reinterpret_cast<T>(DummyHandlePtr);
49
+}
50
+
51
// Decrement reference counter for the handle and deallocates it if the
52
// reference counter becomes zero
53
template <class T> inline void releaseDummyHandle(T Handle) {
0 commit comments