[augeas-devel] augeas: master - * src/lens.c (lns_make_subtype): explain type derivation

David Lutterkort lutter at fedoraproject.org
Fri Nov 13 19:26:38 UTC 2009


Gitweb:        http://git.fedorahosted.org/git/augeas.git?p=augeas.git;a=commitdiff;h=297c8c75c7b9907d20f19ac77abb839acf8e1f94
Commit:        297c8c75c7b9907d20f19ac77abb839acf8e1f94
Parent:        d995f669ccd167cf728aab1eb113f3a3373a772b
Author:        David Lutterkort <lutter at redhat.com>
AuthorDate:    Mon Oct 26 15:01:21 2009 +0100
Committer:     David Lutterkort <lutter at redhat.com>
CommitterDate: Thu Nov 12 16:25:16 2009 -0800

* src/lens.c (lns_make_subtype): explain type derivation

---
 src/lens.c |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/lens.c b/src/lens.c
index d4a8b4b..f1f52e2 100644
--- a/src/lens.c
+++ b/src/lens.c
@@ -216,6 +216,16 @@ struct value *lns_make_concat(struct info *info,
     return make_lens_value(lens);
 }
 
+/*
+ * A subtree lens l1 = [ l ]
+ *
+ * Types are assigned as follows:
+ *
+ * l1->ctype = l->ctype
+ * l1->atype = encode(l->ktype, l->vtype)
+ * l1->ktype = NULL
+ * l1->vtype = NULL
+ */
 struct value *lns_make_subtree(struct info *info, struct lens *l) {
     struct lens *lens;
     const char *kpat = (l->ktype == NULL) ? ENC_NULL : l->ktype->pattern->str;




More information about the augeas-devel mailing list