[Lldb-commits] [lldb] r138133 - in /lldb/trunk: include/lldb/API/SBCommandReturnObject.h source/API/SBCommandReturnObject.cpp
Greg Clayton
gclayton at apple.com
Fri Aug 19 16:06:38 PDT 2011
Author: gclayton
Date: Fri Aug 19 18:06:38 2011
New Revision: 138133
URL: http://llvm.org/viewvc/llvm-project?rev=138133&view=rev
Log:
Added the ability to create a SBCommandReturnObject object from a pointer
and also to later release the ownership of the pointer object. This was needed
for SWIG interaction.
Modified:
lldb/trunk/include/lldb/API/SBCommandReturnObject.h
lldb/trunk/source/API/SBCommandReturnObject.cpp
Modified: lldb/trunk/include/lldb/API/SBCommandReturnObject.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/include/lldb/API/SBCommandReturnObject.h?rev=138133&r1=138132&r2=138133&view=diff
==============================================================================
--- lldb/trunk/include/lldb/API/SBCommandReturnObject.h (original)
+++ lldb/trunk/include/lldb/API/SBCommandReturnObject.h Fri Aug 19 18:06:38 2011
@@ -25,8 +25,15 @@
SBCommandReturnObject (const lldb::SBCommandReturnObject &rhs);
#ifndef SWIG
+
const lldb::SBCommandReturnObject &
operator = (const lldb::SBCommandReturnObject &rhs);
+
+
+ SBCommandReturnObject (lldb_private::CommandReturnObject *ptr);
+
+ lldb_private::CommandReturnObject *
+ Release ();
#endif
~SBCommandReturnObject ();
Modified: lldb/trunk/source/API/SBCommandReturnObject.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/API/SBCommandReturnObject.cpp?rev=138133&r1=138132&r2=138133&view=diff
==============================================================================
--- lldb/trunk/source/API/SBCommandReturnObject.cpp (original)
+++ lldb/trunk/source/API/SBCommandReturnObject.cpp Fri Aug 19 18:06:38 2011
@@ -28,6 +28,17 @@
m_opaque_ap.reset (new CommandReturnObject (*rhs.m_opaque_ap));
}
+SBCommandReturnObject::SBCommandReturnObject (CommandReturnObject *ptr) :
+ m_opaque_ap (ptr)
+{
+}
+
+CommandReturnObject *
+SBCommandReturnObject::Release ()
+{
+ return m_opaque_ap.release();
+}
+
const SBCommandReturnObject &
SBCommandReturnObject::operator = (const SBCommandReturnObject &rhs)
{
@@ -57,7 +68,7 @@
const char *
SBCommandReturnObject::GetOutput ()
{
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+ LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (m_opaque_ap.get())
{
@@ -77,7 +88,7 @@
const char *
SBCommandReturnObject::GetError ()
{
- LogSP log(lldb_private::GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
+ LogSP log(GetLogIfAllCategoriesSet (LIBLLDB_LOG_API));
if (m_opaque_ap.get())
{
More information about the lldb-commits
mailing list