]> git.ipfire.org Git - thirdparty/vala.git/commitdiff
girparser: Use properly typed parameters in unresolved_symbol_hash/equal
authorRico Tzschichholz <ricotz@ubuntu.com>
Fri, 6 Oct 2017 12:53:06 +0000 (14:53 +0200)
committerRico Tzschichholz <ricotz@ubuntu.com>
Fri, 6 Oct 2017 12:53:06 +0000 (14:53 +0200)
vala/valagirparser.vala

index ba104ee1788b81b783c34485d873171b3414a3d4..98894e6c3e1c124fb7a2836b5b145a42c7133231 100644 (file)
@@ -3995,8 +3995,7 @@ public class Vala.GirParser : CodeVisitor {
 
        /* Hash and equal functions */
 
-       static uint unresolved_symbol_hash (void *ptr) {
-               var sym = (UnresolvedSymbol) ptr;
+       static uint unresolved_symbol_hash (UnresolvedSymbol? sym) {
                var builder = new StringBuilder ();
                while (sym != null) {
                        builder.append (sym.name);
@@ -4005,9 +4004,7 @@ public class Vala.GirParser : CodeVisitor {
                return builder.str.hash ();
        }
 
-       static bool unresolved_symbol_equal (void *ptr1, void *ptr2) {
-               var sym1 = (UnresolvedSymbol) ptr1;
-               var sym2 = (UnresolvedSymbol) ptr2;
+       static bool unresolved_symbol_equal (UnresolvedSymbol? sym1, UnresolvedSymbol? sym2) {
                while (sym1 != sym2) {
                        if (sym1 == null || sym2 == null) {
                                return false;