[Lsb-messages] /var/www/bzr/lsb/devel/libtodb2 r34: Attempt to handle bool types in headertodb2

Stew Benedict stewb at linux-foundation.org
Mon Aug 27 20:31:06 UTC 2012


------------------------------------------------------------
revno: 34
committer: Stew Benedict <stewb at linux-foundation.org>
branch nick: libtodb2-ncursesw
timestamp: Mon 2012-08-27 16:31:06 -0400
message:
  Attempt to handle bool types in headertodb2
modified:
  headertodb2/intrinsic
  headertodb2/treeparser2.pm
-------------- next part --------------
=== modified file 'headertodb2/intrinsic'
--- a/headertodb2/intrinsic	2008-07-28 15:06:40 +0000
+++ b/headertodb2/intrinsic	2012-08-27 20:31:06 +0000
@@ -1,3 +1,4 @@
+bool;unsigned char
 void;void
 char;char
 signed char;signed char
@@ -28,4 +29,4 @@
 complex float;float complex
 complex double;double complex
 complex long double;long double complex
-wchar_t;wchar_t
\ No newline at end of file
+wchar_t;wchar_t

=== modified file 'headertodb2/treeparser2.pm'
--- a/headertodb2/treeparser2.pm	2008-07-28 15:06:40 +0000
+++ b/headertodb2/treeparser2.pm	2012-08-27 20:31:06 +0000
@@ -97,6 +97,10 @@
 # arg:  tree node.
 # retn: 1 if array, 0 otherwise.
 sub is_type_array($);
+# Check whether entity's type is boolean.
+# arg:  tree node.
+# retn: 1 if boolean, 0 otherwise.
+sub is_type_bool($);
 # Check whether entity's type is complex.
 # arg:  tree node.
 # retn: 1 if complex, 0 otherwise.
@@ -691,6 +695,13 @@
     return node_type($node, 'array_type');
 }
 
+sub is_type_bool($)
+{
+    my $node = shift;
+
+    return node_type($node, 'boolean_type');
+}
+
 sub is_type_complex($)
 {
     my $node = shift;
@@ -846,11 +857,12 @@
     $type_name = entity_name($node);
 
     if (is_type_complex($node) or is_type_int($node) or
-        is_type_real($node) or is_type_void($node))
+        is_type_real($node) or is_type_void($node) or
+        is_type_bool($node))
     {
         unless (defined($::intrinsic{$type_name}))
         {
-            warn("Tree $node: something strange with inrinsic type '$type_name'");
+            warn("Tree $node: something strange with intrinsic type '$type_name'");
             return '';
         }
 



More information about the lsb-messages mailing list