Skip to contentSkip to conversation

fix misuse of typesafe_cb_cast() in example

PATCH Applied Yubin Ruan 2 participants 2 messages Mar 14, 2018

lore
Share & tools
lore

Yubin Ruan

author
#0 lore raw

PATCH 1/1 fix misuse of typesafe_cb_cast() in example

From 32f86c701ab0e0ad0ad6981314a9bff2dc5ebb74 Mon Sep 17 00:00:00 2001
From: Yubin Ruan <[email protected]>
Date: Wed, 14 Mar 2018 11:14:54 +0800
Subject: [PATCH] fix misuse of typesafe_cb_cast() in example

---
 ccan/typesafe_cb/typesafe_cb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ccan/typesafe_cb/typesafe_cb.h +1 -1
index 942d5c2..126d325 100644
@@ -27,7 +27,7 @@
  *	// We can take either an unsigned long or a void *.
  *	void _set_some_value(void *val);
  *	#define set_some_value(e)			\
- *		_set_some_value(typesafe_cb_cast(void *, (e), unsigned long))
+ *		_set_some_value(typesafe_cb_cast(void *, unsigned long, (e)))
  */
 #define typesafe_cb_cast(desttype, oktype, expr)			\
 	__builtin_choose_expr(						\
Signature · 6 lines
2.7.4

_______________________________________________
ccan mailing list
[email protected]
https://lists.ozlabs.org/listinfo/ccan
Applied
#1 lore raw
Quoted 6 lines · Yubin Ruan

From 32f86c701ab0e0ad0ad6981314a9bff2dc5ebb74 Mon Sep 17 00:00:00 2001
From: Yubin Ruan <[email protected]>
Date: Wed, 14 Mar 2018 11:14:54 +0800
Subject: [PATCH] fix misuse of typesafe_cb_cast() in example

Applied, thanks.

Quoted 17 lines
---
 ccan/typesafe_cb/typesafe_cb.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
ccan/typesafe_cb/typesafe_cb.h +1 -1
index 942d5c2..126d325 100644
@@ -27,7 +27,7 @@
  *	// We can take either an unsigned long or a void *.
  *	void _set_some_value(void *val);
  *	#define set_some_value(e)			\
- *		_set_some_value(typesafe_cb_cast(void *, (e), unsigned long))
+ *		_set_some_value(typesafe_cb_cast(void *, unsigned long, (e)))
  */
 #define typesafe_cb_cast(desttype, oktype, expr)			\
 	__builtin_choose_expr(						\
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson

_______________________________________________
ccan mailing list
[email protected]
https://lists.ozlabs.org/listinfo/ccan