DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] ring: cleanup file-local macros at end-of-file
@ 2015-03-03 16:38 Bruce Richardson
  2015-03-03 21:03 ` Thomas Monjalon
  0 siblings, 1 reply; 5+ messages in thread
From: Bruce Richardson @ 2015-03-03 16:38 UTC (permalink / raw)
  To: dev

The ENQUEUE_PTRS and DEQUEUE_PTRS macros defined in rte_ring.h are
not meant to be global and are not prefixed with the RTE_ prefix.
Therefore undef the macros at end of file to avoid pollution of the
global namespace, in case ends apps end up wanting to reuse those names.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
 lib/librte_ring/rte_ring.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
index bdf69b7..0d35648 100644
--- a/lib/librte_ring/rte_ring.h
+++ b/lib/librte_ring/rte_ring.h
@@ -1232,6 +1232,10 @@ rte_ring_dequeue_burst(struct rte_ring *r, void **obj_table, unsigned n)
 		return rte_ring_mc_dequeue_burst(r, obj_table, n);
 }
 
+/* undef un-prefixed macros which are local to this file */
+#undef ENQUEUE_PTRS
+#undef DEQUEUE_PTRS
+
 #ifdef __cplusplus
 }
 #endif
-- 
2.1.0

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-03-04 10:50 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-03 16:38 [dpdk-dev] [PATCH] ring: cleanup file-local macros at end-of-file Bruce Richardson
2015-03-03 21:03 ` Thomas Monjalon
2015-03-04 10:22   ` Bruce Richardson
2015-03-04 10:26     ` Ananyev, Konstantin
2015-03-04 10:49       ` Bruce Richardson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).