To: vim_dev@googlegroups.com Subject: Patch 7.4.1688 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ------------ Patch 7.4.1688 Problem: MzScheme does not support partial. Solution: Add minimal partial support. (Ken Takata) Files: src/if_mzsch.c *** ../vim-7.4.1687/src/if_mzsch.c 2016-03-28 22:17:12.139779587 +0200 --- src/if_mzsch.c 2016-03-30 21:59:40.747333281 +0200 *************** *** 3109,3114 **** --- 3109,3115 ---- MZ_GC_VAR_IN_REG(0, funcname); MZ_GC_REG(); + /* FIXME: func_ref() and func_unref() are needed. */ funcname = scheme_make_byte_string((char *)vim_value->vval.v_string); MZ_GC_CHECK(); result = scheme_make_closed_prim_w_arity(vim_funcref, funcname, *************** *** 3117,3122 **** --- 3118,3147 ---- MZ_GC_UNREG(); } + else if (vim_value->v_type == VAR_PARTIAL) + { + if (vim_value->vval.v_partial == NULL) + result = scheme_null; + else + { + Scheme_Object *funcname = NULL; + + MZ_GC_DECL_REG(1); + MZ_GC_VAR_IN_REG(0, funcname); + MZ_GC_REG(); + + /* FIXME: func_ref() and func_unref() are needed. */ + /* TODO: Support pt_dict and pt_argv. */ + funcname = scheme_make_byte_string( + (char *)vim_value->vval.v_partial->pt_name); + MZ_GC_CHECK(); + result = scheme_make_closed_prim_w_arity(vim_funcref, funcname, + (const char *)BYTE_STRING_VALUE(funcname), 0, -1); + MZ_GC_CHECK(); + + MZ_GC_UNREG(); + } + } else if (vim_value->v_type == VAR_SPECIAL) { if (vim_value->vval.v_number <= VVAL_TRUE) *** ../vim-7.4.1687/src/version.c 2016-03-30 21:06:53.723772030 +0200 --- src/version.c 2016-03-30 22:00:25.934870748 +0200 *************** *** 750,751 **** --- 750,753 ---- { /* Add new patch number below this line */ + /**/ + 1688, /**/ -- hundred-and-one symptoms of being an internet addict: 171. You invent another person and chat with yourself in empty chat rooms. /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ an exciting new programming language -- http://www.Zimbu.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///