Fix lookup of csconstruct, dconstructor and javaconstruct typemaps

The C++ namespace was previously ignored in the lookup type
This commit is contained in:
William S Fulton 2018-03-06 19:27:55 +00:00
commit 63a5a8af88
3 changed files with 6 additions and 3 deletions

View file

@ -2788,7 +2788,8 @@ public:
/* Insert the csconstruct typemap, doing the replacement for $directorconnect, as needed */
Hash *attributes = NewHash();
String *construct_tm = Copy(typemapLookup(n, "csconstruct", Getattr(n, "name"),
String *typemap_lookup_type = Getattr(getCurrentClass(), "classtypeobj");
String *construct_tm = Copy(typemapLookup(n, "csconstruct", typemap_lookup_type,
WARN_CSHARP_TYPEMAP_CSCONSTRUCT_UNDEF, attributes));
if (construct_tm) {
if (!feature_director) {

View file

@ -1227,8 +1227,9 @@ public:
// Insert the dconstructor typemap (replacing $directorconnect as needed).
Hash *attributes = NewHash();
String *typemap_lookup_type = Getattr(getCurrentClass(), "classtypeobj");
String *construct_tm = Copy(lookupCodeTypemap(n, "dconstructor",
Getattr(n, "name"), WARN_D_TYPEMAP_DCONSTRUCTOR_UNDEF, attributes));
typemap_lookup_type, WARN_D_TYPEMAP_DCONSTRUCTOR_UNDEF, attributes));
if (construct_tm) {
const bool use_director = (parentNode(n) && Swig_directorclass(n));
if (!use_director) {

View file

@ -2767,7 +2767,8 @@ public:
/* Insert the javaconstruct typemap, doing the replacement for $directorconnect, as needed */
Hash *attributes = NewHash();
String *construct_tm = Copy(typemapLookup(n, "javaconstruct", Getattr(n, "name"),
String *typemap_lookup_type = Getattr(getCurrentClass(), "classtypeobj");
String *construct_tm = Copy(typemapLookup(n, "javaconstruct", typemap_lookup_type,
WARN_JAVA_TYPEMAP_JAVACONSTRUCT_UNDEF, attributes));
if (construct_tm) {
if (!feature_director) {