Bugs (or features), suggestions, and explanation of code

54 views
Skip to first unread message

Stefanos

unread,
Oct 25, 2017, 3:32:54 PM10/25/17
to lemon-lang

In src/larray.c you have this code for larray_length:

long
larray_length
(struct lemon *lemon, struct lobject *self)
{
   
return ((struct larray *)self)->count;
}


My question is: what's the use of struct lemon *lemon if you are not using it in return?

admin

unread,
Oct 25, 2017, 4:08:05 PM10/25/17
to lemon-lang

larray_length is just lobject_length in array type, they should have same number parameters, this can easily change different type for use those types.at begin there's only lobject_length, but larray is widely used type, so i add larray_length.also there is a comment in lobject.h lobject naming rule you should checkout.
Reply all
Reply to author
Forward
0 new messages