diff --git a/Examples/test-suite/constant_pointers.i b/Examples/test-suite/constant_pointers.i index f43061876..367baf49c 100644 --- a/Examples/test-suite/constant_pointers.i +++ b/Examples/test-suite/constant_pointers.i @@ -116,6 +116,10 @@ int* const globalRet2() {return &GlobalInt;} %{ static int wxEVT_COMMAND_BUTTON_CLICKEDv; static int **wxEVT_COMMAND_BUTTON_CLICKEDp; +#if defined(SWIGR) +#undef lang1 /* conflicts with symbol in R internals */ +#endif + char lang1[16] = "Hello"; char *langs[] ={ lang1 }; diff --git a/Examples/test-suite/r/Makefile.in b/Examples/test-suite/r/Makefile.in index d104974f4..a49f8766b 100644 --- a/Examples/test-suite/r/Makefile.in +++ b/Examples/test-suite/r/Makefile.in @@ -4,7 +4,7 @@ LANGUAGE = r SCRIPTSUFFIX = _runme.R -WRAPSUFFIX = _wrap.R +WRAPSUFFIX = .R RUNR = R CMD BATCH --no-save --no-restore srcdir = @srcdir@ top_srcdir = @top_srcdir@ @@ -59,4 +59,5 @@ clean: $(MAKE) -f $(top_builddir)/$(EXAMPLES)/Makefile r_clean %.clean: - @rm -f $*_wrap.R $*_wrap.so $*_wrap.cpp $*_wrap.c $*_runme.Rout + @rm -f $*.R $*_wrap.so $*_wrap.cpp $*_wrap.c $*_runme.Rout $*.Rout + diff --git a/Examples/test-suite/r/copy_struct_runme.R b/Examples/test-suite/r/copy_struct_runme.R index 44f0e667f..685660fcb 100644 --- a/Examples/test-suite/r/copy_struct_runme.R +++ b/Examples/test-suite/r/copy_struct_runme.R @@ -1,6 +1,6 @@ source("unittest.R") dyn.load(paste("copy_struct_wrap", .Platform$dynlib.ext, sep="")) -source("copy_struct_wrap.R") +source("copy_struct.R") cacheMetaData(1) a <- getA() diff --git a/Examples/test-suite/r/double_delete_runme.R b/Examples/test-suite/r/double_delete_runme.R index 34e5380e0..0c0a4482f 100644 --- a/Examples/test-suite/r/double_delete_runme.R +++ b/Examples/test-suite/r/double_delete_runme.R @@ -2,7 +2,7 @@ # by SWIG. dyn.load(paste("double_delete_wrap", .Platform$dynlib.ext, sep="")) -source("double_delete_wrap.R") +source("double_delete.R") cacheMetaData(1) # ----- Object creation ----- diff --git a/Examples/test-suite/r/funcptr_runme.R b/Examples/test-suite/r/funcptr_runme.R index 08f1f3126..033c83cff 100644 --- a/Examples/test-suite/r/funcptr_runme.R +++ b/Examples/test-suite/r/funcptr_runme.R @@ -1,6 +1,6 @@ source("unittest.R") dyn.load(paste("funcptr_wrap", .Platform$dynlib.ext, sep="")) -source("funcptr_wrap.R") +source("funcptr.R") cacheMetaData(1) unittest(do_op(1, 3, add), 4) unittest(do_op(2, 3, mul), 6) diff --git a/Examples/test-suite/r/ignore_parameter_runme.R b/Examples/test-suite/r/ignore_parameter_runme.R index 95154c809..870081dc6 100644 --- a/Examples/test-suite/r/ignore_parameter_runme.R +++ b/Examples/test-suite/r/ignore_parameter_runme.R @@ -1,6 +1,6 @@ source("unittest.R") dyn.load(paste("ignore_parameter_wrap", .Platform$dynlib.ext, sep="")) -source("ignore_parameter_wrap.R") +source("ignore_parameter.R") cacheMetaData(1) unittest(jaguar(1, 1.0), "hello") diff --git a/Examples/test-suite/r/legacy_runme.R b/Examples/test-suite/r/legacy_runme.R index d515d9bd0..270aca55b 100644 --- a/Examples/test-suite/r/legacy_runme.R +++ b/Examples/test-suite/r/legacy_runme.R @@ -1,6 +1,6 @@ source("unittest.R") dyn.load(paste("legacy_wrap", .Platform$dynlib.ext, sep="")) -source("legacy_wrap.R") +source("legacy.R") cacheMetaData(1) obj <- getObject(1,3) diff --git a/Examples/test-suite/r/simple_array_runme.R b/Examples/test-suite/r/simple_array_runme.R index a02cf6868..a6b24b653 100644 --- a/Examples/test-suite/r/simple_array_runme.R +++ b/Examples/test-suite/r/simple_array_runme.R @@ -1,6 +1,6 @@ source("unittest.R") dyn.load(paste("simple_array_wrap", .Platform$dynlib.ext, sep="")) -source("simple_array_wrap.R") +source("simple_array.R") cacheMetaData(1) initArray() diff --git a/Examples/test-suite/r/unions_runme.R b/Examples/test-suite/r/unions_runme.R index 11c970874..37dcb9a70 100644 --- a/Examples/test-suite/r/unions_runme.R +++ b/Examples/test-suite/r/unions_runme.R @@ -1,6 +1,6 @@ source("unittest.R") dyn.load(paste("unions_wrap", .Platform$dynlib.ext, sep="")) -source("unions_wrap.R") +source("unions.R") cacheMetaData(1) ss <- SmallStruct() diff --git a/Source/Modules/r.cxx b/Source/Modules/r.cxx index e693d233f..eeb6fbbe2 100644 --- a/Source/Modules/r.cxx +++ b/Source/Modules/r.cxx @@ -854,7 +854,7 @@ int R::DumpCode(Node *n, String *module) { /* The name of the file in which we will generate the S code. */ - Printf(output_filename, "%s%s_wrap.R", SWIG_output_directory(), module); + Printf(output_filename, "%s%s.R", SWIG_output_directory(), module); #ifdef R_SWIG_VERBOSE Printf(stderr, "Writing S code to %s\n", output_filename);