summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGES.current4
-rw-r--r--Source/Modules/csharp.cxx13
-rw-r--r--Source/Modules/d.cxx13
-rw-r--r--Source/Modules/java.cxx16
4 files changed, 11 insertions, 35 deletions
diff --git a/CHANGES.current b/CHANGES.current
index 90389d812..6547a88be 100644
--- a/CHANGES.current
+++ b/CHANGES.current
@@ -5,6 +5,10 @@ See the RELEASENOTES file for a summary of changes in each release.
Version 2.0.10 (in progress)
============================
+2013-03-19: wsfulton
+ [C#, Java, D] Fix seg fault in SWIG using directors when class and virtual method names are
+ the same except being in different namespaces when the %nspace feature is not being used.
+
2013-02-19: kwwette
Fix bug in SWIG's handling of qualified (e.g. const) variables of array type. Given the typedef
a(7).q(volatile).double myarray // typedef volatile double[7] myarray;
diff --git a/Source/Modules/csharp.cxx b/Source/Modules/csharp.cxx
index 0d15a9c1d..4ef62d2cc 100644
--- a/Source/Modules/csharp.cxx
+++ b/Source/Modules/csharp.cxx
@@ -630,23 +630,14 @@ public:
*----------------------------------------------------------------------*/
UpcallData *addUpcallMethod(String *imclass_method, String *class_method, String *decl, String *overloaded_name) {
- UpcallData *udata;
- String *class_methodidx;
- Hash *new_udata;
String *key = NewStringf("%s|%s", imclass_method, decl);
++curr_class_dmethod;
- /* Do we know about this director class already? */
- if ((udata = Getattr(dmethods_table, key))) {
- Delete(key);
- return Getattr(udata, "methodoff");
- }
-
- class_methodidx = NewStringf("%d", n_dmethods - first_class_dmethod);
+ String *class_methodidx = NewStringf("%d", n_dmethods - first_class_dmethod);
n_dmethods++;
- new_udata = NewHash();
+ Hash *new_udata = NewHash();
Append(dmethods_seq, new_udata);
Setattr(dmethods_table, key, new_udata);
diff --git a/Source/Modules/d.cxx b/Source/Modules/d.cxx
index 88c3ccfff..e09e253f8 100644
--- a/Source/Modules/d.cxx
+++ b/Source/Modules/d.cxx
@@ -3704,23 +3704,14 @@ private:
UpcallData *addUpcallMethod(String *imclass_method, String *class_method,
String *decl, String *overloaded_name, String *return_type, String *param_list) {
- UpcallData *udata;
- String *class_methodidx;
- Hash *new_udata;
String *key = NewStringf("%s|%s", imclass_method, decl);
++curr_class_dmethod;
- /* Do we know about this director class already? */
- if ((udata = Getattr(dmethods_table, key))) {
- Delete(key);
- return Getattr(udata, "methodoff");
- }
-
- class_methodidx = NewStringf("%d", n_dmethods - first_class_dmethod);
+ String *class_methodidx = NewStringf("%d", n_dmethods - first_class_dmethod);
n_dmethods++;
- new_udata = NewHash();
+ Hash *new_udata = NewHash();
Append(dmethods_seq, new_udata);
Setattr(dmethods_table, key, new_udata);
diff --git a/Source/Modules/java.cxx b/Source/Modules/java.cxx
index 2fb21eca8..f351c91a3 100644
--- a/Source/Modules/java.cxx
+++ b/Source/Modules/java.cxx
@@ -741,25 +741,15 @@ public:
*----------------------------------------------------------------------*/
UpcallData *addUpcallMethod(String *imclass_method, String *class_method, String *imclass_desc, String *class_desc, String *decl) {
- UpcallData *udata;
- String *imclass_methodidx;
- String *class_methodidx;
- Hash *new_udata;
String *key = NewStringf("%s|%s", imclass_method, decl);
++curr_class_dmethod;
- /* Do we know about this director class already? */
- if ((udata = Getattr(dmethods_table, key))) {
- Delete(key);
- return Getattr(udata, "methodoff");
- }
-
- imclass_methodidx = NewStringf("%d", n_dmethods);
- class_methodidx = NewStringf("%d", n_dmethods - first_class_dmethod);
+ String *imclass_methodidx = NewStringf("%d", n_dmethods);
+ String *class_methodidx = NewStringf("%d", n_dmethods - first_class_dmethod);
n_dmethods++;
- new_udata = NewHash();
+ Hash *new_udata = NewHash();
Append(dmethods_seq, new_udata);
Setattr(dmethods_table, key, new_udata);