vf_set_prop_value(3)
π vf_set_prop_value β bestie, we're setting property values π
okay so real talk, this is vf_set_prop_value(3) from the <../vformat/vf_iface.h> cinematic universe, and it's literally the girl who puts values into your properties. no cap.
β¨ SYNOPSIS β¨
#include <../vformat/vf_iface.h>
extern bool_t vf_set_prop_value
(
VF_PROP_T *p_prop,
void *p_value,
uint32_t n_param,
vf_encoding_t encoding,
bool_t copy
);
like. look at her. five whole arguments. main character energy fr fr π
πΈ PARAMETERS πΈ
VF_PROP_T *p_propβ the property itself, bestie. the one we're setting values on. the moment.void *p_valueβ pointer to the data. yes it'svoid *, no we don't talk about it, she contains multitudes πuint32_t n_paramβ the data size or the index, depending on the situation. she's flexible like that.vf_encoding_t encodingβ the encoding in use. keep this in your notes, it's gonna matter in a sec πbool_t copyβ do we copy the data? asking for a friend. (the friend is you. you're asking.)
π¦ DESCRIPTION π¦
So what does she do? She sets values associated with a property. That's it. That's the job. Iconic of her honestly.
But here's the tea, and it's important tea, so listen up: if you pass in a value of encoding that is not the same as the current property encoding, the property contents get freed before the indicated value is set. Like, obliterated. Gone. Prior to setting. So if you were attached to what was in there... π that's on you for not checking the encoding first, bestie.
not me warning you that mismatched encodings will free your property contents β that's a real caveat, don't sleep on it π«Ά
π₯ RETURNS π₯
TRUE <=> re-allocation success & encoding correct, FALSE else.
so like. TRUE means both things went right (re-allocation succeeded AND the encoding was correct), and FALSE is the catch-all for everything else. vibe check: passed or failed, no in-between, periodt.
π SEE ALSO π
the whole friend group showed up, we love a supportive squad:
vf_parse_init(3), vf_parse_text(3), vf_parse_end(3), vf_read_file(3), vf_write_file(3), vf_get_next_object(3), vf_create_object(3), vf_get_object_type(3), vf_get_property(3), vf_get_property_ex(3), vf_get_next_property(3), vf_get_prop_value(3), vf_get_prop_value_string(3), vf_get_prop_name_string(3), vf_set_prop_name_string(3), vf_get_prop_name(3), vf_get_prop_value_object(3), vf_set_prop_value_object(3), vf_set_prop_value_string(3), vf_set_prop_value_base64(3), vf_get_prop_value_base64(3), vf_set_property_from_file(3), vf_delete_object(3), vf_delete_prop(3), vf_find_prop_qual_index(3), vf_is_modified(3), vf_find_charset(3), vf_date_string_to_time(3), vf_period_string_to_time(3), vf_period_time_to_string(3), vf_set_prop_value_time(3), vf_get_prop_value_time(3)
and that's the whole page, bestie!! this lil masterpiece came out of c2man vf_iface.h, dated 30 April 2003 β yes she's a vintage queen and she still slays πβ¨ go forth and set those property values responsibly, mwah π
π¦ where this page comes from
- debian bookworm: libvformat-dev 1.13-12 Β· LGPL-2.1-or-later
- ubuntu jammy: libvformat-dev 1.13-12build2 Β· LGPL-2.1-or-later
- ubuntu noble: libvformat-dev 1.13-12.1ubuntu1 Β· LGPL-2.1-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms