Commit graph

18,771 commits

Author SHA1 Message Date
Michael Schaller
8d2f3403d2 [Go] Reworked beginning of the documentation.
* Removed link to examples in the Go source tree as discussed in issue #418.
* Reworded occurences of the 'gc tool' as it has been removed with Go 1.5.
* Reworked chapter 23.3.  This should make it easier for users to get started
  with SWIG as the chapter starts with how to use SWIG with the go tool.
* Added helpful links.
2015-08-27 08:27:43 +02:00
William S Fulton
1851b2fadf Merge branch 'no-swig-preinst'
* no-swig-preinst:
  Leave preinst-swig as a convenience only script for ad-hoc use
  Consistent quoting in Makefile
  More remove SWIG_LIB variable
  XML examples out of source support
  Remove SWIG_LIB variable from Makefile
  Remove use of preinst-swig script
  Remove realpath from python/import_packages example
  Cosmetic changes in Chicken example Makefiles
  Prototype removal of swig-preinst in the test-suite and examples
2015-08-21 22:52:29 +01:00
William S Fulton
abe52396b2 Leave preinst-swig as a convenience only script for ad-hoc use 2015-08-21 22:48:34 +01:00
William S Fulton
ca64b06229 Consistent quoting in Makefile 2015-08-21 22:48:34 +01:00
William S Fulton
e00a8026a6 More remove SWIG_LIB variable 2015-08-21 22:48:34 +01:00
William S Fulton
7f5a32195a XML examples out of source support
Examples still don't work though!
2015-08-21 22:48:34 +01:00
William S Fulton
7192b1c735 Remove SWIG_LIB variable from Makefile 2015-08-21 22:48:33 +01:00
William S Fulton
8e2bc595c6 Remove use of preinst-swig script
Complete the prototype removal in ca1431.

The script prevents SWIGTOOL=gdb from working as gdb can't be used to
debug a shell script, it requires a binary.

Add support for SWIGTOOL in all the examples.

SWIG_LIB_DIR and SWIGEXE must now instead be set by all Makefiles.

See issue #473.
2015-08-21 22:43:17 +01:00
William S Fulton
4ef3507e8b Remove realpath from python/import_packages example 2015-08-20 06:19:12 +01:00
William S Fulton
bfead87e9f Cosmetic changes in Chicken example Makefiles 2015-08-18 19:47:15 +01:00
William S Fulton
ca1431f4cf Prototype removal of swig-preinst in the test-suite and examples
Prototype for Java test-suite and Java class example.

SWIG_LIB_DIR and SWIGEXE must now instead be set by all Makefiles.
SWIG_LIB is explicitly set where necessary.
Allows use of 'make SWIGTOOL="gdb --args"' to work as gdb can't be used
to debug a shell script, for both examples and test-suite.

See issue #473.
2015-08-18 08:00:01 +01:00
William S Fulton
1fca810989 R testing should now work in Travis - remove from expected fails 2015-08-13 06:49:32 +01:00
William S Fulton
023b0186f0 Fix R out-of-source build examples 2015-08-13 06:48:17 +01:00
William S Fulton
c0bee5bf18 Remove R test until fixed
Fix is in progress, see Github patch #500
2015-08-13 06:47:09 +01:00
Richard Beare
1a6d952094 runtime test for tricky enumerations and support for out of source testing via args option to R 2015-08-12 18:33:53 +01:00
William S Fulton
9aa0f85cda Workaround Appveyor random failures due to nuget install errors
Add and use nuget-install.cmd based on
https://github.com/appveyor/ci/blob/master/scripts/nuget-restore.cmd
2015-08-12 18:27:20 +01:00
Joseph C Wang
834a93f449 Revert "Merge pull request #494 from richardbeare/enumR2015B"
This reverts commit cb8973f313, reversing
changes made to ac3284f78c.
2015-08-11 09:57:57 +08:00
joequant
cb8973f313 Merge pull request #494 from richardbeare/enumR2015B
replacement for enumR2015 - tidied and rebased
2015-08-10 13:37:27 +08:00
Richard Beare
da1c6c60d3 This is a modification to support use of tricky enumerations in R. It
includes the addition of a _runme for an existing test - preproc_constants
that was previously not run. That tests includes a preprocessor based
setting of an enumeration which is ignored by the existing r enumeration
infrastructure. The new version correctly reports the enumeration value
as 4 - previous versions set it to 0. Traditional enumerations are unchanged.

