Remove unused struct_var_* functions.

These turned out to be unnecessary, so let's not keep them around
and let them start getting complicated.

Closes ticket 31630.
This commit is contained in:
Nick Mathewson 2019-09-05 15:24:54 -04:00
parent 545c21e23d
commit a727d4a3a1
2 changed files with 0 additions and 31 deletions

View File

@ -92,20 +92,6 @@ get_type_def(const struct_member_t *member)
return lookup_type_def(member->type);
}
/**
* (As typed_var_assign, but assign a value to the member of <b>object</b>
* defined by <b>member</b>.)
**/
int
struct_var_assign(void *object, const char *value, char **errmsg,
const struct_member_t *member)
{
void *p = struct_get_mptr(object, member);
const var_type_def_t *def = get_type_def(member);
return typed_var_assign(p, value, errmsg, def);
}
/**
* (As typed_var_free, but free and clear the member of <b>object</b> defined
* by <b>member</b>.)
@ -119,19 +105,6 @@ struct_var_free(void *object, const struct_member_t *member)
typed_var_free(p, def);
}
/**
* (As typed_var_encode, but encode the member of <b>object</b> defined
* by <b>member</b>.)
**/
char *
struct_var_encode(const void *object, const struct_member_t *member)
{
const void *p = struct_get_ptr(object, member);
const var_type_def_t *def = get_type_def(member);
return typed_var_encode(p, def);
}
/**
* (As typed_var_copy, but copy from <b>src</b> to <b>dest</b> the member
* defined by <b>member</b>.)

View File

@ -28,12 +28,8 @@ void *struct_get_mptr(void *object,
const void *struct_get_ptr(const void *object,
const struct struct_member_t *member);
int struct_var_assign(void *object, const char *value, char **errmsg,
const struct struct_member_t *member);
void struct_var_free(void *object,
const struct struct_member_t *member);
char *struct_var_encode(const void *object,
const struct struct_member_t *member);
int struct_var_copy(void *dest, const void *src,
const struct struct_member_t *member);
bool struct_var_eq(const void *a, const void *b,