From 0680744fbbe5d0c89a47ad042ea6a46ff09d15dd Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 23 Nov 2004 17:56:58 +0000 Subject: [PATCH] Fix a problem with the PLT reduction changes which caused the internal 2004-11-23 Matthias Clasen 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. --- ChangeLog | 10 ++++ ChangeLog.pre-2-10 | 10 ++++ ChangeLog.pre-2-12 | 10 ++++ ChangeLog.pre-2-6 | 10 ++++ ChangeLog.pre-2-8 | 10 ++++ glib/Makefile.am | 2 +- glib/glib.symbols | 112 ++++++++++++++++++------------------ glib/makegalias.pl | 17 ++++-- gobject/ChangeLog | 13 +++++ gobject/Makefile.am | 2 +- gobject/gobject.symbols | 14 ++--- gobject/makegobjectalias.pl | 16 ++++-- 12 files changed, 153 insertions(+), 73 deletions(-) diff --git a/ChangeLog b/ChangeLog index f5c0b60bc..0e03561a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2004-11-23 Matthias Clasen + + Fix a problem with the PLT reduction changes which caused the + internal aliases to use 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. + 2004-11-21 Hans Breuer * **/makefile.msc : updated diff --git a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10 index f5c0b60bc..0e03561a5 100644 --- a/ChangeLog.pre-2-10 +++ b/ChangeLog.pre-2-10 @@ -1,3 +1,13 @@ +2004-11-23 Matthias Clasen + + Fix a problem with the PLT reduction changes which caused the + internal aliases to use 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. + 2004-11-21 Hans Breuer * **/makefile.msc : updated diff --git a/ChangeLog.pre-2-12 b/ChangeLog.pre-2-12 index f5c0b60bc..0e03561a5 100644 --- a/ChangeLog.pre-2-12 +++ b/ChangeLog.pre-2-12 @@ -1,3 +1,13 @@ +2004-11-23 Matthias Clasen + + Fix a problem with the PLT reduction changes which caused the + internal aliases to use 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. + 2004-11-21 Hans Breuer * **/makefile.msc : updated diff --git a/ChangeLog.pre-2-6 b/ChangeLog.pre-2-6 index f5c0b60bc..0e03561a5 100644 --- a/ChangeLog.pre-2-6 +++ b/ChangeLog.pre-2-6 @@ -1,3 +1,13 @@ +2004-11-23 Matthias Clasen + + Fix a problem with the PLT reduction changes which caused the + internal aliases to use 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. + 2004-11-21 Hans Breuer * **/makefile.msc : updated diff --git a/ChangeLog.pre-2-8 b/ChangeLog.pre-2-8 index f5c0b60bc..0e03561a5 100644 --- a/ChangeLog.pre-2-8 +++ b/ChangeLog.pre-2-8 @@ -1,3 +1,13 @@ +2004-11-23 Matthias Clasen + + Fix a problem with the PLT reduction changes which caused the + internal aliases to use 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. + 2004-11-21 Hans Breuer * **/makefile.msc : updated diff --git a/glib/Makefile.am b/glib/Makefile.am index b3e167362..434f98cd0 100644 --- a/glib/Makefile.am +++ b/glib/Makefile.am @@ -14,7 +14,7 @@ INCLUDES = -I$(top_srcdir) -DG_LOG_DOMAIN=\"GLib\" \ $(GLIB_DEBUG_FLAGS) -DG_DISABLE_DEPRECATED -DGLIB_COMPILATION glib.def: glib.symbols - (echo -e EXPORTS; cpp -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 $(srcdir)/glib.symbols | sed -e '/^$$/d' -e 's/^/ /') > glib.def + (echo -e EXPORTS; cpp -P -DINCLUDE_VARIABLES -DINCLUDE_INTERNAL_SYMBOLS -DG_OS_WIN32 $(srcdir)/glib.symbols | sed -e '/^$$/d' -e 's/^/ /' -e 's/G_GNUC_[^ ]*//g') > glib.def galias.h: glib.symbols $(srcdir)/makegalias.pl < $(srcdir)/glib.symbols > galias.h diff --git a/glib/glib.symbols b/glib/glib.symbols index 580fe6da2..7b9dcea30 100644 --- a/glib/glib.symbols +++ b/glib/glib.symbols @@ -12,7 +12,7 @@ g_array_set_size g_array_sized_new g_array_sort g_array_sort_with_data -g_ascii_digit_value +g_ascii_digit_value G_GNUC_CONST g_ascii_dtostr g_ascii_formatd g_ascii_strcasecmp @@ -21,10 +21,10 @@ g_ascii_strncasecmp g_ascii_strtod g_ascii_strtoull g_ascii_strup -g_ascii_tolower -g_ascii_toupper -g_ascii_xdigit_value -g_assert_warning +g_ascii_tolower G_GNUC_CONST +g_ascii_toupper G_GNUC_CONST +g_ascii_xdigit_value G_GNUC_CONST +g_assert_warning G_GNUC_NORETURN g_async_queue_length g_async_queue_length_unlocked g_async_queue_lock @@ -113,15 +113,15 @@ g_date_get_days_in_month g_date_get_iso8601_week_of_year g_date_get_julian g_date_get_monday_week_of_year -g_date_get_monday_weeks_in_year +g_date_get_monday_weeks_in_year G_GNUC_CONST g_date_get_month g_date_get_sunday_week_of_year -g_date_get_sunday_weeks_in_year +g_date_get_sunday_weeks_in_year G_GNUC_CONST g_date_get_weekday g_date_get_year g_date_is_first_of_month g_date_is_last_of_month -g_date_is_leap_year +g_date_is_leap_year G_GNUC_CONST g_date_new g_date_new_dmy g_date_new_julian @@ -139,15 +139,15 @@ g_date_subtract_months g_date_subtract_years g_date_to_struct_tm g_date_valid -g_date_valid_day +g_date_valid_day G_GNUC_CONST g_date_valid_dmy -g_date_valid_julian -g_date_valid_month -g_date_valid_weekday -g_date_valid_year +g_date_valid_julian G_GNUC_CONST +g_date_valid_month G_GNUC_CONST +g_date_valid_weekday G_GNUC_CONST +g_date_valid_year G_GNUC_CONST g_dir_close -g_direct_equal -g_direct_hash +g_direct_equal G_GNUC_CONST +g_direct_hash G_GNUC_CONST g_dir_open PRIVATE #ifdef G_OS_WIN32 g_dir_open_utf8 @@ -160,7 +160,7 @@ g_dir_rewind g_error_copy g_error_free g_error_matches -g_error_new +g_error_new G_GNUC_PRINTF(3,4) g_error_new_literal g_file_error_from_errno g_file_error_quark @@ -190,7 +190,7 @@ g_file_test_utf8 #endif g_find_program_in_path g_fopen -g_fprintf +g_fprintf G_GNUC_PRINTF(2,3) g_free g_freopen g_get_application_name @@ -385,7 +385,7 @@ g_list_sort g_list_sort_with_data g_locale_from_utf8 g_locale_to_utf8 -g_log +g_log G_GNUC_PRINTF(3,4) g_log_default_handler g_log_remove_handler g_log_set_always_fatal @@ -433,7 +433,7 @@ g_markup_parse_context_get_element g_markup_parse_context_get_position g_markup_parse_context_new g_markup_parse_context_parse -g_markup_printf_escaped +g_markup_printf_escaped G_GNUC_PRINTF(1,2) g_markup_vprintf_escaped g_mem_chunk_alloc g_mem_chunk_alloc0 @@ -488,7 +488,7 @@ g_on_error_stack_trace g_open g_option_context_add_group g_option_context_add_main_entries -g_option_error_quark +g_option_error_quark G_GNUC_CONST g_option_context_free g_option_context_get_help_enabled g_option_context_get_ignore_unknown_options @@ -516,9 +516,9 @@ g_pattern_match_string g_pattern_spec_equal g_pattern_spec_free g_pattern_spec_new -g_print -g_printerr -g_printf +g_print G_GNUC_PRINTF(1,2) +g_printerr G_GNUC_PRINTF(1,2) +g_printf G_GNUC_PRINTF(1,2) g_printf_string_upper_bound g_propagate_error g_ptr_array_add @@ -537,7 +537,7 @@ g_ptr_array_sort_with_data g_qsort_with_data g_quark_from_static_string g_quark_from_string -g_quark_to_string +g_quark_to_string G_GNUC_CONST g_quark_try_string g_queue_copy g_queue_delete_link @@ -611,7 +611,7 @@ g_scanner_cur_token g_scanner_cur_value g_scanner_destroy g_scanner_eof -g_scanner_error +g_scanner_error G_GNUC_PRINTF(2,3) g_scanner_get_next_token g_scanner_input_file g_scanner_input_text @@ -625,10 +625,10 @@ g_scanner_scope_remove_symbol g_scanner_set_scope g_scanner_sync_file_offset g_scanner_unexp_token -g_scanner_warn +g_scanner_warn G_GNUC_PRINTF(2,3) g_set_application_name g_setenv -g_set_error +g_set_error G_GNUC_PRINTF(4,5) g_set_prgname g_set_printerr_handler g_set_print_handler @@ -664,7 +664,7 @@ g_slist_remove_link g_slist_reverse g_slist_sort g_slist_sort_with_data -g_snprintf +g_snprintf G_GNUC_PRINTF(3,4) g_source_add_poll g_source_attach g_source_destroy @@ -684,7 +684,7 @@ g_source_set_callback_indirect g_source_set_can_recurse g_source_set_priority g_source_unref -g_spaced_primes_closest +g_spaced_primes_closest G_GNUC_CONST g_spawn_async g_spawn_async_with_pipes g_spawn_close_pid @@ -692,7 +692,7 @@ g_spawn_command_line_async g_spawn_command_line_sync g_spawn_error_quark g_spawn_sync -g_sprintf +g_sprintf G_GNUC_PRINTF(2,3) g_stat g_static_mutex_free g_static_mutex_get_mutex_impl @@ -726,11 +726,11 @@ g_strconcat g_strdelimit g_strdown g_strdup -g_strdup_printf +g_strdup_printf G_GNUC_PRINTF(1,2) g_strdupv g_strdup_vprintf g_str_equal -g_strerror +g_strerror G_GNUC_CONST g_strescape g_strfreev g_str_hash @@ -738,7 +738,7 @@ g_str_has_prefix g_str_has_suffix g_string_append g_string_append_len -g_string_append_printf +g_string_append_printf G_GNUC_PRINTF(2,3) g_string_append_unichar g_string_ascii_down g_string_ascii_up @@ -763,7 +763,7 @@ g_string_prepend g_string_prepend_c g_string_prepend_len g_string_prepend_unichar -g_string_printf +g_string_printf G_GNUC_PRINTF(2,3) g_string_set_size g_string_sized_new g_string_truncate @@ -779,7 +779,7 @@ g_strnfill g_strreverse g_strrstr g_strrstr_len -g_strsignal +g_strsignal G_GNUC_CONST g_strsplit g_strsplit_set g_strstr_len @@ -835,30 +835,30 @@ g_tuples_destroy g_tuples_index g_ucs4_to_utf16 g_ucs4_to_utf8 -g_unichar_break_type -g_unichar_digit_value +g_unichar_break_type G_GNUC_CONST +g_unichar_digit_value G_GNUC_CONST g_unichar_get_mirror_char -g_unichar_isalnum -g_unichar_isalpha -g_unichar_iscntrl -g_unichar_isdefined -g_unichar_isdigit -g_unichar_isgraph -g_unichar_islower -g_unichar_isprint -g_unichar_ispunct -g_unichar_isspace -g_unichar_istitle -g_unichar_isupper -g_unichar_iswide -g_unichar_isxdigit -g_unichar_tolower -g_unichar_totitle -g_unichar_toupper +g_unichar_isalnum G_GNUC_CONST +g_unichar_isalpha G_GNUC_CONST +g_unichar_iscntrl G_GNUC_CONST +g_unichar_isdefined G_GNUC_CONST +g_unichar_isdigit G_GNUC_CONST +g_unichar_isgraph G_GNUC_CONST +g_unichar_islower G_GNUC_CONST +g_unichar_isprint G_GNUC_CONST +g_unichar_ispunct G_GNUC_CONST +g_unichar_isspace G_GNUC_CONST +g_unichar_istitle G_GNUC_CONST +g_unichar_isupper G_GNUC_CONST +g_unichar_iswide G_GNUC_CONST +g_unichar_isxdigit G_GNUC_CONST +g_unichar_tolower G_GNUC_CONST +g_unichar_totitle G_GNUC_CONST +g_unichar_toupper G_GNUC_CONST g_unichar_to_utf8 -g_unichar_type +g_unichar_type G_GNUC_CONST g_unichar_validate -g_unichar_xdigit_value +g_unichar_xdigit_value G_GNUC_CONST g_unicode_canonical_decomposition g_unicode_canonical_ordering g_unlink diff --git a/glib/makegalias.pl b/glib/makegalias.pl index b89778dee..786232b74 100755 --- a/glib/makegalias.pl +++ b/glib/makegalias.pl @@ -76,15 +76,24 @@ while (<>) { next; } - + + chop; my $str = $_; - # Drop any Win32 specific .def file syntax - $str = (split (/ /, $str))[0]; + my @words; + my $attributes = ""; + + @words = split(/ /, $str); + $str = shift(@words); chomp($str); 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 < + + 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 * === Released 2.5.6 === diff --git a/gobject/Makefile.am b/gobject/Makefile.am index 8e5261020..1318b9c19 100644 --- a/gobject/Makefile.am +++ b/gobject/Makefile.am @@ -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 diff --git a/gobject/gobject.symbols b/gobject/gobject.symbols index 09831ab0d..61d4e1198 100644 --- a/gobject/gobject.symbols +++ b/gobject/gobject.symbols @@ -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 diff --git a/gobject/makegobjectalias.pl b/gobject/makegobjectalias.pl index 90df9f6ca..1eb2cb32c 100755 --- a/gobject/makegobjectalias.pl +++ b/gobject/makegobjectalias.pl @@ -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 <