aboutsummaryrefslogtreecommitdiff
path: root/Lib/d
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2012-03-24 01:01:06 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2012-03-24 01:01:06 +0000
commitcd770b27ff348c91788809bae713bfada253e50e (patch)
tree6f8d628cb41574e21edc14d25d2b64d4ad34519d /Lib/d
parente459c14e55031ceedbfdcb29e5d88c3f3b8016dc (diff)
downloadswig-cd770b27ff348c91788809bae713bfada253e50e.tar.gz
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
Diffstat (limited to 'Lib/d')
-rw-r--r--Lib/d/dhead.swg20
-rw-r--r--Lib/d/wrapperloader.swg8
2 files changed, 14 insertions, 14 deletions
diff --git a/Lib/d/dhead.swg b/Lib/d/dhead.swg
index 4325f3581..9b3ec3470 100644
--- a/Lib/d/dhead.swg
+++ b/Lib/d/dhead.swg
@@ -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) {
diff --git a/Lib/d/wrapperloader.swg b/Lib/d/wrapperloader.swg
index 428af7b60..b3c1d0dcf 100644
--- a/Lib/d/wrapperloader.swg
+++ b/Lib/d/wrapperloader.swg
@@ -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
%}