[pulseaudio-discuss] [patch] proplist: tweak documentation for `pa_proplist_get()`
Lyndon Brown
jnqnfe at gmail.com
Fri Apr 9 00:51:26 UTC 2021
Small documentation patch to clarify a point of confusion.
---------------------
>From b22d250347a6ed303ae5f62ad207a9c0112e811a Mon Sep 17 00:00:00 2001
From: Lyndon Brown <jnqnfe at gmail.com>
Date: Fri, 9 Apr 2021 01:47:58 +0100
Subject: proplist: tweak documentation for `pa_proplist_get()`
to clarify that only mutating proplist calls potentially invalidate results
of earlier get requests, thus addressing the confusion found at [1].
[1]: https://github.com/jnqnfe/pulse-binding-rust/issues/38
diff --git a/src/pulse/proplist.h b/src/pulse/proplist.h
index 9df10927d..7cd36f163 100644
--- a/src/pulse/proplist.h
+++ b/src/pulse/proplist.h
@@ -322,7 +322,8 @@ const char *pa_proplist_gets(const pa_proplist *p, const char *key);
/** Store the value for the specified key in \a data. Will store a
* NUL-terminated string for string entries. The \a data pointer returned will
* point to an internally allocated buffer. The caller should make a
- * copy of the data before the property list is accessed again.
+ * copy of the data before any subsequent modification or destruction
+ * of the property list.
* Returns zero on success, negative on error. \since 0.9.11 */
int pa_proplist_get(const pa_proplist *p, const char *key, const void **data, size_t *nbytes);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: plget.patch
Type: text/x-patch
Size: 1194 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/pulseaudio-discuss/attachments/20210409/4d8cab40/attachment.bin>
More information about the pulseaudio-discuss
mailing list