// Enable legacy logging
#define PAKFIRE_LEGACY_LOGGING
+#include <pakfire/ctx.h>
#include <pakfire/dependencies.h>
#include <pakfire/jail.h>
#include <pakfire/logging.h>
#include <pakfire/util.h>
struct pakfire_parser {
+ struct pakfire_ctx* ctx;
struct pakfire* pakfire;
int nrefs;
struct pakfire_parser* parent, const char* namespace, int flags) {
struct pakfire_parser* parser = calloc(1, sizeof(*parser));
if (parser) {
+ parser->ctx = pakfire_ctx(pakfire);
parser->pakfire = pakfire_ref(pakfire);
parser->nrefs = 1;
if (parser->parent)
pakfire_parser_unref(parser->parent);
-
- pakfire_unref(parser->pakfire);
+ if (parser->pakfire)
+ pakfire_unref(parser->pakfire);
+ if (parser->ctx)
+ pakfire_ctx_unref(parser->ctx);
free(parser);
}