Add check for smart pointer type in generated code for director connection. This fixes a crash in the generated code caused by the dynamic_cast returning 0 because the specified types are incorrect for smart pointer types.
Add runtime test to the C# test suite's director smartptr test that demonstrates crash in generated code when directors are used with smart pointer types. Closes #34
This commit is contained in:
parent
28c033dd90
commit
25eaee49f3
2 changed files with 53 additions and 2 deletions
41
Examples/test-suite/csharp/director_smartptr_runme.cs
Normal file
41
Examples/test-suite/csharp/director_smartptr_runme.cs
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
using director_smartptrNamespace;
|
||||
|
||||
public class runme
|
||||
{
|
||||
|
||||
private class director_smartptr_MyBarFoo : Foo
|
||||
{
|
||||
public override string ping()
|
||||
{
|
||||
return "director_smartptr_MyBarFoo.ping();";
|
||||
}
|
||||
|
||||
public override string pong()
|
||||
{
|
||||
return "director_smartptr_MyBarFoo.pong();" + ping();
|
||||
}
|
||||
|
||||
public override string fooBar(FooBar fooBar)
|
||||
{
|
||||
return fooBar.FooBarDo();
|
||||
}
|
||||
|
||||
public override Foo makeFoo()
|
||||
{
|
||||
return new Foo();
|
||||
}
|
||||
|
||||
public override FooBar makeFooBar()
|
||||
{
|
||||
return new FooBar();
|
||||
}
|
||||
}
|
||||
|
||||
static void Main()
|
||||
{
|
||||
director_smartptr_MyBarFoo myBarFoo =
|
||||
new director_smartptr_MyBarFoo();
|
||||
|
||||
myBarFoo.ping();
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue