Slight type adjustment for invoke. This makes swigp4 a bit easier to
deal with. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5230 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
f9ea7fd22a
commit
93008f32ba
2 changed files with 2 additions and 1 deletions
|
|
@ -31,7 +31,7 @@ exception NotObject of empty_enum c_obj_t
|
||||||
exception NotEnumType of empty_enum c_obj_t
|
exception NotEnumType of empty_enum c_obj_t
|
||||||
exception LabelNotFromThisEnum of empty_enum c_obj_t
|
exception LabelNotFromThisEnum of empty_enum c_obj_t
|
||||||
|
|
||||||
let invoke obj = match obj with C_obj o -> o | _ -> raise (NotObject obj)
|
let invoke obj = match obj with C_obj o -> o | _ -> raise (NotObject (Obj.magic obj))
|
||||||
let _ = Callback.register "swig_runmethod" invoke
|
let _ = Callback.register "swig_runmethod" invoke
|
||||||
let fnhelper fin f arg =
|
let fnhelper fin f arg =
|
||||||
let args = match arg with C_list l -> l | C_void -> [] | _ -> [ arg ] in
|
let args = match arg with C_list l -> l | C_void -> [] | _ -> [ arg ] in
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@ type 'a c_obj_t =
|
||||||
| C_enum of 'a
|
| C_enum of 'a
|
||||||
| C_director_core of 'a c_obj_t * 'a c_obj_t option ref
|
| C_director_core of 'a c_obj_t * 'a c_obj_t option ref
|
||||||
|
|
||||||
|
val invoke : 'a c_obj_t -> (string -> 'a c_obj_t -> 'a c_obj_t)
|
||||||
val convert_c_obj : 'a c_obj_t -> 'b c_obj_t
|
val convert_c_obj : 'a c_obj_t -> 'b c_obj_t
|
||||||
|
|
||||||
val get_int : 'a c_obj_t -> int
|
val get_int : 'a c_obj_t -> int
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue