From: Peter Johnson Date: Sun, 4 May 2003 20:31:57 +0000 (-0000) Subject: Make yasm_section_delete() static. It's unsafe to call from outside, because X-Git-Tag: v0.2.2~3^2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fd1c0ea4b3f25274d46d2c95443dd254c9e8949e;p=yasm Make yasm_section_delete() static. It's unsafe to call from outside, because the only way to allocate a section is when making it a part of a section list, and at present, the list is singly-linked internally. svn path=/trunk/yasm/; revision=940 --- diff --git a/libyasm/section.c b/libyasm/section.c index d260671e..583b8826 100644 --- a/libyasm/section.c +++ b/libyasm/section.c @@ -26,7 +26,7 @@ */ #define YASM_LIB_INTERNAL #include "util.h" -/*@unused@*/ RCSID("$IdPath$"); +/*@unused@*/ RCSID("$IdPath: yasm/libyasm/section.c,v 1.35 2003/03/15 05:07:48 peter Exp $"); #include "errwarn.h" #include "intnum.h" @@ -62,6 +62,8 @@ struct yasm_section { yasm_bytecodehead bc; /* the bytecodes for the section's contents */ }; +static void yasm_section_delete(/*@only@*/ yasm_section *sect); + /*@-compdestroy@*/ yasm_section * yasm_sections_initialize(yasm_sectionhead *headp, yasm_objfmt *of) @@ -284,7 +286,7 @@ yasm_section_get_start(const yasm_section *sect) return sect->start; } -void +static void yasm_section_delete(yasm_section *sect) { if (!sect) diff --git a/libyasm/section.h b/libyasm/section.h index e409f530..aa27229f 100644 --- a/libyasm/section.h +++ b/libyasm/section.h @@ -2,7 +2,7 @@ * \file section.h * \brief YASM section interface. * - * $IdPath: yasm/libyasm/section.h,v 1.36 2003/03/15 05:07:48 peter Exp $ + * $IdPath: yasm/libyasm/section.h,v 1.37 2003/05/04 20:28:28 peter Exp $ * * Copyright (C) 2001 Peter Johnson * @@ -164,8 +164,6 @@ void yasm_section_set_start(yasm_section *sect, unsigned long start, /*@observer@*/ const yasm_expr *yasm_section_get_start (const yasm_section *sect); -void yasm_section_delete(/*@only@*/ yasm_section *sect); - /** Print a section. For debugging purposes. * \param f file * \param indent_level indentation level