aboutsummaryrefslogtreecommitdiff
path: root/prototype.h
diff options
context:
space:
mode:
authorPetr Machata <pmachata@redhat.com>2012-11-24 00:40:40 +0100
committerPetr Machata <pmachata@redhat.com>2013-03-08 22:55:26 +0100
commit3ac9b91974678878889776221c390f39f5c2ffcf (patch)
tree9257cb726e0ca50f83c7f7cc7622bc6779fb2af2 /prototype.h
parent58f6487bba4be7da18752e3ce9065723fd9be71f (diff)
downloadltrace-3ac9b91974678878889776221c390f39f5c2ffcf.tar.gz
Implement more of prototype.{c,h}
Diffstat (limited to 'prototype.h')
-rw-r--r--prototype.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/prototype.h b/prototype.h
index 7a75e2f..0181f32 100644
--- a/prototype.h
+++ b/prototype.h
@@ -69,9 +69,14 @@ struct param *prototype_each_param
struct named_type {
struct arg_type_info *info;
int forward : 1;
- int owned : 1;
+ int own_type : 1;
};
+/* Initialize a named type INFO, which, if OWN_TYPE, is destroyed when
+ * named_type_destroy is called. */
+void named_type_init(struct named_type *named,
+ struct arg_type_info *info, int own_type);
+
void named_type_destroy(struct named_type *named);
/* One prototype library. */
@@ -110,7 +115,7 @@ int protolib_add_prototype(struct protolib *plib,
/* Add a named type NAMED to PLIB. Returns 0 on success or a negative
* value on failure. NAME is owned and released on PLIB destruction
- * if OWN_NAME. */
+ * if OWN_NAME. NAMED _pointer_ is copied to PLIB. */
int protolib_add_named_type(struct protolib *plib,
const char *name, int own_name,
struct named_type *named);