From 15b2ec53e33e375d0c8976571087331aa7012817 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Mon, 26 Sep 2022 18:14:19 +0100 Subject: Runtime tables deterministic ordering (4) Output C/C++ type strings (| separated) in swig_type_info tables in fixed order. The types are output in alphabetically sorted order, with an exception. The final type is a fully resolved type, but does not necessarily include default template parameters. This type is the one used by SWIG_TypePrettyName which is commonly used to display a type when the wrong type is passed in as a parameter. Previously the order was not very deterministic due to the use of internal hash tables which do not have an ordering guarantee. --- Lib/swigrun.swg | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Lib/swigrun.swg') diff --git a/Lib/swigrun.swg b/Lib/swigrun.swg index 9ec98ccf2..f632c4cb6 100644 --- a/Lib/swigrun.swg +++ b/Lib/swigrun.swg @@ -358,9 +358,9 @@ SWIG_TypeName(const swig_type_info *ty) { SWIGRUNTIME const char * SWIG_TypePrettyName(const swig_type_info *type) { /* The "str" field contains the equivalent pretty names of the - type, separated by vertical-bar characters. We choose - to print the last name, as it is often (?) the most - specific. */ + type, separated by vertical-bar characters. Choose the last + name. It should be the most specific; a fully resolved name + but not necessarily with default template parameters expanded. */ if (!type) return NULL; if (type->str != NULL) { const char *last_name = type->str; -- cgit v1.2.1