* lyze-cffi-export-package:
Add user documentation to the export package extension.
Extend the export feature in the CFFI module to support exporting to a particular package.
Reinstates autodoc for callback function testcase from #467, actually
tests the resulting docstring in the _runme.py and fixes SWIG/Python
so the expected result is obtained.
Suppresses warning:
error: control may reach end of non-void function [-Werror,-Wreturn-type]
The UNUSED macro is not expanded in ruby.h for rb_exc_raise for clang when
it ought to be.
For patch #512
By using the 'except:', you can catch all kinds of exceptions, including
the KeyboardInterrupt and SystemExit exceptions. From the generated
code, it is quite obvious that it is not these cases that should be
caught, but more specific ones like AttributeError and TypeError. To be
on the safe side, I decided to keep using 'Exception' for now.
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)
}
SWIG-3.0.5 and earlier sometimes truncated text provided in the docstring
feature.
SWIG-3.0.6 gave a 'Line indented less than expected' error instead of
truncating the docstring text.
Now the indentation for the 'docstring' feature is smarter and is
adjusted so that no truncation occurs.
Closes#475
Fix for breakages in previous few commits:
- Perl test-suite - the "varout" typemap "type" attribute is now
expanded in typemap.c instead of Perl.cxx.
- The swig_typemap_warn errors testcase showed that $1 was no longer
being expanded correctly when used in output typemaps (lname not set).
* LindleyF-typemap-in-descriptor:
Add documentation and CHANGES for special variables and typemap attributes.
Support special variable expansion in special variable macros in typemap attributes.
Enable variable and typemap substitution in typemap kwargs, and a test that verifies this works for directorin:descriptor.
* m7thon-issue-445-python-class-docstrings:
Add changes note for Python tp_doc slot and docstring
Set class docstring in tp_doc slot for python -builtin
Conflicts:
CHANGES.current
g++-5 errors out with this now with errors such as:
default_constructor_wrap.cxx:665:27: error: use of deleted function ‘FFF::FFF()’
result = (FFF *)new FFF();
^
default_constructor_wrap.cxx:314:7: note: ‘FFF::FFF()’ is implicitly deleted because the default definition would be ill-formed:
class FFF : public F {
^
default_constructor_wrap.cxx:301:4: error: ‘F::~F()’ is private
~F() { }
^
default_constructor_wrap.cxx:314:7: error: within this context
Previously SWIG looked at the indentation of the first line and removed
that many characters from each subsequent line, regardless of what those
characters were. This was made worse because SWIG's preprocessor removes
any whitespace before a '#'. Fixes github issue #379, reported by Joe
Orton.
* Sghirate-master:
changes file update for -outfile
Add in all C# command line options to the docs
C# -outfile cosmetic code fixes
[C#] Single file mode (fixes)
[C#] Single file mode (minor fix)
[C#] Single file mode
Conflicts:
CHANGES.current