From dd48e257ab0448d70b1caa237b57c6c2954b6e90 Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Wed, 22 Sep 2021 19:37:54 +0200 Subject: e1_input: Document e1inp_line_create() Specially important regarding the pre-allocated reference count. This was done when moving the API to use osmo_use_count internally, because previous code already came with refcount=1. Change-Id: I819a13732c5d0ff150bc11d1cfd64e96ee81bad2 --- src/e1_input.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/e1_input.c b/src/e1_input.c index fd3082e..9fb8a3b 100644 --- a/src/e1_input.c +++ b/src/e1_input.c @@ -470,6 +470,14 @@ struct e1inp_line *e1inp_line_find(uint8_t e1_nr) return NULL; } +/*! Create a new e1inp line object. + * \param[in] e1_nr The line number of the new line to be created. + * \param[in] driver_name String identifying the driver (see e1inp_driver_register() for more info). + * \returns pointer to the new object created. + * + * The allocated object is returned with a count reference with name "ctor", + * which must be dropped in order to free the object [e1inp_line_put2(line, "ctor")]. + */ struct e1inp_line * e1inp_line_create(uint8_t e1_nr, const char *driver_name) { -- cgit v1.2.3