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
0.2
Peter Johnson 22 years ago
parent d710166b48
commit fd1c0ea4b3
  1. 6
      libyasm/section.c
  2. 4
      libyasm/section.h

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

@ -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

Loading…
Cancel
Save