From 54de376c55bedf0c63ae92e207eff48b96a0c9f7 Mon Sep 17 00:00:00 2001 From: frosch Date: Sun, 20 Apr 2025 14:44:47 +0200 Subject: [PATCH] Codechange: Make the squirrel-exporter skip ctor lists. --- cmake/scripts/SquirrelExport.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cmake/scripts/SquirrelExport.cmake b/cmake/scripts/SquirrelExport.cmake index f7f01c7c87..477e2ae782 100644 --- a/cmake/scripts/SquirrelExport.cmake +++ b/cmake/scripts/SquirrelExport.cmake @@ -614,8 +614,10 @@ foreach(LINE IN LISTS SOURCE_LINES) string(REGEX REPLACE "\\*" "" LINE "${LINE}") string(REGEX REPLACE "\\(.*" "" LINE "${LINE}") - string(REGEX REPLACE ".*\\(" "" PARAM_S "${PARAM_S}") + # Parameters start at first "(". Further "(" will appear in ctor lists. + string(REGEX MATCH "\\(.*" PARAM_S "${PARAM_S}") string(REGEX REPLACE "\\).*" "" PARAM_S "${PARAM_S}") + string(REGEX REPLACE "^\\(" "" PARAM_S "${PARAM_S}") string(REGEX MATCH "([^ ]+)( ([^ ]+))?" RESULT "${LINE}") set(FUNCTYPE "${CMAKE_MATCH_1}")