@@ -480,24 +480,25 @@ _Bool z_str_array_is_empty(const z_str_array_t *a);
480
480
_OWNED_TYPE_PTR (z_str_array_t , str_array )
481
481
_LOANED_TYPE (z_str_array_t , str_array )
482
482
483
- typedef void (* _z_dropper_handler_t )(void * arg );
484
- typedef void (* _z_owned_sample_handler_t )(z_owned_sample_t * sample , void * arg );
483
+ typedef void (* z_dropper_handler_t )(void * arg );
484
+ typedef void (* z_owned_sample_handler_t )(z_owned_sample_t * sample , void * arg );
485
+ typedef _z_data_handler_t z_data_handler_t ;
485
486
486
487
/**
487
488
* Represents the sample closure.
488
489
*
489
490
* A closure is a structure that contains all the elements for stateful, memory-leak-free callbacks.
490
491
*
491
492
* Members:
492
- * _z_data_handler_t call: `void *call(const struct z_sample_t*, const void *context)` is the callback function.
493
- * _z_dropper_handler_t drop: `void *drop(void*)` allows the callback's state to be freed.
493
+ * z_data_handler_t call: `void *call(const struct z_sample_t*, const void *context)` is the callback function.
494
+ * z_dropper_handler_t drop: `void *drop(void*)` allows the callback's state to be freed.
494
495
* void *context: a pointer to an arbitrary state.
495
496
*/
496
497
// TODO(sashacmc):
497
498
typedef struct {
498
499
void * context ;
499
- _z_data_handler_t call ;
500
- _z_dropper_handler_t drop ;
500
+ z_data_handler_t call ;
501
+ z_dropper_handler_t drop ;
501
502
} z_owned_closure_sample_t ;
502
503
503
504
void z_closure_sample_call (const z_owned_closure_sample_t * closure , const z_loaned_sample_t * sample );
@@ -508,20 +509,22 @@ void z_closure_sample_call(const z_owned_closure_sample_t *closure, const z_loan
508
509
* A closure is a structure that contains all the elements for stateful, memory-leak-free callbacks.
509
510
*
510
511
* Members:
511
- * _z_owned_sample_handler_t call: `void *call(const struct z_owned_sample_t*, const void *context)` is the callback
512
+ * z_owned_sample_handler_t call: `void *call(const struct z_owned_sample_t*, const void *context)` is the callback
512
513
* function.
513
- * _z_dropper_handler_t drop: `void *drop(void*)` allows the callback's state to be freed. void *context: a
514
+ * z_dropper_handler_t drop: `void *drop(void*)` allows the callback's state to be freed. void *context: a
514
515
* pointer to an arbitrary state.
515
516
*/
516
517
// TODO(sashacmc):
517
518
typedef struct {
518
519
void * context ;
519
- _z_owned_sample_handler_t call ;
520
- _z_dropper_handler_t drop ;
520
+ z_owned_sample_handler_t call ;
521
+ z_dropper_handler_t drop ;
521
522
} z_owned_closure_owned_sample_t ;
522
523
523
524
void z_closure_owned_sample_call (const z_owned_closure_owned_sample_t * closure , z_owned_sample_t * sample );
524
525
526
+ typedef _z_queryable_handler_t z_queryable_handler_t ;
527
+
525
528
/**
526
529
* Represents the query callback closure.
527
530
*
@@ -530,58 +533,59 @@ void z_closure_owned_sample_call(const z_owned_closure_owned_sample_t *closure,
530
533
* Members:
531
534
* _z_queryable_handler_t call: `void (*_z_queryable_handler_t)(z_query_t *query, void *arg)` is the
532
535
* callback function.
533
- * _z_dropper_handler_t drop: `void *drop(void*)` allows the callback's state to be freed.
536
+ * z_dropper_handler_t drop: `void *drop(void*)` allows the callback's state to be freed.
534
537
* void *context: a pointer to an arbitrary state.
535
538
*/
536
539
// TODO(sashacmc):
537
540
typedef struct {
538
541
void * context ;
539
- _z_queryable_handler_t call ;
540
- _z_dropper_handler_t drop ;
542
+ z_queryable_handler_t call ;
543
+ z_dropper_handler_t drop ;
541
544
} z_owned_closure_query_t ;
542
545
543
546
void z_closure_query_call (const z_owned_closure_query_t * closure , const z_loaned_query_t * query );
544
547
545
- typedef void (* _z_owned_query_handler_t )(z_owned_query_t * query , void * arg );
548
+ typedef void (* z_owned_query_handler_t )(z_owned_query_t * query , void * arg );
546
549
547
550
/**
548
551
* Represents the owned query closure.
549
552
*
550
553
* A closure is a structure that contains all the elements for stateful, memory-leak-free callbacks.
551
554
*
552
555
* Members:
553
- * _z_owned_query_handler_t call: `void *call(const struct z_owned_query_t*, const void *context)` is the callback
556
+ * z_owned_query_handler_t call: `void *call(const struct z_owned_query_t*, const void *context)` is the callback
554
557
* function.
555
- * _z_dropper_handler_t drop: `void *drop(void*)` allows the callback's state to be freed. void *context: a
558
+ * z_dropper_handler_t drop: `void *drop(void*)` allows the callback's state to be freed. void *context: a
556
559
* pointer to an arbitrary state.
557
560
*/
558
561
// TODO(sashacmc):
559
562
typedef struct {
560
563
void * context ;
561
- _z_owned_query_handler_t call ;
562
- _z_dropper_handler_t drop ;
564
+ z_owned_query_handler_t call ;
565
+ z_dropper_handler_t drop ;
563
566
} z_owned_closure_owned_query_t ;
564
567
565
568
void z_closure_owned_query_call (const z_owned_closure_owned_query_t * closure , z_owned_query_t * query );
566
569
567
570
typedef void (* z_owned_reply_handler_t )(z_owned_reply_t * reply , void * arg );
571
+ typedef _z_reply_handler_t z_reply_handler_t ;
568
572
569
573
/**
570
574
* Represents the query reply callback closure.
571
575
*
572
576
* A closure is a structure that contains all the elements for stateful, memory-leak-free callbacks.
573
577
*
574
578
* Members:
575
- * _z_reply_handler_t call: `void (*_z_reply_handler_t)(_z_reply_t *reply, void *arg)` is the
579
+ * z_reply_handler_t call: `void (*_z_reply_handler_t)(_z_reply_t *reply, void *arg)` is the
576
580
* callback function.
577
- * _z_dropper_handler_t drop: `void *drop(void*)` allows the callback's state to be freed.
581
+ * z_dropper_handler_t drop: `void *drop(void*)` allows the callback's state to be freed.
578
582
* void *context: a pointer to an arbitrary state.
579
583
*/
580
584
// TODO(sashacmc):
581
585
typedef struct {
582
586
void * context ;
583
- _z_reply_handler_t call ;
584
- _z_dropper_handler_t drop ;
587
+ z_reply_handler_t call ;
588
+ z_dropper_handler_t drop ;
585
589
} z_owned_closure_reply_t ;
586
590
587
591
void z_closure_reply_call (const z_owned_closure_reply_t * closure , const z_loaned_reply_t * reply );
@@ -594,14 +598,14 @@ void z_closure_reply_call(const z_owned_closure_reply_t *closure, const z_loaned
594
598
* Members:
595
599
* z_owned_reply_handler_t call: `void (*z_owned_reply_handler_t)(const z_owned_reply_t *reply, void *arg)` is the
596
600
* callback function.
597
- * _z_dropper_handler_t drop: `void *drop(void*)` allows the callback's state to be freed.
601
+ * z_dropper_handler_t drop: `void *drop(void*)` allows the callback's state to be freed.
598
602
* void *context: a pointer to an arbitrary state.
599
603
*/
600
604
// TODO(sashacmc):
601
605
typedef struct {
602
606
void * context ;
603
607
z_owned_reply_handler_t call ;
604
- _z_dropper_handler_t drop ;
608
+ z_dropper_handler_t drop ;
605
609
} z_owned_closure_owned_reply_t ;
606
610
607
611
void z_closure_owned_reply_call (const z_owned_closure_owned_reply_t * closure , z_owned_reply_t * reply );
@@ -616,14 +620,14 @@ typedef void (*z_owned_hello_handler_t)(z_owned_hello_t *hello, void *arg);
616
620
* Members:
617
621
* z_owned_hello_handler_t call: `void (*z_owned_hello_handler_t)(const z_owned_hello_t *hello, void *arg)` is the
618
622
* callback function.
619
- * _z_dropper_handler_t drop: `void *drop(void*)` allows the callback's state to be freed.
623
+ * z_dropper_handler_t drop: `void *drop(void*)` allows the callback's state to be freed.
620
624
* void *context: a pointer to an arbitrary state.
621
625
*/
622
626
// TODO(sashacmc):
623
627
typedef struct {
624
628
void * context ;
625
629
z_owned_hello_handler_t call ;
626
- _z_dropper_handler_t drop ;
630
+ z_dropper_handler_t drop ;
627
631
} z_owned_closure_hello_t ;
628
632
629
633
void z_closure_hello_call (const z_owned_closure_hello_t * closure , z_owned_hello_t * hello );
@@ -637,14 +641,14 @@ typedef void (*z_id_handler_t)(const z_id_t *id, void *arg);
637
641
*
638
642
* Members:
639
643
* z_id_handler_t call: `void (*z_id_handler_t)(const z_id_t *id, void *arg)` is the callback function.
640
- * _z_dropper_handler_t drop: `void *drop(void*)` allows the callback's state to be freed.
644
+ * z_dropper_handler_t drop: `void *drop(void*)` allows the callback's state to be freed.
641
645
* void *context: a pointer to an arbitrary state.
642
646
*/
643
647
// TODO(sashacmc):
644
648
typedef struct {
645
649
void * context ;
646
650
z_id_handler_t call ;
647
- _z_dropper_handler_t drop ;
651
+ z_dropper_handler_t drop ;
648
652
} z_owned_closure_zid_t ;
649
653
650
654
void z_closure_zid_call (const z_owned_closure_zid_t * closure , const z_id_t * id );
0 commit comments