From 7b7e5b001212274e91633be3ed5a2e5ed8f164ce Mon Sep 17 00:00:00 2001 From: Richard Beare Date: Tue, 11 Sep 2018 09:58:33 +1000 Subject: [PATCH] Used Swig_name_register so that Swig_name_wrapper produces the correct name without a separate replace call. --- Source/Modules/r.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/Modules/r.cxx b/Source/Modules/r.cxx index 752135cf3..4d4f71079 100644 --- a/Source/Modules/r.cxx +++ b/Source/Modules/r.cxx @@ -1906,7 +1906,7 @@ int R::functionWrapper(Node *n) { int nargs; String *wname = Swig_name_wrapper(iname); - Replace(wname, "_wrap", "R_swig", DOH_REPLACE_FIRST); + if(overname) Append(wname, overname); Setattr(n,"wrap:name", wname); @@ -2924,6 +2924,9 @@ void R::main(int argc, char *argv[]) { } /// copyToR copyToC functions. + // Register the naming functions + Swig_name_register("wrapper", "R_swig_%f"); + } }