Apply #3502431 to fix duplicate symbols in multiple modules and compiler errors due to lack of const in some methods taking char*.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12948 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
e459c14e55
commit
cd770b27ff
3 changed files with 18 additions and 14 deletions
|
|
@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release.
|
|||
Version 2.0.5 (in progress)
|
||||
===========================
|
||||
|
||||
2012-03-24: wsfulton
|
||||
[D] Apply #3502431 to fix duplicate symbols in multiple modules and compiler errors due to lack
|
||||
of const in some methods taking char*.
|
||||
|
||||
2012-03-21: wsfulton
|
||||
Fix #3494791 - %$isglobal for %rename matching.
|
||||
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ static import tango.stdc.stringz;
|
|||
%pragma(d) imdmodulecode=%{
|
||||
private class SwigExceptionHelper {
|
||||
static this() {
|
||||
swigRegisterExceptionCallbacks(
|
||||
swigRegisterExceptionCallbacks$module(
|
||||
&setException,
|
||||
&setIllegalArgumentException,
|
||||
&setIllegalElementException,
|
||||
|
|
@ -91,31 +91,31 @@ private class SwigExceptionHelper {
|
|||
&setNoSuchElementException);
|
||||
}
|
||||
|
||||
static void setException(char* message) {
|
||||
static void setException(const char* message) {
|
||||
auto exception = new object.Exception(tango.stdc.stringz.fromStringz(message).dup);
|
||||
exception.next = SwigPendingException.retrieve();
|
||||
SwigPendingException.set(exception);
|
||||
}
|
||||
|
||||
static void setIllegalArgumentException(char* message) {
|
||||
static void setIllegalArgumentException(const char* message) {
|
||||
auto exception = new tango.core.Exception.IllegalArgumentException(tango.stdc.stringz.fromStringz(message).dup);
|
||||
exception.next = SwigPendingException.retrieve();
|
||||
SwigPendingException.set(exception);
|
||||
}
|
||||
|
||||
static void setIllegalElementException(char* message) {
|
||||
static void setIllegalElementException(const char* message) {
|
||||
auto exception = new tango.core.Exception.IllegalElementException(tango.stdc.stringz.fromStringz(message).dup);
|
||||
exception.next = SwigPendingException.retrieve();
|
||||
SwigPendingException.set(exception);
|
||||
}
|
||||
|
||||
static void setIOException(char* message) {
|
||||
static void setIOException(const char* message) {
|
||||
auto exception = new tango.core.Exception.IOException(tango.stdc.stringz.fromStringz(message).dup);
|
||||
exception.next = SwigPendingException.retrieve();
|
||||
SwigPendingException.set(exception);
|
||||
}
|
||||
|
||||
static void setNoSuchElementException(char* message) {
|
||||
static void setNoSuchElementException(const char* message) {
|
||||
auto exception = new tango.core.Exception.NoSuchElementException(tango.stdc.stringz.fromStringz(message).dup);
|
||||
exception.next = SwigPendingException.retrieve();
|
||||
SwigPendingException.set(exception);
|
||||
|
|
@ -174,7 +174,7 @@ private:
|
|||
alias tango.core.Thread.ThreadLocal!(object.Exception) ThreadLocalData;
|
||||
static ThreadLocalData m_sPendingException;
|
||||
}
|
||||
alias void function(char* message) SwigExceptionCallback;
|
||||
alias void function(const char* message) SwigExceptionCallback;
|
||||
%}
|
||||
#else
|
||||
%pragma(d) imdmoduleimports=%{
|
||||
|
|
@ -185,7 +185,7 @@ static import std.conv;
|
|||
private class SwigExceptionHelper {
|
||||
static this() {
|
||||
// The D1/Tango version maps C++ exceptions to multiple exception types.
|
||||
swigRegisterExceptionCallbacks(
|
||||
swigRegisterExceptionCallbacks$module(
|
||||
&setException,
|
||||
&setException,
|
||||
&setException,
|
||||
|
|
@ -283,7 +283,7 @@ SWIGEXPORT void SWIGRegisterStringCallback_$module(SWIG_DStringHelperCallback ca
|
|||
%pragma(d) imdmodulecode = %{
|
||||
private class SwigStringHelper {
|
||||
static this() {
|
||||
swigRegisterStringCallback(&createString);
|
||||
swigRegisterStringCallback$module(&createString);
|
||||
}
|
||||
|
||||
static char* createString(char* cString) {
|
||||
|
|
@ -302,7 +302,7 @@ static import std.string;
|
|||
%pragma(d) imdmodulecode = %{
|
||||
private class SwigStringHelper {
|
||||
static this() {
|
||||
swigRegisterStringCallback(&createString);
|
||||
swigRegisterStringCallback$module(&createString);
|
||||
}
|
||||
|
||||
static const(char)* createString(const(char*) cString) {
|
||||
|
|
|
|||
|
|
@ -282,10 +282,10 @@ static this() {
|
|||
}
|
||||
|
||||
//#if !defined(SWIG_D_NO_EXCEPTION_HELPER)
|
||||
mixin(bindCode("swigRegisterExceptionCallbacks", "SWIGRegisterExceptionCallbacks_$module"));
|
||||
mixin(bindCode("swigRegisterExceptionCallbacks$module", "SWIGRegisterExceptionCallbacks_$module"));
|
||||
//#endif // SWIG_D_NO_EXCEPTION_HELPER
|
||||
//#if !defined(SWIG_D_NO_STRING_HELPER)
|
||||
mixin(bindCode("swigRegisterStringCallback", "SWIGRegisterStringCallback_$module"));
|
||||
mixin(bindCode("swigRegisterStringCallback$module", "SWIGRegisterStringCallback_$module"));
|
||||
//#endif // SWIG_D_NO_STRING_HELPER
|
||||
$wrapperloaderbindcode
|
||||
}
|
||||
|
|
@ -296,11 +296,11 @@ extern(C) void function(
|
|||
SwigExceptionCallback illegalArgumentCallback,
|
||||
SwigExceptionCallback illegalElementCallback,
|
||||
SwigExceptionCallback ioCallback,
|
||||
SwigExceptionCallback noSuchElementCallback) swigRegisterExceptionCallbacks;
|
||||
SwigExceptionCallback noSuchElementCallback) swigRegisterExceptionCallbacks$module;
|
||||
//#endif // SWIG_D_NO_EXCEPTION_HELPER
|
||||
|
||||
//#if !defined(SWIG_D_NO_STRING_HELPER)
|
||||
extern(C) void function(SwigStringCallback callback) swigRegisterStringCallback;
|
||||
extern(C) void function(SwigStringCallback callback) swigRegisterStringCallback$module;
|
||||
//#endif // SWIG_D_NO_STRING_HELPER
|
||||
%}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue