forked from aniani/vim
patch 9.0.1074: class members are not supported yet
Problem: Class members are not supported yet. Solution: Add initial support for class members.
This commit is contained in:
443
src/vim9class.c
443
src/vim9class.c
@@ -21,6 +21,154 @@
|
||||
# include "vim9.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Parse a member declaration, both object and class member.
|
||||
* Returns OK or FAIL. When OK then "varname_end" is set to just after the
|
||||
* variable name and "type_ret" is set to the decleared or detected type.
|
||||
* "init_expr" is set to the initialisation expression (allocated), if there is
|
||||
* one.
|
||||
*/
|
||||
static int
|
||||
parse_member(
|
||||
exarg_T *eap,
|
||||
char_u *line,
|
||||
char_u *varname,
|
||||
int has_public, // TRUE if "public" seen before "varname"
|
||||
char_u **varname_end,
|
||||
garray_T *type_list,
|
||||
type_T **type_ret,
|
||||
char_u **init_expr)
|
||||
{
|
||||
*varname_end = to_name_end(varname, FALSE);
|
||||
if (*varname == '_' && has_public)
|
||||
{
|
||||
semsg(_(e_public_member_name_cannot_start_with_underscore_str), line);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
char_u *colon = skipwhite(*varname_end);
|
||||
char_u *type_arg = colon;
|
||||
type_T *type = NULL;
|
||||
if (*colon == ':')
|
||||
{
|
||||
if (VIM_ISWHITE(**varname_end))
|
||||
{
|
||||
semsg(_(e_no_white_space_allowed_before_colon_str), varname);
|
||||
return FAIL;
|
||||
}
|
||||
if (!VIM_ISWHITE(colon[1]))
|
||||
{
|
||||
semsg(_(e_white_space_required_after_str_str), ":", varname);
|
||||
return FAIL;
|
||||
}
|
||||
type_arg = skipwhite(colon + 1);
|
||||
type = parse_type(&type_arg, type_list, TRUE);
|
||||
if (type == NULL)
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
char_u *expr_start = skipwhite(type_arg);
|
||||
char_u *expr_end = expr_start;
|
||||
if (type == NULL && *expr_start != '=')
|
||||
{
|
||||
emsg(_(e_type_or_initialization_required));
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
if (*expr_start == '=')
|
||||
{
|
||||
if (!VIM_ISWHITE(expr_start[-1]) || !VIM_ISWHITE(expr_start[1]))
|
||||
{
|
||||
semsg(_(e_white_space_required_before_and_after_str_at_str),
|
||||
"=", type_arg);
|
||||
return FAIL;
|
||||
}
|
||||
expr_start = skipwhite(expr_start + 1);
|
||||
|
||||
expr_end = expr_start;
|
||||
evalarg_T evalarg;
|
||||
fill_evalarg_from_eap(&evalarg, eap, FALSE);
|
||||
skip_expr(&expr_end, NULL);
|
||||
|
||||
if (type == NULL)
|
||||
{
|
||||
// No type specified, use the type of the initializer.
|
||||
typval_T tv;
|
||||
tv.v_type = VAR_UNKNOWN;
|
||||
char_u *expr = expr_start;
|
||||
int res = eval0(expr, &tv, eap, &evalarg);
|
||||
|
||||
if (res == OK)
|
||||
type = typval2type(&tv, get_copyID(), type_list,
|
||||
TVTT_DO_MEMBER);
|
||||
if (type == NULL)
|
||||
{
|
||||
semsg(_(e_cannot_get_object_member_type_from_initializer_str),
|
||||
expr_start);
|
||||
clear_evalarg(&evalarg, NULL);
|
||||
return FAIL;
|
||||
}
|
||||
}
|
||||
clear_evalarg(&evalarg, NULL);
|
||||
}
|
||||
if (!valid_declaration_type(type))
|
||||
return FAIL;
|
||||
|
||||
*type_ret = type;
|
||||
if (expr_end > expr_start)
|
||||
*init_expr = vim_strnsave(expr_start, expr_end - expr_start);
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Add a member to an object or a class.
|
||||
* Returns OK when successful, "init_expr" will be consumed then.
|
||||
* Returns FAIL otherwise, caller might need to free "init_expr".
|
||||
*/
|
||||
static int
|
||||
add_member(
|
||||
garray_T *gap,
|
||||
char_u *varname,
|
||||
char_u *varname_end,
|
||||
int has_public,
|
||||
type_T *type,
|
||||
char_u *init_expr)
|
||||
{
|
||||
if (ga_grow(gap, 1) == FAIL)
|
||||
return FAIL;
|
||||
ocmember_T *m = ((ocmember_T *)gap->ga_data) + gap->ga_len;
|
||||
m->ocm_name = vim_strnsave(varname, varname_end - varname);
|
||||
m->ocm_access = has_public ? ACCESS_ALL
|
||||
: *varname == '_' ? ACCESS_PRIVATE : ACCESS_READ;
|
||||
m->ocm_type = type;
|
||||
if (init_expr != NULL)
|
||||
m->ocm_init = init_expr;
|
||||
++gap->ga_len;
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Move the class or object members found while parsing a class into the class.
|
||||
* "gap" contains the found members.
|
||||
* "members" will be set to the newly allocated array of members and
|
||||
* "member_count" set to the number of members.
|
||||
* Returns OK or FAIL.
|
||||
*/
|
||||
static int
|
||||
add_members_to_class(
|
||||
garray_T *gap,
|
||||
ocmember_T **members,
|
||||
int *member_count)
|
||||
{
|
||||
*member_count = gap->ga_len;
|
||||
*members = gap->ga_len == 0 ? NULL : ALLOC_MULT(ocmember_T, gap->ga_len);
|
||||
if (gap->ga_len > 0 && *members == NULL)
|
||||
return FAIL;
|
||||
mch_memmove(*members, gap->ga_data, sizeof(ocmember_T) * gap->ga_len);
|
||||
VIM_CLEAR(gap->ga_data);
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle ":class" and ":abstract class" up to ":endclass".
|
||||
*/
|
||||
@@ -64,16 +212,23 @@ ex_class(exarg_T *eap)
|
||||
// extends SomeClass
|
||||
// implements SomeInterface
|
||||
// specifies SomeInterface
|
||||
// check nothing follows
|
||||
|
||||
// TODO: handle "is_export" if it is set
|
||||
// check that nothing follows
|
||||
// handle "is_export" if it is set
|
||||
|
||||
garray_T type_list; // list of pointers to allocated types
|
||||
ga_init2(&type_list, sizeof(type_T *), 10);
|
||||
|
||||
// Growarray with class members declared in the class.
|
||||
garray_T classmembers;
|
||||
ga_init2(&classmembers, sizeof(ocmember_T), 10);
|
||||
|
||||
// Growarray with object methods declared in the class.
|
||||
garray_T classmethods;
|
||||
ga_init2(&classmethods, sizeof(ufunc_T *), 10);
|
||||
|
||||
// Growarray with object members declared in the class.
|
||||
garray_T objmembers;
|
||||
ga_init2(&objmembers, sizeof(objmember_T), 10);
|
||||
ga_init2(&objmembers, sizeof(ocmember_T), 10);
|
||||
|
||||
// Growarray with object methods declared in the class.
|
||||
garray_T objmethods;
|
||||
@@ -92,12 +247,6 @@ ex_class(exarg_T *eap)
|
||||
break;
|
||||
char_u *line = skipwhite(theline);
|
||||
|
||||
// TODO:
|
||||
// class members (public, read access, private):
|
||||
// static varname
|
||||
// public static varname
|
||||
// static _varname
|
||||
|
||||
char_u *p = line;
|
||||
if (checkforcmd(&p, "endclass", 4))
|
||||
{
|
||||
@@ -110,9 +259,6 @@ ex_class(exarg_T *eap)
|
||||
break;
|
||||
}
|
||||
|
||||
// "this._varname"
|
||||
// "this.varname"
|
||||
// "public this.varname"
|
||||
int has_public = FALSE;
|
||||
if (checkforcmd(&p, "public", 3))
|
||||
{
|
||||
@@ -124,12 +270,17 @@ ex_class(exarg_T *eap)
|
||||
has_public = TRUE;
|
||||
p = skipwhite(line + 6);
|
||||
|
||||
if (STRNCMP(p, "this", 4) != 0)
|
||||
if (STRNCMP(p, "this", 4) != 0 && STRNCMP(p, "static", 6) != 0)
|
||||
{
|
||||
emsg(_(e_public_must_be_followed_by_this));
|
||||
emsg(_(e_public_must_be_followed_by_this_or_static));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// object members (public, read access, private):
|
||||
// "this._varname"
|
||||
// "this.varname"
|
||||
// "public this.varname"
|
||||
if (STRNCMP(p, "this", 4) == 0)
|
||||
{
|
||||
if (p[4] != '.' || !eval_isnamec1(p[5]))
|
||||
@@ -138,95 +289,52 @@ ex_class(exarg_T *eap)
|
||||
break;
|
||||
}
|
||||
char_u *varname = p + 5;
|
||||
char_u *varname_end = to_name_end(varname, FALSE);
|
||||
if (*varname == '_' && has_public)
|
||||
{
|
||||
semsg(_(e_public_object_member_name_cannot_start_with_underscore_str), line);
|
||||
break;
|
||||
}
|
||||
|
||||
char_u *colon = skipwhite(varname_end);
|
||||
char_u *type_arg = colon;
|
||||
char_u *varname_end = NULL;
|
||||
type_T *type = NULL;
|
||||
if (*colon == ':')
|
||||
char_u *init_expr = NULL;
|
||||
if (parse_member(eap, line, varname, has_public,
|
||||
&varname_end, &type_list, &type, &init_expr) == FAIL)
|
||||
break;
|
||||
if (add_member(&objmembers, varname, varname_end,
|
||||
has_public, type, init_expr) == FAIL)
|
||||
{
|
||||
if (VIM_ISWHITE(*varname_end))
|
||||
{
|
||||
semsg(_(e_no_white_space_allowed_before_colon_str),
|
||||
varname);
|
||||
break;
|
||||
}
|
||||
if (!VIM_ISWHITE(colon[1]))
|
||||
{
|
||||
semsg(_(e_white_space_required_after_str_str), ":",
|
||||
varname);
|
||||
break;
|
||||
}
|
||||
type_arg = skipwhite(colon + 1);
|
||||
type = parse_type(&type_arg, &type_list, TRUE);
|
||||
if (type == NULL)
|
||||
break;
|
||||
}
|
||||
|
||||
char_u *expr_start = skipwhite(type_arg);
|
||||
char_u *expr_end = expr_start;
|
||||
if (type == NULL && *expr_start != '=')
|
||||
{
|
||||
emsg(_(e_type_or_initialization_required));
|
||||
vim_free(init_expr);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (*expr_start == '=')
|
||||
// class members and methods
|
||||
else if (checkforcmd(&p, "static", 6))
|
||||
{
|
||||
p = skipwhite(p);
|
||||
if (checkforcmd(&p, "def", 3))
|
||||
{
|
||||
if (!VIM_ISWHITE(expr_start[-1]) || !VIM_ISWHITE(expr_start[1]))
|
||||
// TODO: class method
|
||||
// static def someMethod()
|
||||
// enddef
|
||||
// static def <Tval> someMethod()
|
||||
// enddef
|
||||
}
|
||||
else
|
||||
{
|
||||
// class members (public, read access, private):
|
||||
// "static _varname"
|
||||
// "static varname"
|
||||
// "public static varname"
|
||||
char_u *varname = p;
|
||||
char_u *varname_end = NULL;
|
||||
type_T *type = NULL;
|
||||
char_u *init_expr = NULL;
|
||||
if (parse_member(eap, line, varname, has_public,
|
||||
&varname_end, &type_list, &type, &init_expr) == FAIL)
|
||||
break;
|
||||
if (add_member(&classmembers, varname, varname_end,
|
||||
has_public, type, init_expr) == FAIL)
|
||||
{
|
||||
semsg(_(e_white_space_required_before_and_after_str_at_str),
|
||||
"=", type_arg);
|
||||
vim_free(init_expr);
|
||||
break;
|
||||
}
|
||||
expr_start = skipwhite(expr_start + 1);
|
||||
|
||||
expr_end = expr_start;
|
||||
evalarg_T evalarg;
|
||||
fill_evalarg_from_eap(&evalarg, eap, FALSE);
|
||||
skip_expr(&expr_end, NULL);
|
||||
|
||||
if (type == NULL)
|
||||
{
|
||||
// No type specified, use the type of the initializer.
|
||||
typval_T tv;
|
||||
tv.v_type = VAR_UNKNOWN;
|
||||
char_u *expr = expr_start;
|
||||
int res = eval0(expr, &tv, eap, &evalarg);
|
||||
|
||||
if (res == OK)
|
||||
type = typval2type(&tv, get_copyID(), &type_list,
|
||||
TVTT_DO_MEMBER);
|
||||
if (type == NULL)
|
||||
{
|
||||
semsg(_(e_cannot_get_object_member_type_from_initializer_str),
|
||||
expr_start);
|
||||
clear_evalarg(&evalarg, NULL);
|
||||
break;
|
||||
}
|
||||
}
|
||||
clear_evalarg(&evalarg, NULL);
|
||||
}
|
||||
if (!valid_declaration_type(type))
|
||||
break;
|
||||
|
||||
if (ga_grow(&objmembers, 1) == FAIL)
|
||||
break;
|
||||
objmember_T *m = ((objmember_T *)objmembers.ga_data)
|
||||
+ objmembers.ga_len;
|
||||
m->om_name = vim_strnsave(varname, varname_end - varname);
|
||||
m->om_access = has_public ? ACCESS_ALL
|
||||
: *varname == '_' ? ACCESS_PRIVATE
|
||||
: ACCESS_READ;
|
||||
m->om_type = type;
|
||||
if (expr_end > expr_start)
|
||||
m->om_init = vim_strnsave(expr_start, expr_end - expr_start);
|
||||
++objmembers.ga_len;
|
||||
}
|
||||
|
||||
// constructors:
|
||||
@@ -238,12 +346,8 @@ ex_class(exarg_T *eap)
|
||||
// def someMethod()
|
||||
// enddef
|
||||
// TODO:
|
||||
// static def someMethod()
|
||||
// enddef
|
||||
// def <Tval> someMethod()
|
||||
// enddef
|
||||
// static def <Tval> someMethod()
|
||||
// enddef
|
||||
else if (checkforcmd(&p, "def", 3))
|
||||
{
|
||||
exarg_T ea;
|
||||
@@ -282,22 +386,52 @@ ex_class(exarg_T *eap)
|
||||
class_T *cl = NULL;
|
||||
if (success)
|
||||
{
|
||||
// "endclass" encountered without failures: Create the class.
|
||||
|
||||
cl = ALLOC_CLEAR_ONE(class_T);
|
||||
if (cl == NULL)
|
||||
goto cleanup;
|
||||
cl->class_refcount = 1;
|
||||
cl->class_name = vim_strnsave(arg, name_end - arg);
|
||||
|
||||
// Members are used by the new() function, add them here.
|
||||
cl->class_obj_member_count = objmembers.ga_len;
|
||||
cl->class_obj_members = objmembers.ga_len == 0 ? NULL
|
||||
: ALLOC_MULT(objmember_T, objmembers.ga_len);
|
||||
if (cl->class_name == NULL
|
||||
|| (objmembers.ga_len > 0 && cl->class_obj_members == NULL))
|
||||
if (cl->class_name == NULL)
|
||||
goto cleanup;
|
||||
mch_memmove(cl->class_obj_members, objmembers.ga_data,
|
||||
sizeof(objmember_T) * objmembers.ga_len);
|
||||
vim_free(objmembers.ga_data);
|
||||
|
||||
// Add class and object members to "cl".
|
||||
if (add_members_to_class(&classmembers,
|
||||
&cl->class_class_members,
|
||||
&cl->class_class_member_count) == FAIL
|
||||
|| add_members_to_class(&objmembers,
|
||||
&cl->class_obj_members,
|
||||
&cl->class_obj_member_count) == FAIL)
|
||||
goto cleanup;
|
||||
|
||||
if (cl->class_class_member_count > 0)
|
||||
{
|
||||
// Allocate a typval for each class member and initialize it.
|
||||
cl->class_members_tv = ALLOC_CLEAR_MULT(typval_T,
|
||||
cl->class_class_member_count);
|
||||
if (cl->class_members_tv != NULL)
|
||||
for (int i = 0; i < cl->class_class_member_count; ++i)
|
||||
{
|
||||
ocmember_T *m = &cl->class_class_members[i];
|
||||
typval_T *tv = &cl->class_members_tv[i];
|
||||
if (m->ocm_init != NULL)
|
||||
{
|
||||
typval_T *etv = eval_expr(m->ocm_init, eap);
|
||||
if (etv != NULL)
|
||||
{
|
||||
*tv = *etv;
|
||||
vim_free(etv);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO: proper default value
|
||||
tv->v_type = m->ocm_type->tt_type;
|
||||
tv->vval.v_string = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int have_new = FALSE;
|
||||
for (int i = 0; i < objmethods.ga_len; ++i)
|
||||
@@ -318,8 +452,8 @@ ex_class(exarg_T *eap)
|
||||
if (i > 0)
|
||||
ga_concat(&fga, (char_u *)", ");
|
||||
ga_concat(&fga, (char_u *)"this.");
|
||||
objmember_T *m = cl->class_obj_members + i;
|
||||
ga_concat(&fga, (char_u *)m->om_name);
|
||||
ocmember_T *m = cl->class_obj_members + i;
|
||||
ga_concat(&fga, (char_u *)m->ocm_name);
|
||||
ga_concat(&fga, (char_u *)" = v:none");
|
||||
}
|
||||
ga_concat(&fga, (char_u *)")\nenddef\n");
|
||||
@@ -355,6 +489,7 @@ ex_class(exarg_T *eap)
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: class methods
|
||||
cl->class_obj_method_count = objmethods.ga_len;
|
||||
cl->class_obj_methods = ALLOC_MULT(ufunc_T *, objmethods.ga_len);
|
||||
if (cl->class_obj_methods == NULL)
|
||||
@@ -378,13 +513,7 @@ ex_class(exarg_T *eap)
|
||||
cl->class_type_list = type_list;
|
||||
|
||||
// TODO:
|
||||
// - Add the methods to the class
|
||||
// - array with ufunc_T pointers
|
||||
// - Fill hashtab with object members and methods
|
||||
// - Generate the default new() method, if needed.
|
||||
// Later:
|
||||
// - class members
|
||||
// - class methods
|
||||
// - Fill hashtab with object members and methods ?
|
||||
|
||||
// Add the class to the script-local variables.
|
||||
typval_T tv;
|
||||
@@ -404,13 +533,20 @@ cleanup:
|
||||
vim_free(cl);
|
||||
}
|
||||
|
||||
for (int i = 0; i < objmembers.ga_len; ++i)
|
||||
for (int round = 1; round <= 2; ++round)
|
||||
{
|
||||
objmember_T *m = ((objmember_T *)objmembers.ga_data) + i;
|
||||
vim_free(m->om_name);
|
||||
vim_free(m->om_init);
|
||||
garray_T *gap = round == 1 ? &classmembers : &objmembers;
|
||||
if (gap->ga_len == 0 || gap->ga_data == NULL)
|
||||
continue;
|
||||
|
||||
for (int i = 0; i < gap->ga_len; ++i)
|
||||
{
|
||||
ocmember_T *m = ((ocmember_T *)gap->ga_data) + i;
|
||||
vim_free(m->ocm_name);
|
||||
vim_free(m->ocm_init);
|
||||
}
|
||||
ga_clear(gap);
|
||||
}
|
||||
ga_clear(&objmembers);
|
||||
|
||||
for (int i = 0; i < objmethods.ga_len; ++i)
|
||||
{
|
||||
@@ -437,11 +573,11 @@ class_member_type(
|
||||
|
||||
for (int i = 0; i < cl->class_obj_member_count; ++i)
|
||||
{
|
||||
objmember_T *m = cl->class_obj_members + i;
|
||||
if (STRNCMP(m->om_name, name, len) == 0 && m->om_name[len] == NUL)
|
||||
ocmember_T *m = cl->class_obj_members + i;
|
||||
if (STRNCMP(m->ocm_name, name, len) == 0 && m->ocm_name[len] == NUL)
|
||||
{
|
||||
*member_idx = i;
|
||||
return m->om_type;
|
||||
return m->ocm_type;
|
||||
}
|
||||
}
|
||||
return &t_any;
|
||||
@@ -572,13 +708,12 @@ class_object_index(
|
||||
{
|
||||
for (int i = 0; i < cl->class_obj_member_count; ++i)
|
||||
{
|
||||
objmember_T *m = &cl->class_obj_members[i];
|
||||
if (STRNCMP(name, m->om_name, len) == 0 && m->om_name[len] == NUL)
|
||||
ocmember_T *m = &cl->class_obj_members[i];
|
||||
if (STRNCMP(name, m->ocm_name, len) == 0 && m->ocm_name[len] == NUL)
|
||||
{
|
||||
if (*name == '_')
|
||||
{
|
||||
semsg(_(e_cannot_access_private_object_member_str),
|
||||
m->om_name);
|
||||
semsg(_(e_cannot_access_private_member_str), m->ocm_name);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
@@ -597,7 +732,31 @@ class_object_index(
|
||||
semsg(_(e_member_not_found_on_object_str_str), cl->class_name, name);
|
||||
}
|
||||
|
||||
// TODO: class member
|
||||
else if (rettv->v_type == VAR_CLASS)
|
||||
{
|
||||
// class member
|
||||
for (int i = 0; i < cl->class_class_member_count; ++i)
|
||||
{
|
||||
ocmember_T *m = &cl->class_class_members[i];
|
||||
if (STRNCMP(name, m->ocm_name, len) == 0 && m->ocm_name[len] == NUL)
|
||||
{
|
||||
if (*name == '_')
|
||||
{
|
||||
semsg(_(e_cannot_access_private_member_str), m->ocm_name);
|
||||
return FAIL;
|
||||
}
|
||||
|
||||
typval_T *tv = &cl->class_members_tv[i];
|
||||
copy_tv(tv, rettv);
|
||||
class_unref(cl);
|
||||
|
||||
*arg = name_end;
|
||||
return OK;
|
||||
}
|
||||
}
|
||||
|
||||
semsg(_(e_member_not_found_on_class_str_str), cl->class_name, name);
|
||||
}
|
||||
|
||||
return FAIL;
|
||||
}
|
||||
@@ -708,15 +867,29 @@ copy_class(typval_T *from, typval_T *to)
|
||||
void
|
||||
class_unref(class_T *cl)
|
||||
{
|
||||
if (cl != NULL && --cl->class_refcount <= 0)
|
||||
if (cl != NULL && --cl->class_refcount <= 0 && cl->class_name != NULL)
|
||||
{
|
||||
vim_free(cl->class_name);
|
||||
// Freeing what the class contains may recursively come back here.
|
||||
// Clear "class_name" first, if it is NULL the class does not need to
|
||||
// be freed.
|
||||
VIM_CLEAR(cl->class_name);
|
||||
|
||||
for (int i = 0; i < cl->class_class_member_count; ++i)
|
||||
{
|
||||
ocmember_T *m = &cl->class_class_members[i];
|
||||
vim_free(m->ocm_name);
|
||||
vim_free(m->ocm_init);
|
||||
if (cl->class_members_tv != NULL)
|
||||
clear_tv(&cl->class_members_tv[i]);
|
||||
}
|
||||
vim_free(cl->class_class_members);
|
||||
vim_free(cl->class_members_tv);
|
||||
|
||||
for (int i = 0; i < cl->class_obj_member_count; ++i)
|
||||
{
|
||||
objmember_T *m = &cl->class_obj_members[i];
|
||||
vim_free(m->om_name);
|
||||
vim_free(m->om_init);
|
||||
ocmember_T *m = &cl->class_obj_members[i];
|
||||
vim_free(m->ocm_name);
|
||||
vim_free(m->ocm_init);
|
||||
}
|
||||
vim_free(cl->class_obj_members);
|
||||
|
||||
|
Reference in New Issue
Block a user