[vala/0.34] girparser: Use properly typed parameters in unresolved_symbol_hash/equal
- From: Rico Tzschichholz <ricotz src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vala/0.34] girparser: Use properly typed parameters in unresolved_symbol_hash/equal
- Date: Fri, 6 Oct 2017 12:54:02 +0000 (UTC)
commit ffeacabfb6bf20477ba4be1b98847069a891abcf
Author: Rico Tzschichholz <ricotz ubuntu com>
Date: Fri Oct 6 14:53:06 2017 +0200
girparser: Use properly typed parameters in unresolved_symbol_hash/equal
vala/valagirparser.vala | 7 ++-----
1 files changed, 2 insertions(+), 5 deletions(-)
---
diff --git a/vala/valagirparser.vala b/vala/valagirparser.vala
index ba104ee..98894e6 100644
--- a/vala/valagirparser.vala
+++ b/vala/valagirparser.vala
@@ -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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]