The approach used to deal with these enumerations is similar to that of
other languages, and requires a call to a C function at runtime to return
the enumeration value. The previous approach figured out the values statically
and this is still used where possible. The need for a runtime call leads to
changes in when swig code is used in packages - see below.

One test that previously passed now fails - namely the R sourcing of
preproc_constants.R, as the enumeration code requires the shared library,
which isn't loaded by that script.

There is also a modification to the way the R _runme.R files are used.
The call to R CMD BATCH now includes a --args option that indicates
the source folder for the unittest.R file, and the first couple
of lines of the _runme.R files deal with correctly locating this.
Out of source tests now run correctly.

This work was motivated by problems generating the SimpleITK binding,
specifically with some of the more complex enumerations.

This approach does have some issues wrt to code in packages, but I can't
see an alternative. The problem with packages is that the R code setting
up the enumeration structures requires the shared library so that the C
functions returning enumeration values can be called. The enumeration
setup code thus needs to be moved to the package initialisation section.
For SimpleITK I do this using an R script, which I think is an acceptable
solution. The core part of the process is the following function. I dump
all the enumeration stuff into a .onload function. This is only necessary
if some of the enumerations are tricky.

splitSwigFile <- function(filename, onloadfile, mainfile)
{
p1 <- parse(file=filename)

getdefineEnum <- function(X)
{
return (is.call(X) & (X[[1]]=="defineEnumeration"))
}

dd <- sapply(p1, getdefineEnum)

enums <- p1[dd]
enums <- unlist(lapply(enums, deparse))

enums <- c(".onLoad <- function(libname, pkgname) {", enums, "}")

everythingelse <- p1[!dd]
everythingelse <- unlist(lapply(everythingelse, deparse))
writeLines(everythingelse, mainfile)
writeLines(enums, onloadfile)

}
2015-08-10 09:37:04 +10:00
William S Fulton
ac3284f78c Merge branch 'talby--surgical-perlprimtypes-fix'
* talby--surgical-perlprimtypes-fix:
  update CHANGES.current
  check ranges in perlprimtype.swg more carefully to avoid clang warnings
  capture the current behavior of perlprimtypes.swg is more detail
2015-08-09 21:55:30 +01:00
Ian Lance Taylor
01edfef3b8 Merge pull request #493 from michael-schaller/dir-examples
[Go] Undelete and updated the 'callback' and 'extend' examples.
2015-08-09 07:31:09 -07:00
Michael Schaller
608ef60ecf [Go] Renamed 'FooBarAbs' to 'FooBarAbstract' in the documentation and examples. 2015-08-09 14:37:16 +02:00
Michael Schaller
85037c3a33 [Go] Updated the 'callback' and 'extend' examples to match the 'director' one.
After the documentation update on how to utilize the director feature with
commit @17b1c1c the 'callback' and 'extend' examples needed an update as well.
2015-08-09 14:37:16 +02:00
Michael Schaller
a941e5b605 [Go] Revert commit 5e88857 to undelete the 'callback' and 'extend' examples.
The 'callback' and 'extend' examples were presumed to be obsoleted by the new
'director' example.  The examples are helpful though to have similar examples
across target languages and hence the commit @5e88857 which removed these
examples got reverted.
2015-08-09 14:36:58 +02:00
Robert Stone
96e282b791 update CHANGES.current 2015-08-08 13:21:24 -07:00
Robert Stone
9d19640141 check ranges in perlprimtype.swg more carefully to avoid clang warnings 2015-08-08 11:39:19 -07:00
Robert Stone
8ac4a8147b capture the current behavior of perlprimtypes.swg is more detail 2015-08-08 11:39:16 -07:00
William S Fulton
19a20c794b Changes entry for numpydoc conforming docstrings.
Changes entry for 92328a. Closes #383.
2015-08-07 22:23:31 +01:00
xantares
92328a2016 pep257 & numpydoc conforming docstrings 2015-08-07 22:15:13 +01:00
William S Fulton
263847e704 Merge pull request #487 from vadz/char-bin-type
Make (char*, size_t) typemap usable for strings of other types in Java.
2015-08-07 20:57:57 +01:00
Vadim Zeitlin
a1bddd56eb Make (char*, size_t) typemap usable for strings of other types in Java.
Notably it now works for "unsigned char*" strings.

