Author: kkaempf Date: Wed Dec 3 15:33:23 2008 New Revision: 11852 URL: http://svn.opensuse.org/viewcvs/zypp?rev=11852&view=rev Log: put declarations before code Modified: trunk/sat-solver/bindings/solvable.i Modified: trunk/sat-solver/bindings/solvable.i URL: http://svn.opensuse.org/viewcvs/zypp/trunk/sat-solver/bindings/solvable.i?rev=11852&r1=11851&r2=11852&view=diff ============================================================================== --- trunk/sat-solver/bindings/solvable.i (original) +++ trunk/sat-solver/bindings/solvable.i Wed Dec 3 15:33:23 2008 @@ -180,6 +180,9 @@ #endif { Swig_Type result = Swig_Null; + Id key; + Solvable *s; + Dataiterator di; #if defined(SWIGRUBY) char *name; @@ -198,13 +201,11 @@ SWIG_exception( SWIG_ValueError, "Attribute name missing" ); /* key existing in pool ? */ - Id key; key = str2id( $self->pool, name, 0); if (key == ID_NULL) SWIG_exception( SWIG_ValueError, "No such attribute name" ); - Solvable *s = xsolvable_solvable($self); - Dataiterator di; + s = xsolvable_solvable($self); dataiterator_init(&di, s->repo->pool, s->repo, $self->id, key, 0, 0); if (dataiterator_step(&di)) { @@ -229,8 +230,8 @@ { Solvable *s = xsolvable_solvable($self); Dataiterator di; - dataiterator_init(&di, s->repo->pool, s->repo, $self->id, 0, 0, SEARCH_NO_STORAGE_SOLVABLE); VALUE value; + dataiterator_init(&di, s->repo->pool, s->repo, $self->id, 0, 0, SEARCH_NO_STORAGE_SOLVABLE); while (dataiterator_step(&di)) { value = dataiterator_value ( &di ); @@ -241,8 +242,8 @@ { Solvable *s = xsolvable_solvable($self); Dataiterator di; - dataiterator_init(&di, s->repo->pool, s->repo, $self->id, str2id(s->repo->pool,name,0), 0, 0); VALUE value; + dataiterator_init(&di, s->repo->pool, s->repo, $self->id, str2id(s->repo->pool,name,0), 0, 0); while (dataiterator_step(&di)) { value = dataiterator_value ( &di ); -- To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org For additional commands, e-mail: zypp-commit+help@opensuse.org