Fix typemap delete regression introduced in rev 11838
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12008 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
efd200ffe2
commit
03bd7005bb
4 changed files with 26 additions and 4 deletions
|
|
@ -387,6 +387,7 @@ CPP_TEST_CASES += \
|
||||||
typedef_scope \
|
typedef_scope \
|
||||||
typedef_sizet \
|
typedef_sizet \
|
||||||
typedef_struct \
|
typedef_struct \
|
||||||
|
typemap_delete \
|
||||||
typemap_global_scope \
|
typemap_global_scope \
|
||||||
typemap_namespace \
|
typemap_namespace \
|
||||||
typemap_ns_using \
|
typemap_ns_using \
|
||||||
|
|
|
||||||
5
Examples/test-suite/python/typemap_delete_runme.py
Normal file
5
Examples/test-suite/python/typemap_delete_runme.py
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
import typemap_delete
|
||||||
|
|
||||||
|
r = typemap_delete.Rect(123)
|
||||||
|
if r.val != 123:
|
||||||
|
raise RuntimeError
|
||||||
16
Examples/test-suite/typemap_delete.i
Normal file
16
Examples/test-suite/typemap_delete.i
Normal file
|
|
@ -0,0 +1,16 @@
|
||||||
|
%module typemap_delete
|
||||||
|
|
||||||
|
%typemap(in) Rect* (Rect temp) {
|
||||||
|
$1 = 0;
|
||||||
|
will_not_compile
|
||||||
|
}
|
||||||
|
|
||||||
|
%typemap(in) Rect*;
|
||||||
|
|
||||||
|
%inline %{
|
||||||
|
struct Rect
|
||||||
|
{
|
||||||
|
int val;
|
||||||
|
Rect(int v) : val(v) {}
|
||||||
|
};
|
||||||
|
%}
|
||||||
|
|
@ -724,7 +724,7 @@ static Hash *typemap_search(const_String_or_char_ptr tmap_method, SwigType *type
|
||||||
/* Try to get an exact type-match */
|
/* Try to get an exact type-match */
|
||||||
tm = get_typemap(ts, ctype);
|
tm = get_typemap(ts, ctype);
|
||||||
result = typemap_search_helper(debug_display, tm, tm_method, ctype, cqualifiedname, cname, &backup);
|
result = typemap_search_helper(debug_display, tm, tm_method, ctype, cqualifiedname, cname, &backup);
|
||||||
if (result)
|
if (result && Getattr(result, "code"))
|
||||||
goto ret_result;
|
goto ret_result;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
@ -734,7 +734,7 @@ static Hash *typemap_search(const_String_or_char_ptr tmap_method, SwigType *type
|
||||||
tm = get_typemap(ts, template_prefix);
|
tm = get_typemap(ts, template_prefix);
|
||||||
result = typemap_search_helper(debug_display, tm, tm_method, template_prefix, cqualifiedname, cname, &backup);
|
result = typemap_search_helper(debug_display, tm, tm_method, template_prefix, cqualifiedname, cname, &backup);
|
||||||
Delete(template_prefix);
|
Delete(template_prefix);
|
||||||
if (result)
|
if (result && Getattr(result, "code"))
|
||||||
goto ret_result;
|
goto ret_result;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -748,7 +748,7 @@ static Hash *typemap_search(const_String_or_char_ptr tmap_method, SwigType *type
|
||||||
tm = get_typemap(ts, noarrays);
|
tm = get_typemap(ts, noarrays);
|
||||||
result = typemap_search_helper(debug_display, tm, tm_method, noarrays, cqualifiedname, cname, &backup);
|
result = typemap_search_helper(debug_display, tm, tm_method, noarrays, cqualifiedname, cname, &backup);
|
||||||
Delete(noarrays);
|
Delete(noarrays);
|
||||||
if (result)
|
if (result && Getattr(result, "code"))
|
||||||
goto ret_result;
|
goto ret_result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -780,7 +780,7 @@ static Hash *typemap_search(const_String_or_char_ptr tmap_method, SwigType *type
|
||||||
while (primitive) {
|
while (primitive) {
|
||||||
tm = get_typemap(ts, primitive);
|
tm = get_typemap(ts, primitive);
|
||||||
result = typemap_search_helper(debug_display, tm, tm_method, primitive, cqualifiedname, cname, &backup);
|
result = typemap_search_helper(debug_display, tm, tm_method, primitive, cqualifiedname, cname, &backup);
|
||||||
if (result)
|
if (result && Getattr(result, "code"))
|
||||||
goto ret_result;
|
goto ret_result;
|
||||||
|
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue