dwarves.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 1/1] define memdup() static
@ 2008-02-12  0:11 Arnaldo Carvalho de Melo
       [not found] ` <20080212001138.GC4157-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 5+ messages in thread
From: Arnaldo Carvalho de Melo @ 2008-02-12  0:11 UTC (permalink / raw)
  To: Hagen Paul Pfeifer; +Cc: dwarves-u79uwXL29TY76Z2rM5mHXA

Applied,

Thanks a lot!

- Arnaldo

^ permalink raw reply	[flat|nested] 5+ messages in thread
* [PATCH 1/1] define memdup() static
@ 2008-02-10 20:52 Hagen Paul Pfeifer
  0 siblings, 0 replies; 5+ messages in thread
From: Hagen Paul Pfeifer @ 2008-02-10 20:52 UTC (permalink / raw)
  To: Diego 'Flameeyes' Pettenò, dwarves-u79uwXL29TY76Z2rM5mHXA

memdup() is only referenced from dwarves.c. This patch defines them
static. Further symbol hiding can be accomplished via GCC attributes:

#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
# define DWARVES_NO_EXPORT __attribute__((visibility("hidden")))
#else
# define DWARVES_NO_EXPORT
#endif

Signed-off-by: Hagen Paul Pfeifer <hagen-GvnIQ6b/HdU@public.gmane.org>
---
 dwarves.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dwarves.c b/dwarves.c
index 813c67b..aa9510e 100644
--- a/dwarves.c
+++ b/dwarves.c
@@ -114,7 +114,7 @@ static void *zalloc(const size_t size)
 	return s;
 }
 
-void *memdup(const void *src, size_t len)
+static void *memdup(const void *src, size_t len)
 {
 	void *s = malloc(len);
 	if (s != NULL)
-- 
1.5.3.8

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

end of thread, other threads:[~2008-02-12  1:30 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-12  0:11 [PATCH 1/1] define memdup() static Arnaldo Carvalho de Melo
     [not found] ` <20080212001138.GC4157-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2008-02-12  0:37   ` Hagen Paul Pfeifer
2008-02-12  1:12     ` Arnaldo Carvalho de Melo
     [not found]       ` <20080212011242.GD4157-f8uhVLnGfZaxAyOMLChx1axOck334EZe@public.gmane.org>
2008-02-12  1:30         ` Hagen Paul Pfeifer
  -- strict thread matches above, loose matches on Subject: below --
2008-02-10 20:52 Hagen Paul Pfeifer

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).