Mailinglist Archive: zypp-devel (102 mails)
| < Previous | Next > |
[zypp-devel] Re: [zypp-commit] <sat-solver> master : Move owneship of char* to swig
- From: Michael Matz <matz@xxxxxxx>
- Date: Mon, 2 Mar 2009 15:49:24 +0100 (CET)
- Message-id: <Pine.LNX.4.64.0903021544290.29566@xxxxxxxxxxxxx>
Hi Klaus,
On Mon, 2 Mar 2009, Klaus Kämpf wrote:
This change will potentially create a large slowdown and increase memory
use quite a bit as the strings aren't shared anymore but rather are copied
on the fly. That doesn't have to be bad (especially as it's only the
bindings), I just want to make sure that the implications of this are 100%
clear.
Ciao,
Michael.
On Mon, 2 Mar 2009, Klaus Kämpf wrote:
ref: refs/heads/master
commit dba202c5024fa8c06e3f1f1fe9ffbe2d96bb4e04
Author: Klaus Kämpf <kkaempf@xxxxxxx>
Date: Mon Mar 2 15:25:17 2009 +0100
Move owneship of char* to swig
--- a/bindings/repokey.i
+++ b/bindings/repokey.i
@@ -129,7 +129,7 @@ SV *
const char *string()
{
Repokey *key = xrepokey_repokey( $self );
- return my_id2str( $self->repo->pool, key->name );
+ return strdup(my_id2str( $self->repo->pool, key->name ));
This change will potentially create a large slowdown and increase memory
use quite a bit as the strings aren't shared anymore but rather are copied
on the fly. That doesn't have to be bad (especially as it's only the
bindings), I just want to make sure that the implications of this are 100%
clear.
Ciao,
Michael.
| < Previous | Next > |