summaryrefslogtreecommitdiff
path: root/Lib/d/dhead.swg
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/dhead.swg
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/dhead.swg')
-rw-r--r--Lib/d/dhead.swg20
1 files changed, 10 insertions, 10 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) {