Document patch #33 from previous commit and complete run time tests

This commit is contained in:
William S Fulton 2013-04-18 23:20:48 +01:00
commit 439a353a36
7 changed files with 26 additions and 0 deletions

View file

@ -5,6 +5,19 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 2.0.10 (in progress)
============================
2013-04-18: wsfulton
Apply Patch #36 from Jesus Lopez to add support for $descriptor() special variable macro expansion
in fragments. For example:
%fragment("nameDescriptor", "header")
%{
static const char *nameDescriptor = "$descriptor(Name)";
%}
which will generate into the wrapper if the fragment is used:
static const char *nameDescriptor = "SWIGTYPE_Name";
2013-04-18: wsfulton
Fix SF Bug #428 - Syntax error when preprocessor macros are defined inside of enum lists, such as:

View file

@ -12,6 +12,8 @@ public class runme {
throw new Exception("test failed");
if (special_variable_macros.testMary(name) != "SWIGTYPE_p_NameWrap")
throw new Exception("test failed");
if (special_variable_macros.testJames(name) != "SWIGTYPE_Name")
throw new Exception("test failed");
if (special_variable_macros.testJim(name) != "multiname num")
throw new Exception("test failed");
if (special_variable_macros.testJohn(new PairIntBool(10, false)) != 123)

View file

@ -24,6 +24,10 @@ void main() {
throw new Exception("test failed");
}
if (testJames(name) != "SWIGTYPE_Name") {
throw new Exception("test failed");
}
if (testJim(name) != "multiname num") {
throw new Exception("test failed");
}

View file

@ -12,6 +12,7 @@ void main() {
enforce(testJack(name) == "$specialname");
enforce(testJill(name) == "jilly");
enforce(testMary(name) == "SWIGTYPE_p_NameWrap");
enforce(testJames(name) == "SWIGTYPE_Name");
enforce(testJim(name) == "multiname num");
enforce(testJohn(new PairIntBool(10, false)) == 123);

View file

@ -16,6 +16,9 @@ func main() {
if special_variable_macros.TestMary(name) != "SWIGTYPE_p_NameWrap" {
panic("test failed")
}
if special_variable_macros.TestJames(name) != "SWIGTYPE_Name" {
panic("test failed")
}
if special_variable_macros.TestJim(name) != "multiname num" {
panic("test failed")
}

View file

@ -22,6 +22,8 @@ public class special_variable_macros_runme {
throw new RuntimeException("test failed");
if (!special_variable_macros.testMary(name).equals("SWIGTYPE_p_NameWrap"))
throw new RuntimeException("test failed");
if (!special_variable_macros.testJames(name).equals("SWIGTYPE_Name"))
throw new RuntimeException("test failed");
if (!special_variable_macros.testJim(name).equals("multiname num"))
throw new RuntimeException("test failed");
if (special_variable_macros.testJohn(new PairIntBool(10, false)) != 123)

View file

@ -18,6 +18,7 @@
#include "swig.h"
#include "swigwarn.h"
#include "cparse.h"
static Hash *fragments = 0;
static Hash *looking_fragments = 0;