]> git.ipfire.org Git - thirdparty/libsolv.git/commitdiff
Add datamatch.dep attribute support to the bindings
authorMichael Schroeder <mls@suse.de>
Wed, 27 Mar 2024 10:38:52 +0000 (11:38 +0100)
committerMichael Schroeder <mls@suse.de>
Wed, 27 Mar 2024 10:40:20 +0000 (11:40 +0100)
bindings/solv.i
doc/gen/libsolv-bindings.3
doc/libsolv-bindings.txt

index 0d52f7a4a4958fe421a647c32e27dabd809c045c..68002101c2770244d10883cf8b67a8b82b8f8112 100644 (file)
@@ -3025,6 +3025,8 @@ returnself(matchsolvable)
   Id const id;
   const char * const idstr;
   const char * const str;
+  %newobject dep;
+  Dep * const dep;
   BinaryBlob const binary;
   unsigned long long const num;
   unsigned int const num2;
@@ -3057,6 +3059,13 @@ returnself(matchsolvable)
   SWIGINTERN const char * const Datamatch_str_get(Dataiterator *di) {
     return di->kv.str;
   }
+  SWIGINTERN Dep *Datamatch_dep_get(Dataiterator *di) {
+    if (di->key->type == REPOKEY_TYPE_DIR || di->key->type == REPOKEY_TYPE_DIRSTRARRAY || di->key->type == REPOKEY_TYPE_DIRNUMNUMARRAY)
+      return 0;
+    if (di->data && di->data->localpool)
+      return 0;
+    return new_Dep(di->pool, di->kv.id);
+  }
   SWIGINTERN BinaryBlob Datamatch_binary_get(Dataiterator *di) {
     BinaryBlob bl;
     bl.data = 0;
index a5f675650825c3fbcf04f22cd083d312ce8107a7..d2d3067d16878d18979fd895e1b30e504af85bb4 100644 (file)
@@ -2,12 +2,12 @@
 .\"     Title: Libsolv-Bindings
 .\"    Author: [see the "Author" section]
 .\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\"      Date: 03/26/2024
+.\"      Date: 03/27/2024
 .\"    Manual: LIBSOLV
 .\"    Source: libsolv
 .\"  Language: English
 .\"
-.TH "LIBSOLV\-BINDINGS" "3" "03/26/2024" "libsolv" "LIBSOLV"
+.TH "LIBSOLV\-BINDINGS" "3" "03/27/2024" "libsolv" "LIBSOLV"
 .\" -----------------------------------------------------------------
 .\" * Define some portability stuff
 .\" -----------------------------------------------------------------
@@ -3217,6 +3217,21 @@ The Id of the value that was matched (only valid for id types), either as id or
 .RS 4
 .\}
 .nf
+\fBDep *dep;\fR                               /* read only */
+\fI$d\fR\fB\->{dep}\fR
+\fId\fR\fB\&.dep\fR
+\fId\fR\fB\&.dep\fR
+.fi
+.if n \{\
+.RE
+.\}
+.sp
+The id of the value that was matched converted to a dependency object\&.
+.sp
+.if n \{\
+.RS 4
+.\}
+.nf
 \fBconst char *\fR\fIstr\fR;
 \fI$d\fR\fB\->{str}\fR
 \fId\fR\fB\&.str\fR
index d41def8091dda9b20f34fefa68c36f85a81d6d08..45be37c87b14f21ae9fcf4f8edf38ad44befba7e 100644 (file)
@@ -1769,6 +1769,13 @@ The key type of the value that was matched, either as id or string.
 The Id of the value that was matched (only valid for id types),
 either as id or string.
 
+       Dep *dep;                               /* read only */
+       $d->{dep}
+       d.dep
+       d.dep
+
+The id of the value that was matched converted to a dependency object.
+
        const char *str;
        $d->{str}
        d.str