ref: refs/heads/master
commit 12df9d1208b3ce630476aae572095394d9ade74c
Author: Klaus Kämpf
Date: Mon Mar 30 10:36:45 2009 +0200
fix 'attr' declaration and comment for rdoc
---
bindings/solvable.i | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/bindings/solvable.i b/bindings/solvable.i
index fa43415..bb49f44 100644
--- a/bindings/solvable.i
+++ b/bindings/solvable.i
@@ -368,22 +368,38 @@ typedef struct _Solvable {} XSolvable; /* expose XSolvable as 'Solvable' */
/* %rename is rejected by swig for [] */
%alias attr "[]";
/*
- * Attribute accessor
+ * Attribute accessor.
+ *
+ * It takes either a string or a symbol and returns
+ * the value of the attribute.
+ *
+ * If its a symbol, all underline characters are converted
+ * to colons. E.g. +:solvable_installsize+ -> +"solvable:installsize"+
+ *
+ * A +ValueError+ exception is raised if the attribute
+ * name does not exist.
+ *
+ * +nil+ is returned if the attribute name exists but is not set for
+ * the solvable.
+ *
*
* call-seq:
* solvable["solvable:installsize"] -> VALUE
* solvable.attr("solvable:installsize") -> VALUE
+ * solvable.attr(:solvable_installsize) -> VALUE
*
*/
VALUE attr( VALUE attrname )
+ {
#endif
#if defined(SWIGPYTHON)
PyObject *attr( const char *name )
+ {
#endif
#if defined(SWIGPERL)
SV *attr( const char *name )
-#endif
{
+#endif
Swig_Type result = Swig_Null;
Id key;
Solvable *s;
@@ -426,6 +442,7 @@ fail:
return result;
}
+
/*
* iterate over all attributes
*/
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org