[ctxt] rename ctxt.self_rgn => ctxt.init_rgn

This commit is contained in:
Milo Turner 2020-02-08 08:38:05 -05:00
parent 35df16af8b
commit b653137a3e
2 changed files with 6 additions and 5 deletions

View File

@ -3,7 +3,7 @@
#include "util/region.h" #include "util/region.h"
struct ax_ctxt { struct ax_ctxt {
struct rgn* self_rgn; struct rgn* init_rgn;
struct rgn err_rgn; struct rgn err_rgn;
char* err; char* err;
}; };

View File

@ -2,7 +2,7 @@
#include "../ax.h" #include "../ax.h"
/* ----------------------------------------------------------------------------- /* -----------------------------------------------------------------------------
* API functions * API functions :: init / cleanup
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
struct ax_ctxt* ax_new(void) struct ax_ctxt* ax_new(void)
@ -20,7 +20,7 @@ struct ax_ctxt* ax_new(void)
void ax_free(struct ax_ctxt* ax) void ax_free(struct ax_ctxt* ax)
{ {
ax__ctxt_cleanup(ax); ax__ctxt_cleanup(ax);
rgn_cleanup(ax->self_rgn); rgn_cleanup(ax->init_rgn);
} }
const char* ax_get_error(struct ax_ctxt* ax) const char* ax_get_error(struct ax_ctxt* ax)
@ -32,9 +32,10 @@ const char* ax_get_error(struct ax_ctxt* ax)
* Internal 'ax_ctxt' operations * Internal 'ax_ctxt' operations
* -------------------------------------------------------------------------- */ * -------------------------------------------------------------------------- */
void ax__ctxt_init(struct ax_ctxt* ax, struct rgn* self_rgn) void ax__ctxt_init(struct ax_ctxt* ax, struct rgn* init_rgn)
{ {
ax->self_rgn = self_rgn; ax->init_rgn = init_rgn;
rgn_init(&ax->err_rgn, SMALL); rgn_init(&ax->err_rgn, SMALL);
ax->err = ""; ax->err = "";
} }