]> andersk Git - splint.git/blobdiff - src/ctype.c
Changes to fix malloc size problem.
[splint.git] / src / ctype.c
index 1ea98e0e6b58334f51e95599b99ed456355e8c4e..d3af6069b33f852a44dc1948df37c2763c07e3e8 100644 (file)
@@ -1954,8 +1954,7 @@ ctype_dump (ctype c)
   
   if (ctype_isUA (c))
     {
-      cstring tname = usymtab_getTypeEntryName 
-        (usymtab_convertId (ctype_typeId (c)));
+      cstring tname = usymtab_getTypeEntryName (usymtab_convertTypeId (ctype_typeId (c)));
       
       if (cstring_equal (tname, context_getBoolName ()))
        {
@@ -2296,7 +2295,10 @@ bool ctype_isRefCounted (ctype t)
 
 bool ctype_isVisiblySharable (ctype t)
 {
-  if (ctype_isUnknown (t)) return TRUE;
+  if (ctype_isUnknown (t))
+    {
+      return TRUE;
+    }
 
   if (ctype_isConj (t))
     {
@@ -2312,7 +2314,14 @@ bool ctype_isVisiblySharable (ctype t)
 
          if (rt == t)
            {
-             return TRUE;
+             if (ctype_isNumAbstract (t))
+               {
+                 return FALSE;
+               }
+             else
+               {
+                 return TRUE;
+               }
            }
          else
            {
@@ -2829,7 +2838,7 @@ size_t ctype_getArraySize (ctype c)
 
 ctype ctype_biggerType (ctype c1, ctype c2)
 {
-  if (ctbase_isBigger (ctype_getCtbaseSafe (c2), ctype_getCtbaseSafe (c1)) )
+  if (ctbase_isBigger (ctype_getCtbaseSafe (c2), ctype_getCtbaseSafe (c1)))
     {
       return c2;
     }
@@ -2838,3 +2847,8 @@ ctype ctype_biggerType (ctype c1, ctype c2)
       return c1;
     }
 }
+
+int ctype_getSize (ctype c)
+{
+  return ctbase_getSize (ctype_getCtbaseSafe (ctype_realType (c)));
+}
This page took 0.035277 seconds and 4 git commands to generate.