[OCaml] Fix handling of exception specifications for director classes
The OCaml module was generating invalid code for director classes which contain methods with exception specifications. The fix is based on some of the code in python.cxx's classDirectorMethod(). This commit fixes compilation failures for a number of director unit tests. Add director_exception_catches_runme.ml, director_exception_nothrow_runme.ml, and director_ignore_runme.ml.
This commit is contained in:
parent
7118e4ef1e
commit
35663b1622
5 changed files with 79 additions and 9 deletions
|
|
@ -0,0 +1,12 @@
|
|||
open Swig
|
||||
open Director_exception_nothrow
|
||||
|
||||
let _MyBar ob meth args =
|
||||
match meth with
|
||||
| "pang" -> C_string "_MyBar::pang()"
|
||||
| _ -> (invoke ob) meth args
|
||||
|
||||
let a = new_derived_object new_Bar (_MyBar) '()
|
||||
let _ = assert (_MyBar a "pang" '() as string = "_MyBar::pang()")
|
||||
let b = new_Bar '()
|
||||
let _ = assert (b -> pang () as string = "Bar::pang()")
|
||||
Loading…
Add table
Add a link
Reference in a new issue