From 27a26e7ab7d8a8b47c63f68bd1801fc2f9342637 Mon Sep 17 00:00:00 2001 From: Med Ismail Bennani Date: Fri, 18 Nov 2022 13:56:19 -0800 Subject: [lldb/Python] Unify PythonFormat & GetPythonValueFormatString (NFC) This patch removes all occurences to GetPythonValueFormatString and use the template specialization of PythonFormat structs instead. Differential Revision: https://reviews.llvm.org/D134033 Signed-off-by: Med Ismail Bennani --- .../ScriptInterpreter/Python/SWIGPythonBridge.h | 21 --------------------- 1 file changed, 21 deletions(-) (limited to 'lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h') diff --git a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h index 30634c8..6ee6450 100644 --- a/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h +++ b/lldb/source/Plugins/ScriptInterpreter/Python/SWIGPythonBridge.h @@ -86,27 +86,6 @@ python::ScopedPythonObject ToSWIGWrapper(Event *event); } // namespace python -// GetPythonValueFormatString provides a system independent type safe way to -// convert a variable's type into a python value format. Python value formats -// are defined in terms of builtin C types and could change from system to as -// the underlying typedef for uint* types, size_t, off_t and other values -// change. - -template const char *GetPythonValueFormatString(T t); -template <> const char *GetPythonValueFormatString(char *); -template <> const char *GetPythonValueFormatString(char); -template <> const char *GetPythonValueFormatString(unsigned char); -template <> const char *GetPythonValueFormatString(short); -template <> const char *GetPythonValueFormatString(unsigned short); -template <> const char *GetPythonValueFormatString(int); -template <> const char *GetPythonValueFormatString(unsigned int); -template <> const char *GetPythonValueFormatString(long); -template <> const char *GetPythonValueFormatString(unsigned long); -template <> const char *GetPythonValueFormatString(long long); -template <> const char *GetPythonValueFormatString(unsigned long long); -template <> const char *GetPythonValueFormatString(float t); -template <> const char *GetPythonValueFormatString(double t); - void *LLDBSWIGPython_CastPyObjectToSBData(PyObject *data); void *LLDBSWIGPython_CastPyObjectToSBError(PyObject *data); void *LLDBSWIGPython_CastPyObjectToSBValue(PyObject *data); -- cgit v1.1