Author: aschnell Date: Thu Apr 12 17:17:15 2012 New Revision: 67930 URL: http://svn.opensuse.org/viewcvs/yast?rev=67930&view=rev Log: - don't use deprecated YCPMapIterator Modified: trunk/perl-bindings/src/YPerl.cc Modified: trunk/perl-bindings/src/YPerl.cc URL: http://svn.opensuse.org/viewcvs/yast/trunk/perl-bindings/src/YPerl.cc?rev=67... ============================================================================== --- trunk/perl-bindings/src/YPerl.cc (original) +++ trunk/perl-bindings/src/YPerl.cc Thu Apr 12 17:17:15 2012 @@ -509,18 +509,18 @@ // Fill hash // - for ( YCPMapIterator it = map->begin(); it != map->end(); ++it ) + for ( YCPMap::const_iterator it = map->begin(); it != map->end(); ++it ) { string keyStr; - if ( it.key()->isString() ) keyStr = it.key()->asString()->value(); - else if ( it.key()->isSymbol() ) keyStr = it.key()->asSymbol()->symbol(); - else if ( it.key()->isInteger() ) keyStr = it.key()->toString(); + if ( it->first->isString() ) keyStr = it->first->asString()->value(); + else if ( it->first->isSymbol() ) keyStr = it->first->asSymbol()->symbol(); + else if ( it->first->isInteger() ) keyStr = it->first->toString(); if ( keyStr.empty() ) { y2error( "Couldn't convert YCP map key '%s' to Perl hash key", - it.key()->toString().c_str() ); + it->first->toString().c_str() ); } else { @@ -528,7 +528,7 @@ // Add one key / value pair // - SV * scalarVal = newPerlScalar( it.value(), true ); + SV * scalarVal = newPerlScalar( it->second, true ); if ( scalarVal ) { @@ -537,7 +537,7 @@ if ( ret == 0 ) { y2error( "Couldn't insert Perl hash value '%s' => '%s'", - keyStr.c_str(), it.value()->toString().c_str() ); + keyStr.c_str(), it->second->toString().c_str() ); SvREFCNT_dec( scalarVal ); // Free scalar (avoid memory leak) } @@ -550,7 +550,7 @@ else { y2error( "Couldn't convert YCP map value '%s' to Perl hash value", - it.value()->toString().c_str() ); + it->second->toString().c_str() ); } } } -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org