mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-26 09:20:34 +05:00
Revert "allow utf-8 variables names in Python dump"
Needs a more in depth analysis...
This reverts commit 50b5fac2a8
.
This commit is contained in:
parent
c600d3a4e7
commit
a8d98187a5
@ -884,25 +884,25 @@ namespace {
|
|||||||
bool isValidName = true;
|
bool isValidName = true;
|
||||||
int nbUnderscore = 0;
|
int nbUnderscore = 0;
|
||||||
int p;
|
int p;
|
||||||
// // replace not allowed chars by underscore
|
// replace not allowed chars by underscore
|
||||||
// const char* name = aName.ToCString();
|
const char* name = aName.ToCString();
|
||||||
// for ( p = 0; name[p]; ++p ) {
|
for ( p = 0; name[p]; ++p ) {
|
||||||
// if ( !isalnum( name[p] ) && name[p] != '_' )
|
if ( !isalnum( name[p] ) && name[p] != '_' )
|
||||||
// {
|
{
|
||||||
// if ( p == 0 || p+1 == aName.Length() || name[p-1] == '_')
|
if ( p == 0 || p+1 == aName.Length() || name[p-1] == '_')
|
||||||
// {
|
{
|
||||||
// aName.Remove( p+1, 1 ); // remove __ and _ from the start and the end
|
aName.Remove( p+1, 1 ); // remove __ and _ from the start and the end
|
||||||
// --p;
|
--p;
|
||||||
// name = aName.ToCString();
|
name = aName.ToCString();
|
||||||
// }
|
}
|
||||||
// else
|
else
|
||||||
// {
|
{
|
||||||
// aName.SetValue( p+1, '_');
|
aName.SetValue( p+1, '_');
|
||||||
// nbUnderscore++;
|
nbUnderscore++;
|
||||||
// }
|
}
|
||||||
// isValidName = false;
|
isValidName = false;
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// aName must not start with a digit
|
// aName must not start with a digit
|
||||||
if ( aName.IsIntegerValue() ) {
|
if ( aName.IsIntegerValue() ) {
|
||||||
aName.Insert( 1, 'a' );
|
aName.Insert( 1, 'a' );
|
||||||
|
Loading…
Reference in New Issue
Block a user