Fix a problem with the PLT reduction changes which caused the internal

2004-11-23  Matthias Clasen  <mclasen@redhat.com>

	Fix a problem with the PLT reduction changes which caused the
	internal aliases to lose all attributes.

	* glib/glib.symbols: Add attribute annotations.
	* glib/makegalias.pl: Keep attribute annotations, but strip PRIVATE.
	* glib/Makefile.am (glib.def): Strip attribute annotations, but keep
	PRIVATE.
This commit is contained in:
Matthias Clasen
2004-11-23 17:56:58 +00:00
committed by Matthias Clasen
parent 1aa5b57737
commit 0680744fbb
12 changed files with 153 additions and 73 deletions

View File

@@ -1,3 +1,16 @@
2004-11-23 Matthias Clasen <mclasen@redhat.com>
Fix a problem with the PLT reduction changes which caused the
internal aliases to lose all attributes.
* gobject.symbols: Add attribute annotations.
* makegobjectalias.pl: Keep attribute annotations, but strip PRIVATE.
* Makefile.am (gobject.def): Strip attribute annotations, but keep
PRIVATE.
* gtypemodule.h (g_type_module_get_type): Mark as const,
like all other get_type() functions.
2004-11-12 Matthias Clasen <mclasen@redhat.com>
* === Released 2.5.6 ===

View File

@@ -14,7 +14,7 @@ INCLUDES = \
-DG_DISABLE_CONST_RETURNS
gobject.def: gobject.symbols
(echo -e EXPORTS; cpp -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 $(srcdir)/gobject.symbols | sed -e '/^$$/d' -e 's/^/ /' | sort) > gobject.def
(echo -e EXPORTS; cpp -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 $(srcdir)/gobject.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//' | sort) > gobject.def
gobjectalias.h: gobject.symbols
$(srcdir)/makegobjectalias.pl < $(srcdir)/gobject.symbols > gobjectalias.h

View File

@@ -28,7 +28,7 @@ g_cclosure_new_swap
g_closure_add_finalize_notifier
g_closure_add_invalidate_notifier
g_closure_add_marshal_guards
g_closure_get_type
g_closure_get_type G_GNUC_CONST
g_closure_invalidate
g_closure_invoke
g_closure_new_object
@@ -50,7 +50,7 @@ g_flags_get_first_value
g_flags_get_value_by_name
g_flags_get_value_by_nick
g_flags_register_static
g_gstring_get_type
g_gstring_get_type G_GNUC_CONST
g_io_channel_get_type
g_io_condition_get_type
g_object_add_weak_pointer
@@ -173,7 +173,7 @@ g_signal_stop_emission_by_name
g_signal_type_cclosure_new
g_source_set_closure
g_strdup_value_contents
g_strv_get_type
g_strv_get_type G_GNUC_CONST
g_type_add_class_cache_func
g_type_add_interface_check
g_type_add_interface_dynamic
@@ -216,7 +216,7 @@ g_type_interface_prerequisites
g_type_interfaces
g_type_is_a
g_type_module_add_interface
g_type_module_get_type
g_type_module_get_type G_GNUC_CONST
g_type_module_register_enum
g_type_module_register_flags
g_type_module_register_type
@@ -230,7 +230,7 @@ g_type_next_base
g_type_parent
g_type_plugin_complete_interface_info
g_type_plugin_complete_type_info
g_type_plugin_get_type
g_type_plugin_get_type G_GNUC_GET_TYPE
g_type_plugin_unuse
g_type_plugin_use
g_type_qname
@@ -247,7 +247,7 @@ g_value_array_append
g_value_array_copy
g_value_array_free
g_value_array_get_nth
g_value_array_get_type
g_value_array_get_type G_GNUC_CONST
g_value_array_insert
g_value_array_new
g_value_array_prepend
@@ -274,7 +274,7 @@ g_value_get_object
g_value_get_param
g_value_get_pointer
g_value_get_string
g_value_get_type
g_value_get_type G_GNUC_CONST
g_value_get_uchar
g_value_get_uint
g_value_get_uint64

View File

@@ -72,15 +72,23 @@ while (<>) {
next;
}
chop;
my $str = $_;
my @words;
my $attributes = "";
@words = split(/ /, $str);
$str = shift(@words);
chomp($str);
# Drop any Win32 specific .def file syntax
$str = (split (/ /, $str))[0];
my $alias = "IA__".$str;
# Drop any Win32 specific .def file syntax, but keep attributes
foreach $word (@words) {
$attributes = "$attributes $word" unless $word eq "PRIVATE";
}
print <<EOF
extern __typeof ($str) $alias __attribute((visibility("hidden")));
extern __typeof ($str) $alias __attribute((visibility("hidden")))$attributes;
extern __typeof ($str) $str __attribute((alias("$alias"), visibility("default")));
\#define $str $alias