%rename("==") *::__eq__;
%rename("!=") *::__ne__;
#endif
+#if defined(SWIGPERL) || defined(SWIGTCL) || defined(SWIGLUA)
+%rename("repr") *::__repr__;
+#endif
%typemap(in,numinputs=0,noblock=1) XRule **OUTPUT ($*1_ltype temp) {
$1 = &temp;
const char *__str__() {
return pool_job2str($self->pool, $self->how, $self->what, 0);
}
-#if defined(SWIGPERL) || defined(SWIGTCL)
- %rename("repr") __repr__;
-#endif
const char *__repr__() {
const char *str = pool_job2str($self->pool, $self->how, $self->what, ~0);
return pool_tmpjoin($self->pool, "<Job ", str, ">");
const char *__str__() {
return pool_selection2str($self->pool, &$self->q, 0);
}
-#if defined(SWIGPERL) || defined(SWIGTCL)
- %rename("repr") __repr__;
-#endif
const char *__repr__() {
const char *str = pool_selection2str($self->pool, &$self->q, ~0);
return pool_tmpjoin($self->pool, "<Selection ", str, ">");
solv_free((void *)h);
return str;
}
-#if defined(SWIGPERL) || defined(SWIGTCL)
- %rename("repr") __repr__;
-#endif
%newobject __repr__;
const char *__repr__() {
const char *h = Chksum___str__($self);
sprintf(buf, "Repo#%d", $self->repoid);
return solv_strdup(buf);
}
-#if defined(SWIGPERL) || defined(SWIGTCL)
- %rename("repr") __repr__;
-#endif
%newobject __repr__;
const char *__repr__() {
char buf[20];
const char *__str__() {
return pool_dep2str($self->pool, $self->id);
}
-#if defined(SWIGPERL) || defined(SWIGTCL)
- %rename("repr") __repr__;
-#endif
%newobject __repr__;
const char *__repr__() {
char buf[20];
const char *__str__() {
return pool_solvid2str($self->pool, $self->id);
}
-#if defined(SWIGPERL) || defined(SWIGTCL)
- %rename("repr") __repr__;
-#endif
%newobject __repr__;
const char *__repr__() {
char buf[20];
e->rp = rp;
return e;
}
+ /* legacy */
const char *str() {
return solver_solutionelementtype2str($self->solv, $self->type, $self->p, $self->rp);
}
+ const char *__str__() {
+ return solver_solutionelementtype2str($self->solv, $self->type, $self->p, $self->rp);
+ }
%typemap(out) Queue replaceelements Queue2Array(Solutionelement *, 1, new_Solutionelement(arg1->solv, arg1->problemid, arg1->solutionid, id, arg1->p, arg1->rp));
%newobject replaceelements;
Queue replaceelements() {
int __hash__() {
return $self->id;
}
-#endif
-#if defined(SWIGPERL) || defined(SWIGTCL)
- %rename("repr") __repr__;
#endif
%newobject __repr__;
const char *__repr__() {
int __hash__() {
return $self->id;
}
-#endif
-#if defined(SWIGPERL) || defined(SWIGTCL)
- %rename("repr") __repr__;
#endif
%newobject __repr__;
const char *__repr__() {
.\" Title: Libsolv-Bindings
.\" Author: [see the "Author" section]
.\" Generator: DocBook XSL Stylesheets vsnapshot <http://docbook.sf.net/>
-.\" Date: 03/25/2024
+.\" Date: 03/26/2024
.\" Manual: LIBSOLV
.\" Source: libsolv
.\" Language: English
.\"
-.TH "LIBSOLV\-BINDINGS" "3" "03/25/2024" "libsolv" "LIBSOLV"
+.TH "LIBSOLV\-BINDINGS" "3" "03/26/2024" "libsolv" "LIBSOLV"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
.RS 4
.\}
.nf
-\fBconst char *str()\fR
-my \fI$str\fR \fB=\fR \fI$solutionelement\fR\fB\->str()\fR;
-\fIstr\fR \fB=\fR \fIsolutionelement\fR\fB\&.str()\fR
-\fIstr\fR \fB=\fR \fIsolutionelement\fR\fB\&.str()\fR
+\fB<stringification>\fR
+my \fI$str\fR \fB=\fR \fI$solutionelement\fR\fB\->str\fR;
+\fIstr\fR \fB= str(\fR\fIsolutionelement\fR\fB)\fR
+\fIstr\fR \fB=\fR \fIsolutionelement\fR\fB\&.to_s\fR
.fi
.if n \{\
.RE
SOLVER_SOLUTION_POOLJOB. For the latter two, a SOLVER_NOOB Job is created,
you should replace the old job with the new one.
- const char *str()
- my $str = $solutionelement->str();
- str = solutionelement.str()
- str = solutionelement.str()
+ <stringification>
+ my $str = $solutionelement->str;
+ str = str(solutionelement)
+ str = solutionelement.to_s
A string describing the change the solution element consists of.