moved registration routine and use swig_name_get

This commit is contained in:
Richard Beare 2018-09-11 11:21:03 +10:00
commit b4c02b3267

View file

@ -781,6 +781,8 @@ int R::top(Node *n) {
Swig_register_filebyname("snamespace", s_namespace);
Printf(s_namespace, "useDynLib(%s)\n", DllName);
}
// Register the naming functions
Swig_name_register("wrapper", "R_swig_%f");
/* Associate the different streams with names so that they can be used in %insert directives by the
typemap code. */
@ -1890,10 +1892,6 @@ int R::functionWrapper(Node *n) {
String *tmp = NewString(isSet ? Swig_name_set(NSPACE_TODO, class_name) : Swig_name_get(NSPACE_TODO, class_name));
if (debugMode) {
Printf(stdout, "functionWrapper TMP: %s\n", tmp);
}
List *memList = Getattr(ClassMemberTable, tmp);
if(!memList) {
memList = NewList();
@ -2927,9 +2925,6 @@ void R::main(int argc, char *argv[]) {
}
/// copyToR copyToC functions.
// Register the naming functions
Swig_name_register("wrapper", "R_swig_%f");
}
}