diff mbox series

[2/5] trace-cruncher: Proper type name for the python objects

Message ID 20211001133346.8217-3-y.karadz@gmail.com (mailing list archive)
State Accepted
Headers show
Series trace-cruncher: Improve error messages | expand

Commit Message

Yordan Karadzhov Oct. 1, 2021, 1:33 p.m. UTC
This name gets printed as part of the error messages. It makes
no sense to have it include the 'C' type since the developer
that will see the error message will have no idea about the 'C'
internals of the Python module.

Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
---
 src/common.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/src/common.h b/src/common.h
index 697b327..b4c66b7 100644
--- a/src/common.h
+++ b/src/common.h
@@ -63,7 +63,7 @@  static inline int no_destroy(void *ptr)
 
 #define STR(x) #x
 
-#define MAKE_TYPE_STR(x) STR(trace.x)
+#define MAKE_TYPE_STR(x) STR(ftracepy.x)
 
 #define MAKE_DIC_STR(x) STR(libtrace x object)
 
@@ -84,7 +84,7 @@  bool py_type##_Check(PyObject *obj);						\
 
 #define  C_OBJECT_WRAPPER(c_type, py_type, obj_destroy, ptr_free)		\
 static PyTypeObject py_type##Type = {						\
-	PyVarObject_HEAD_INIT(NULL, 0) MAKE_TYPE_STR(c_type)			\
+	PyVarObject_HEAD_INIT(NULL, 0) MAKE_TYPE_STR(py_type)			\
 };										\
 PyObject *py_type##_New(struct c_type *c_ptr)					\
 {										\