/* Return the updated line pointer */
return L;
}
-
+
static CodeEntry* ParseInsn (CodeSeg* S, const char* L)
+void DelCodeEntries (CodeSeg* S, unsigned Start, unsigned Count)
+/* Delete a range of code entries. This includes removing references to labels,
+ * labels attached to the entries and so on.
+ */
+{
+ /* Start deleting the entries from the rear, because this involves less
+ * memory moving.
+ */
+ while (Count--) {
+ DelCodeEntry (S, Start + Count);
+ }
+}
+
+
+
struct CodeEntry* GetNextCodeEntry (CodeSeg* S, unsigned Index)
/* Get the code entry following the one with the index Index. If there is no
* following code entry, return NULL.
* if the reference count drops to zero.
*/
+void DelCodeEntries (CodeSeg* S, unsigned Start, unsigned Count);
+/* Delete a range of code entries. This includes removing references to labels,
+ * labels attached to the entries and so on.
+ */
+
#if defined(HAVE_INLINE)
INLINE struct CodeEntry* GetCodeEntry (CodeSeg* S, unsigned Index)
/* Get an entry from the given code segment */
*/
int GetCodeEntries (CodeSeg* S, struct CodeEntry** List,
- unsigned Start, unsigned Count);
+ unsigned Start, unsigned Count);
/* Get Count code entries into List starting at index start. Return true if
* we got the lines, return false if not enough lines were available.
*/