typed list declaration

This commit is contained in:
Maxim Devaev
2026-08-30 00:16:47 +03:00
parent db87e03ce7
commit 3af6bfac0f
4 changed files with 10 additions and 10 deletions

View File

@@ -36,7 +36,7 @@
#include "rtpc.h"
typedef struct {
typedef struct us_janus_client_sx {
janus_callbacks *gw;
janus_plugin_session *session;
@@ -66,7 +66,7 @@ typedef struct {
ldf last_key_req_ts;
US_LIST_DECLARE;
US_LIST_DECLARE(struct us_janus_client_sx);
} us_janus_client_s;

View File

@@ -25,9 +25,9 @@
#include "tools.h"
#define US_LIST_DECLARE \
void *prev; \
void *next;
#define US_LIST_DECLARE(x_type) \
x_type *prev; \
x_type *next;
#define US_LIST_ITERATE(x_first, x_item, ...) { \
for (__typeof__(x_first) x_item = x_first; x_item;) { \

View File

@@ -36,7 +36,7 @@
#include "../stream.h"
typedef struct {
typedef struct us_stream_client_sx {
struct us_server_sx *server;
struct evhttp_request *req;
@@ -54,15 +54,15 @@ typedef struct {
us_fpsi_s *fpsi;
US_LIST_DECLARE;
US_LIST_DECLARE(struct us_stream_client_sx);
} us_stream_client_s;
typedef struct {
typedef struct us_snapshot_client_sx {
struct us_server_sx *server;
struct evhttp_request *req;
ldf req_ts;
US_LIST_DECLARE;
US_LIST_DECLARE(struct us_snapshot_client_sx);
} us_snapshot_client_s;
typedef struct {

View File

@@ -47,7 +47,7 @@ typedef struct us_worker_sx {
struct us_workers_pool_sx *pool;
US_LIST_DECLARE;
US_LIST_DECLARE(struct us_worker_sx);
} us_worker_s;
typedef void *(*us_workers_pool_job_init_f)(void *arg);