summaryrefslogtreecommitdiffstats
path: root/ctok_token.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-20 18:54:20 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-20 18:54:20 +0000
commit44bb5af7ccef417a1d088527fc02af5f0e8d3dc5 (patch)
tree6a28892a1253b4f199a4f55c64b1a65fbdd38386 /ctok_token.c
parentfa150f43db5f9673a5b9dfb0727767eca60e4453 (diff)
downloadrsyslog-44bb5af7ccef417a1d088527fc02af5f0e8d3dc5.tar.gz
rsyslog-44bb5af7ccef417a1d088527fc02af5f0e8d3dc5.tar.xz
rsyslog-44bb5af7ccef417a1d088527fc02af5f0e8d3dc5.zip
begun expr compile process, first steps done
Diffstat (limited to 'ctok_token.c')
-rw-r--r--ctok_token.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/ctok_token.c b/ctok_token.c
index 7e768f37..a0f6b18d 100644
--- a/ctok_token.c
+++ b/ctok_token.c
@@ -61,6 +61,24 @@ CODESTARTobjDestruct(ctok_token)
ENDobjDestruct(ctok_token)
+/* get the rsCStrObj from the token, but do not destruct it. This is meant to
+ * be used by a caller who passes on the string to some other function. The
+ * caller is responsible for destructing it.
+ * rgerhards, 2008-02-20
+ */
+rsRetVal
+ctok_tokenUnlinkCStr(ctok_token_t *pThis, rsCStrObj **ppCStr)
+{
+ DEFiRet;
+
+ ISOBJ_TYPE_assert(pThis, ctok_token);
+ ASSERT(ppCStr != NULL);
+
+ *ppCStr = pThis->pstrVal;
+ pThis->pstrVal = NULL;
+
+ RETiRet;
+}
BEGINObjClassInit(ctok_token, 1) /* class, version */
OBJSetMethodHandler(objMethod_CONSTRUCTION_FINALIZER, ctok_tokenConstructFinalize);