From: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
To: linux-trace-devel@vger.kernel.org
Cc: "Yordan Karadzhov (VMware)" <y.karadz@gmail.com>
Subject: [PATCH 2/5] trace-cruncher: Proper type name for the python objects
Date: Fri, 1 Oct 2021 16:33:43 +0300 [thread overview]
Message-ID: <20211001133346.8217-3-y.karadz@gmail.com> (raw)
In-Reply-To: <20211001133346.8217-1-y.karadz@gmail.com>
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 --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) \
{ \
--
2.30.2
next prev parent reply other threads:[~2021-10-01 13:33 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-01 13:33 [PATCH 0/5] trace-cruncher: Improve error messages Yordan Karadzhov (VMware)
2021-10-01 13:33 ` [PATCH 1/5] trace-cruncher: Error on fail to destroy Yordan Karadzhov (VMware)
2021-10-01 13:33 ` Yordan Karadzhov (VMware) [this message]
2021-10-01 13:33 ` [PATCH 3/5] trace-cruncher: Correct misleading error message Yordan Karadzhov (VMware)
2021-10-01 13:33 ` [PATCH 4/5] trace-cruncher: Proper labeling of the libtracefs errors Yordan Karadzhov (VMware)
2021-10-01 13:33 ` [PATCH 5/5] trace-cruncher: Proper labeling of non " Yordan Karadzhov (VMware)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211001133346.8217-3-y.karadz@gmail.com \
--to=y.karadz@gmail.com \
--cc=linux-trace-devel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).