diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-12 10:55:57 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-12 10:55:57 +0000 |
commit | 4e535179edb6e7b941276c451f6315c46dbda54a (patch) | |
tree | d3f51de62c9a223a7da13209b22a07432fdecf54 /stringbuf.h | |
parent | a2ae345e1851c4719ba99da46498f3fc120f2e95 (diff) | |
download | rsyslog-4e535179edb6e7b941276c451f6315c46dbda54a.tar.gz rsyslog-4e535179edb6e7b941276c451f6315c46dbda54a.tar.xz rsyslog-4e535179edb6e7b941276c451f6315c46dbda54a.zip |
somewhat improved performance of rsCStr obj
Diffstat (limited to 'stringbuf.h')
-rwxr-xr-x | stringbuf.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/stringbuf.h b/stringbuf.h index 59f6e2fc..4649758a 100755 --- a/stringbuf.h +++ b/stringbuf.h @@ -147,6 +147,14 @@ int rsCStrSzStrMatchRegex(rsCStrObj *pCS1, uchar *psz); int rsCStrLen(rsCStrObj *pThis);
#endif
+#if STRINGBUF_TRIM_ALLOCSIZE != 1
+/* This is the normal case (see comment in rsCStrFinish!). In those cases, the function
+ * simply needs to do nothing, so that we can save us the function call.
+ * rgerhards, 2008-02-12
+ */
+#define rsCStrFinish(pThis) RS_RET_OK
+#endif
+
#define rsCStrGetBufBeg(x) ((x)->pBuf)
#endif /* single include */
|