summaryrefslogtreecommitdiffstats
path: root/ta
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2014-02-23 16:50:51 +0100
committerwm4 <wm4@nowhere>2014-02-23 16:50:51 +0100
commit7dae316d50450bfb1c6af46ac8040f634fb09e26 (patch)
tree92bf9b498f8d40c563a35b5ae79185ae9f13e728 /ta
parentae2472f0ee121a668792d0b648b85cc10f45dd84 (diff)
downloadmpv-7dae316d50450bfb1c6af46ac8040f634fb09e26.tar.bz2
mpv-7dae316d50450bfb1c6af46ac8040f634fb09e26.tar.xz
ta: clarify a corner case
Diffstat (limited to 'ta')
-rw-r--r--ta/ta.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/ta/ta.c b/ta/ta.c
index eda77076ee..0045024833 100644
--- a/ta/ta.c
+++ b/ta/ta.c
@@ -105,6 +105,10 @@ static struct ta_ext_header *get_or_alloc_ext_header(void *ptr)
* Setting parent==NULL (with ptr!=NULL) always succeeds, and unsets the
* parent of ptr. Operations ptr==NULL always succeed and do nothing.
* Returns true on success, false on OOM.
+ *
+ * Warning: if ta_parent is a direct or indirect child of ptr, things will go
+ * wrong. The function will apparently succeed, but creates circular
+ * parent links, which are not allowed.
*/
bool ta_set_parent(void *ptr, void *ta_parent)
{