3.1.3-1 (lb-1.7.5-1)
- align attr_names[] (used in getAttrName methods) in Event and JobStatus
to definitions in *.h from lb.client-interface
+
+3.1.4-1
+- do the previous quick fix thoroughly -- don't smash name_with_underscores
+ and nameWithUppercaseLetters
static
std::string const attr_names[Event::ATTR_MAX] = {
@@@{
-# for (sort {$a cmp $b} getAllFields $event) {
-# gen "\t\"$_\",\n";
-# }
+ my %s;
+
+ for (getAllFields $event) {
+ my $id = $_;
+ $id =~ s/([a-z])([A-Z])/$1_$2/g;
+ $s{uc($id)} = $_;
+ }
for (@main::EventAttrNames) {
- $_ = lc $_;
- gen "\t\"$_\",\n";
+ gen "\t\"$s{$_}\",\n";
}
@@@}
};
static std::string const attr_names[JobStatus::ATTR_MAX] = {
@@@{
-# for (sort {$a cmp $b} getAllFields $status) {
+ my %s;
+
+ for (getAllFields $status) {
+ my $id = $_;
+ $id =~ s/([a-z])([A-Z])/$1_$2/g;
+ $s{uc($id)} = $_;
+ }
for (@main::StatusAttrNames) {
- $_ = lc $_;
- gen "\t\"$_\",\n";
+ gen "\t\"$s{$_}\",\n";
}
@@@}
};