Commit 0056ea4e authored by Niko Tyni's avatar Niko Tyni Committed by Rico Tzschichholz
Browse files

gtkmodule: Preserve order of required-gtype-classes for reproducibility

The elements of current_required_app_classes end up in the generated
code in g_type_ensure() statements. The order of these can vary
between builds when using a HashSet, breaking reproducibilty.

See https://wiki.debian.org/ReproducibleBuilds

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=802528
parent 2542bd84
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ public class Vala.GtkModule : GSignalModule {
	/* GtkBuilder xml child to Vala class mapping */
	private HashMap<string, Class> current_child_to_class_map = new HashMap<string, Class>(str_hash, str_equal);
	/* Required custom application-specific gtype classes to be ref'd before initializing the template */
	private HashSet<Class> current_required_app_classes = new HashSet<Class>();
	private List<Class> current_required_app_classes = new ArrayList<Class>();

	private void ensure_cclass_to_vala_map () {
		// map C name of gtypeinstance classes to Vala classes