Skip to content

Commit 227f443

Browse files
committed
fixed ti_SetArchiveStatus prototype/declaration
1 parent fea6317 commit 227f443

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

src/fileioc/fileioc.h

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,30 @@ int ti_IsArchived(uint8_t handle);
365365
* @warning Archiving a variable can cause a garbage collection cycle.
366366
* You should use ti_SetGCBehavior to catch this event.
367367
*/
368-
int ti_SetArchiveStatus(bool archive, uint8_t handle);
368+
int ti_SetArchiveStatus(uint8_t archive, uint8_t handle);
369+
370+
/**
371+
* Moves an AppVar/variable between archive or RAM storage.
372+
* \rst
373+
* +-------------+-----------------------------------------+
374+
* | **archive** | **Description** |
375+
* +-------------+-----------------------------------------+
376+
* | true | Store AppVar/variable in archive. |
377+
* +-------------+-----------------------------------------+
378+
* | false | Store AppVar/variable in RAM. |
379+
* +-------------+-----------------------------------------+
380+
* \endrst
381+
* @param[in] archive Documented in the above table.
382+
* @param[in] handle AppVar/variable handle.
383+
* @returns `0` on failure.
384+
*
385+
* @warning Archiving a variable can cause a garbage collection cycle.
386+
* You should use ti_SetGCBehavior to catch this event.
387+
*
388+
* @note This macro wraps ti_SetArchiveStatus, and ensures that `archive` is
389+
* passed into ti_SetArchiveStatus correctly.
390+
*/
391+
#define ti_SetArchiveStatus(archive, handle) ti_SetArchiveStatus((bool)(archive), (handle))
369392

370393
/**
371394
* Deletes an AppVar.

0 commit comments

Comments
 (0)