mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-10 15:04:19 +00:00
0a5508a8a1
* Fix M*LIB usage * Fix oplist definition of SubGhzFrequencyAnalyzerLogItem * Fix oplist definition of M_CSTR_DUP_OPLIST * Remove dependency of furi_string_utf8_decode to the internal definition of string_unicode_t * Replace obsolete macro M_IF_DEFAULT1 to M_DEFAULT_ARGS Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: あく <alleteam@gmail.com>
17 lines
509 B
C
17 lines
509 B
C
#pragma once
|
|
#include <m-core.h>
|
|
|
|
#define M_INIT_DUP(a) ((a) = strdup(""))
|
|
#define M_INIT_SET_DUP(a, b) ((a) = strdup(b))
|
|
#define M_SET_DUP(a, b) (free((void*)a), (a) = strdup(b))
|
|
#define M_CLEAR_DUP(a) (free((void*)a))
|
|
|
|
#define M_CSTR_DUP_OPLIST \
|
|
(INIT(M_INIT_DUP), \
|
|
INIT_SET(M_INIT_SET_DUP), \
|
|
SET(M_SET_DUP), \
|
|
CLEAR(M_CLEAR_DUP), \
|
|
HASH(m_core_cstr_hash), \
|
|
EQUAL(M_CSTR_EQUAL), \
|
|
CMP(strcmp), \
|
|
TYPE(const char*))
|