@@ -192,12 +192,21 @@ object (self)
192192 let compinfo = bcfiles#get_compinfo ckey in
193193 List. iteri (fun i fld ->
194194 H. add table (i * 4 ) fld.bfname) compinfo.bcfields
195+ | TArray (TComp (ckey , _ ), _ , _ ) ->
196+ let compinfo = bcfiles#get_compinfo ckey in
197+ List. iteri (fun i fld ->
198+ H. add table (i * 4 ) fld.bfname) compinfo.bcfields
199+ | TArray ((TFun _ | TPtr (TFun _ , _ )), _ , _ ) ->
200+ H. add table 0 (" cbp_" ^ cba)
195201 | _ ->
196- raise
197- (BCH_failure
198- (LBLOCK [
199- STR " Unexpected type in creating callback table: " ;
200- btype_to_pretty recty])) in
202+ let msg =
203+ LBLOCK [
204+ STR " Unexpected type in creating callback table: " ;
205+ btype_to_pretty recty] in
206+ begin
207+ ch_error_log#add " call-back-table problem" msg;
208+ raise (BCH_failure msg)
209+ end in
201210 table
202211
203212 val offsettypes =
@@ -214,9 +223,12 @@ object (self)
214223 let _ =
215224 match recty with
216225 | TFun _ -> H. add table 0 ty
217- | TPtr (TFun (rty , args , b , attr ), _ ) ->
226+ | TPtr (TFun (rty, args, b, attr), _)
227+ | TArray (TFun (rty, args, b, attr), _, _)
228+ | TArray (TPtr (TFun (rty , args , b , attr ), _ ), _ , _ ) ->
218229 H. add table 0 (TFun (rty, args, b, attr))
219- | TPtr (TComp (ckey , _ ), _ ) ->
230+ | TArray (TComp (ckey, _), _, _)
231+ | TPtr (TComp (ckey , _ ), _ ) ->
220232 let compinfo = bcfiles#get_compinfo ckey in
221233 List. iteri (fun i fld ->
222234 let offset = i * 4 in
0 commit comments