[prev in list] [next in list] [prev in thread] [next in thread] 

List:       libverto-commits
Subject:    [libverto] [core] add verto_get_ctx()
From:       npmccallum () fedoraproject ! org (Nathaniel McCallum)
Date:       2011-11-18 21:59:34
Message-ID: 20111118215934.A69111201C8 () lists ! fedorahosted ! org
[Download RAW message or body]

commit 4dfa92e76bbbe515c7a29b9265187c466b65dfe9
Author: Nathaniel McCallum <npmccallum at redhat.com>
Date:   Fri Nov 18 16:59:29 2011 -0500

    [core] add verto_get_ctx()

 src/verto.c |    6 ++++++
 src/verto.h |   11 +++++++++++
 tests/abi   |    2 +-
 3 files changed, 18 insertions(+), 1 deletions(-)
---
diff --git a/src/verto.c b/src/verto.c
index d84d8cb..5b0a2a2 100644
--- a/src/verto.c
+++ b/src/verto.c
@@ -763,6 +763,12 @@ verto_get_proc_status(const verto_ev *ev)
     return ev->option.child.status;
 }
 
+verto_ctx *
+verto_get_ctx(const verto_ev *ev)
+{
+    return ev->ctx;
+}
+
 void
 verto_del(verto_ev *ev)
 {
diff --git a/src/verto.h b/src/verto.h
index 91fa720..b1f2896 100644
--- a/src/verto.h
+++ b/src/verto.h
@@ -492,6 +492,17 @@ verto_proc_status
 verto_get_proc_status(const verto_ev *ev);
 
 /**
+ * Gets the verto_ctx associated with a verto_ev.
+ *
+ * This is a borrowed reference, don't attempt to free it!
+ *
+ * @param ev The verto_ev to retrieve the verto_ctx from.
+ * @return The verto_ctx.
+ */
+verto_ctx *
+verto_get_ctx(const verto_ev *ev);
+
+/**
  * Removes an event from from the event context and frees it.
  *
  * The event and its contents cannot be used after this call.
diff --git a/tests/abi b/tests/abi
index 20464cd..9ed0c4c 100755
--- a/tests/abi
+++ b/tests/abi
@@ -13,4 +13,4 @@ fi
 
 HASH=`nm -g $LIBVERTO | awk '/^[0-9a-fA-F]+ T verto_/ { print $NF; }' | sed 's|^_||' \
| sort -u | $HASHCMD | cut -d' ' -f1`  echo "Hash: $HASH"
-test $HASH = 04d2af279a5cf456a37cdd4aece75ff0
+test $HASH = 6a60a3d64f1bd131ce1b81d002b17921


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic