summaryrefslogtreecommitdiff
path: root/src/coucal.h
diff options
context:
space:
mode:
authorXavier Roche <xroche@users.noreply.github.com>2014-06-14 13:07:33 +0000
committerXavier Roche <xroche@users.noreply.github.com>2014-06-14 13:07:33 +0000
commit028f23ca6f977c2cd0dda6a5fb87e479a92b3511 (patch)
tree988cc932d0e5111920547bd9df80b5d98a826d07 /src/coucal.h
parentbf40691b62435829f822cea1e54b4c323700c627 (diff)
Added coucal_get_pvoid() and coucal_get_intptr()
Diffstat (limited to 'src/coucal.h')
-rw-r--r--src/coucal.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/coucal.h b/src/coucal.h
index 6a9da6e..57eaaa1 100644
--- a/src/coucal.h
+++ b/src/coucal.h
@@ -326,7 +326,14 @@ COUCAL_EXTERN int coucal_read(coucal hashtable, coucal_key_const name,
* Same as coucal_read(), but return 0 is the value was zero.
**/
COUCAL_EXTERN int coucal_readptr(coucal hashtable, coucal_key_const name,
- intptr_t * intvalue);
+ intptr_t * intvalue);
+
+/**
+ * Read an integer entry from the hashtable.
+ * Return 0 if the entry could not be found.
+ **/
+COUCAL_EXTERN intptr_t coucal_get_intptr(coucal hashtable,
+ coucal_key_const name);
/**
* Return non-zero value if the given entry exists.
@@ -355,6 +362,12 @@ COUCAL_EXTERN int coucal_read_pvoid(coucal hashtable, coucal_key_const name,
void **value);
/**
+ * Read a pointer entry from the hashtable and returns its value.
+ * Return NULL if the entry could not be found.
+ **/
+COUCAL_EXTERN void* coucal_get_pvoid(coucal hashtable, coucal_key_const name);
+
+/**
* Write a pointer entry to the hashtable.
* Return non-zero value if the entry was added, zero if it was replaced.
**/