data-method added

FossilOrigin-Name: e2fe30e334a87a40bcb6157180055ca49d00ca13475b8b206c24870c57ecaf7f
This commit is contained in:
7u83@mail.ru 2018-04-04 06:04:37 +00:00
parent a39514e836
commit bec5a882ef
2 changed files with 9 additions and 1 deletions

View File

@ -81,6 +81,11 @@ static int len ( struct cw_KTV * data ){
return bstr16_len(data->val.ptr);
}
static void * data(struct cw_KTV_t * data)
{
return bstr16_data(data);
}
const struct cw_Type cw_type_bstr16 = {
"Bstr16", /* name */
del, /* del */
@ -88,5 +93,6 @@ const struct cw_Type cw_type_bstr16 = {
get, /* get */
to_str, /* to_str */
from_str, /* from_str */
len /* len */
len, /* len */
data /* data */
};

View File

@ -77,6 +77,8 @@ struct cw_Type {
int (*len)(cw_KTV_t *);
void *(*data)(cw_KTV_t *);
};
typedef struct cw_Type cw_Type_t;