* Michael Matz
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.
Yes, thanks for noting. solvable2str() returns a temporary string and needs strdup(). However, memory ownership in Swig can only be set per function-name (here 'string'), affecting all other 'string' functions. Klaus P.S. Wow, people actuall read zypp-commit ;-) -- To unsubscribe, e-mail: zypp-devel+unsubscribe@opensuse.org For additional commands, e-mail: zypp-devel+help@opensuse.org