[Lsb-messages] /var/www/bzr/lsb/devel/dbadmin r288: Fix for processing of 'pointer to array' type members
Denis Silakov
denis.silakov at rosalab.ru
Fri Aug 23 06:18:55 UTC 2013
------------------------------------------------------------
revno: 288
committer: Denis Silakov <denis.silakov at rosalab.ru>
branch nick: dbadmin
timestamp: Fri 2013-08-23 10:18:55 +0400
message:
Fix for processing of 'pointer to array' type members
modified:
type_single.inc
-------------- next part --------------
=== modified file 'type_single.inc'
--- a/type_single.inc 2012-09-10 17:07:47 +0000
+++ b/type_single.inc 2013-08-23 06:18:55 +0000
@@ -1103,7 +1103,8 @@
$suffix = "[]";
}
} else if( $entry['Ttype'] == 'Pointer' ) {
- $baseselect = "SELECT Ttype FROM Type
+ $baseselect = "SELECT DISTINCT Ttype, ATsize, ATbasetype FROM Type
+ JOIN ArchType ON ATtid=Tid
WHERE Tid=".$entry['ATbasetype'];
$res = Query($baseselect);
$bentry = current($res);
@@ -1145,6 +1146,21 @@
}
}
}
+ else if( $bentry['Ttype'] == 'Array' ) {
+ $tselect ="SELECT Ttype, ATsize FROM Type
+ LEFT JOIN ArchType ON ATtid=Tid
+ WHERE Tid=".$bentry['ATbasetype'];
+ $res = Query($tselect);
+ $bentry2 = current($res);
+ if ($bentry2['Ttype'] == 'Array') {
+ print "[".$bentry2['ATsize']."]"."[".$bentry['ATsize']."]";
+ } else if( $bentry['ATsize'] and $bentry['ATsize'] != '0' ) {
+ print "[".$bentry['ATsize']."]";
+ } else {
+ print "[]";
+ }
+ }
+
if( $tmentry['TMbitfield'] != 0 ) {
print ":".$tmentry['TMbitfield'];
}
More information about the lsb-messages
mailing list