Add a test to check that it now works in Java and also showing that it already
worked for the other languages with support for this typemap.
2015-08-07 19:44:45 +02:00
Ian Lance Taylor
95a08b3950 [Go] update build instructions in Examples/go/index.html 2015-08-05 07:19:05 -07:00
Ian Lance Taylor
5e88857760 Merge pull request #486 from michael-schaller/dir-cleanup
[Go] Cleanup of obsolete 'callback' and 'extend' examples.
2015-08-05 06:49:53 -07:00
Michael Schaller
736613e26c [Go] Documentation cleanup of obsolete 'callback' and 'extend' examples.
After commit 17b1c1c (pull request 447; issue 418) the 'callback' and 'extend'
examples have been removed in favor of the 'director' example.
2015-08-05 10:01:15 +02:00
Ian Lance Taylor
17b1c1c2d3 Merge pull request #447 from michael-schaller/doc
Fleshed out Go's documentation about the director feature and added a director example.
2015-08-04 10:36:33 -07:00
Michael Schaller
d9d26149e7 Some minor changes after first code review by ianlancetaylor.
Renamed overwritenMethodsOnFooBarAbs to overwrittenMethodsOnFooBarAbs.
Changed some line breaks.
2015-08-04 09:50:56 +02:00
Michael Schaller
e47d87e404 Fixed Examples/go/director/Makefile as there might be no copy of director.go during clean if a separate build directory is in use. 2015-08-04 09:34:26 +02:00
Michael Schaller
0db9a6ba7b Fixed Examples/go/director/Makefile as the copy of director.go wasn't cleaned up in separate build directories. 2015-08-04 09:34:26 +02:00
Michael Schaller
afd6a55ce1 Fixed Examples/go/director/Makefile as director.go was missing in separate build directories. 2015-08-04 09:34:26 +02:00
Michael Schaller
94994a749e Removed empty line in table of contents of the Go documentation. 2015-08-04 09:34:26 +02:00
Michael Schaller
a17c9727bd Fleshed out Go's documentation about the director feature and added a director example.
Fixes issues #418.
2015-08-04 09:34:26 +02:00
William S Fulton
5d363276f5 Bump version to 3.0.8 2015-08-03 22:33:52 +01:00
William S Fulton
9babc26634 Update Scilab test-suite output wording 2015-08-03 08:12:38 +01:00
William S Fulton
9d509ba92b Add 3.0.7 release summary and release date 2015-08-02 22:51:59 +01:00
William S Fulton
c0de963191 Test case warning suppression for visual c++ fix 2015-08-02 22:22:24 +01:00
William S Fulton
892aaf577a Test case warning suppression for visual c++ 2015-08-02 21:50:32 +01:00
William S Fulton
c6f8aadc64 Cosmetic corrections - Mac OS X 2015-08-02 20:14:20 +01:00
William S Fulton
f970d9aae5 testcase warning fix 2015-08-02 19:58:10 +01:00
William S Fulton
9c23981992 HTML fix in docs 2015-08-02 19:47:02 +01:00
William S Fulton
442ed8812b Merge branch 'vadz-better-no-all'
* vadz-better-no-all:
  Don't check for all the languages in Travis language-specific builds.
  Skip check for pep8 if Python is disabled in configure.
  Make configure --without-alllang option actually useful.
  Cosmetic: fix wrong configure options indentation in --help.
2015-08-02 19:42:27 +01:00