[dconf/wip/reorg] engine/: mark some structs 'extern' in a header



commit 4228ef3194fff11dcdcdce0b61aa0474fffb066d
Author: Ryan Lortie <desrt desrt ca>
Date:   Sun Jul 8 11:15:11 2012 -0400

    engine/: mark some structs 'extern' in a header
    
    This should have been done in the first place but it went unnoticed
    because the linker has an odd habit of permitting two structs with the
    same name to be defined.
    
    It only became a problem when optimisation was turned on and GCC noticed
    that nobody was writing to one particular copy of that struct and
    assumed that its contents would always be all-zeros (which is an
    assumption that later became untrue once the linker had done its strange
    magic).

 engine/dconf-engine-source-private.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/engine/dconf-engine-source-private.h b/engine/dconf-engine-source-private.h
index 1b6faad..822354a 100644
--- a/engine/dconf-engine-source-private.h
+++ b/engine/dconf-engine-source-private.h
@@ -25,7 +25,7 @@
 
 #include "dconf-engine-source.h"
 
-G_GNUC_INTERNAL const DConfEngineSourceVTable dconf_engine_source_user_vtable;
-G_GNUC_INTERNAL const DConfEngineSourceVTable dconf_engine_source_system_vtable;
+G_GNUC_INTERNAL extern const DConfEngineSourceVTable dconf_engine_source_user_vtable;
+G_GNUC_INTERNAL extern const DConfEngineSourceVTable dconf_engine_source_system_vtable;
 
 #endif /* __dconf_engine_source_private_h__ */



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