Hi Klaus, On Mon, 2 Mar 2009, Klaus Kämpf wrote:
ref: refs/heads/master commit dba202c5024fa8c06e3f1f1fe9ffbe2d96bb4e04 Author: Klaus Kämpf
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.