atom: introduce atomfree()

laumann
Jul 17, 2023, 12:55 PM
KLCGXAVW3J6EYOFFIKZY3NT47EHGTVFMKBSXE5NVG66S74YKVBAAC

Dependencies

  • [2] EHVLRMEF change: add vertexeq, fix deleted lines duplication
  • [*] XJ2PEH74 add meson.build
  • [*] L3HKOF4W wrap vendored zstd seekable in own file, #2
  • [*] JAGXXSR7 change: initial work on decoding hunks
  • [*] JVU3TTT5 all: switch away from typedefing anonymous structs
  • [*] PEUS54XQ

Change contents

  • edit in meson.build at line 31
    [2.356]
    [5.1399]
    'atom.c',
  • edit in atom.h at line 49
    [7.5592]
    [6.5628]
    void atomfree(struct atom *);
  • file addition: atom.c (----------)
    [8.1]
    #include <stdlib.h>
    #include <stddef.h>
    #include <stdint.h>
    #include "common.h"
    #include "hash.h"
    #include "vertex.h"
    #include "atom.h"
    void
    atomfree(struct atom *a)
    {
    switch (a->atomtype) {
    case NEW_VERTEX:
    free(a->newvertex.upcontext.entries);
    free(a->newvertex.downcontext.entries);
    break;
    case EDGE_MAP:
    free(a->edgemap.edges.entries);
    break;
    }
    }