[geary] Workaround 64-bit portability issue: Fixes bgo#720433



commit 32deb02141c26acc2c9adddccb34dcbf170eb582
Author: Jim Nelson <jim yorba org>
Date:   Fri Dec 13 15:58:04 2013 -0800

    Workaround 64-bit portability issue: Fixes bgo#720433
    
    This is technically a workaround until Vala fixes bgo#720437.
    Although the code change seems innocuous, the original code
    caused Vala's generator to not cast the returned int value to
    a pointer.

 src/engine/imap/response/imap-server-data.vala |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/src/engine/imap/response/imap-server-data.vala b/src/engine/imap/response/imap-server-data.vala
index 32528bc..bdcc97b 100644
--- a/src/engine/imap/response/imap-server-data.vala
+++ b/src/engine/imap/response/imap-server-data.vala
@@ -153,7 +153,11 @@ public class Geary.Imap.ServerData : ServerResponse {
         
         Gee.List<int> results = new Gee.ArrayList<int>();
         for (int ctr = 2; ctr < size; ctr++) {
-            results.add(get_as_string(ctr).as_int(0));
+            // can't directly return the result from as_int() into results as a Vala bug causes a
+            // build policy violation for uncast int -> pointer on 64-bit architectures:
+            // https://bugzilla.gnome.org/show_bug.cgi?id=720437
+            int result = get_as_string(ctr).as_int(0);
+            results.add(result);
         }
         
         return results;


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]