浏览代码

[interp] accept VClosure as onGenerate (closes #3427)

Simon Krajewski 10 年之前
父节点
当前提交
af2ec47014
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      interp.ml

+ 1 - 1
interp.ml

@@ -2212,7 +2212,7 @@ let macro_lib =
 		);
 		"on_generate", Fun1 (fun f ->
 			match f with
-			| VFunction (Fun1 _) ->
+			| VFunction (Fun1 _) | VClosure _ ->
 				let ctx = get_ctx() in
 				ctx.curapi.on_generate (fun tl ->
 					ignore(catch_errors ctx (fun() -> ctx.do_call VNull f [enc_array (List.map encode_type tl)] null_pos));