Author: benny
Date: 2006-07-08 13:25:32 +0000 (Sat, 08 Jul 2006)
New Revision: 22294
Modified:
thunar/trunk/ChangeLog
thunar/trunk/thunar-vfs/thunar-vfs-path.c
Log:
2006-07-08 Benedikt Meurer <[EMAIL PROTECTED]>
* thunar-vfs/thunar-vfs-path.c(thunar_vfs_path_escape_uri): Fix
alignment issues for Linux/sparc. Bug #1983.
Modified: thunar/trunk/ChangeLog
===================================================================
--- thunar/trunk/ChangeLog 2006-07-08 12:36:25 UTC (rev 22293)
+++ thunar/trunk/ChangeLog 2006-07-08 13:25:32 UTC (rev 22294)
@@ -1,3 +1,8 @@
+2006-07-08 Benedikt Meurer <[EMAIL PROTECTED]>
+
+ * thunar-vfs/thunar-vfs-path.c(thunar_vfs_path_escape_uri): Fix
+ alignment issues for Linux/sparc. Bug #1983.
+
2006-07-06 Benedikt Meurer <[EMAIL PROTECTED]>
* thunar/thunar-list-model.c(thunar_list_model_get_sort_column_id):
Modified: thunar/trunk/thunar-vfs/thunar-vfs-path.c
===================================================================
--- thunar/trunk/thunar-vfs/thunar-vfs-path.c 2006-07-08 12:36:25 UTC (rev
22293)
+++ thunar/trunk/thunar-vfs/thunar-vfs-path.c 2006-07-08 13:25:32 UTC (rev
22294)
@@ -122,13 +122,22 @@
ThunarVfsPathItem *item;
ThunarVfsPathItem *root = NULL;
- const gchar *s = "file:///";
+ const gchar *s;
guchar c;
gchar *t = buffer + 8;
- /* prepend the 'file:///' string */
+ /* prepend the 'file:///' string (using a simple optimization on i386/ppc) */
+#if defined(__GNUC__) && (defined(__i386__) || defined(__ppc__))
+ s = "file:///";
((guint32 *) buffer)[0] = ((const guint32 *) s)[0];
((guint32 *) buffer)[1] = ((const guint32 *) s)[1];
+#else
+ /* hopefully the compiler will be able to optimize this */
+ buffer[0] = 'f'; buffer[1] = 'i';
+ buffer[2] = 'l'; buffer[3] = 'e';
+ buffer[4] = ':'; buffer[5] = '/';
+ buffer[6] = '/'; buffer[7] = '/';
+#endif
/* generate the path item list (reverse parent relation) */
for (; path->parent != NULL; path = path->parent)
_______________________________________________
Xfce4-commits mailing list
[email protected]
http://foo-projects.org/mailman/listinfo/xfce4-commits