]> granicus.if.org Git - yasm/commitdiff
Make yasm_section_delete() static. It's unsafe to call from outside, because
authorPeter Johnson <peter@tortall.net>
Sun, 4 May 2003 20:31:57 +0000 (20:31 -0000)
committerPeter Johnson <peter@tortall.net>
Sun, 4 May 2003 20:31:57 +0000 (20:31 -0000)
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

libyasm/section.c
libyasm/section.h

index d260671e094f90497954febf009379b8d16880e0..583b8826430fdd9f5a143eea07baf5be4b6d2866 100644 (file)
@@ -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)
index e409f530c9d840d666acb80d51637aa15121ced4..aa27229f6af3af8293315760e5c1ed498a71ee90 100644 (file)
@@ -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