remove glib dependency by provide compatible replacements

This commit is contained in:
Chris Eagle
2016-12-18 14:56:58 -08:00
parent c8b3d62692
commit e46545f722
79 changed files with 1052 additions and 1358 deletions

View File

@@ -100,7 +100,7 @@ static int cpu_sparc_register(struct uc_struct *uc, SPARCCPU *cpu, const char *c
Error *err = NULL;
if (cpu_sparc_find_by_name(def, name) < 0) {
g_free(s);
free(s);
return -1;
}
@@ -109,7 +109,7 @@ static int cpu_sparc_register(struct uc_struct *uc, SPARCCPU *cpu, const char *c
featurestr = strtok(NULL, ",");
cc->parse_features(CPU(cpu), featurestr, &err);
g_free(s);
free(s);
if (err) {
//error_report("%s", error_get_pretty(err));
error_free(err);
@@ -821,7 +821,7 @@ static void sparc_cpu_uninitfn(struct uc_struct *uc, Object *obj, void *opaque)
SPARCCPU *cpu = SPARC_CPU(uc, obj);
CPUSPARCState *env = &cpu->env;
g_free(env->def);
free(env->def);
}
static void sparc_cpu_class_init(struct uc_struct *uc, ObjectClass *oc, void *data)

View File

@@ -34,30 +34,30 @@ void sparc_release(void *ctx)
int i;
TCGContext *tcg_ctx = (TCGContext *) ctx;
release_common(ctx);
g_free(tcg_ctx->cpu_wim);
g_free(tcg_ctx->cpu_cond);
g_free(tcg_ctx->cpu_cc_src);
g_free(tcg_ctx->cpu_cc_src2);
g_free(tcg_ctx->cpu_cc_dst);
g_free(tcg_ctx->cpu_fsr);
g_free(tcg_ctx->sparc_cpu_pc);
g_free(tcg_ctx->cpu_npc);
g_free(tcg_ctx->cpu_y);
g_free(tcg_ctx->cpu_tbr);
free(tcg_ctx->cpu_wim);
free(tcg_ctx->cpu_cond);
free(tcg_ctx->cpu_cc_src);
free(tcg_ctx->cpu_cc_src2);
free(tcg_ctx->cpu_cc_dst);
free(tcg_ctx->cpu_fsr);
free(tcg_ctx->sparc_cpu_pc);
free(tcg_ctx->cpu_npc);
free(tcg_ctx->cpu_y);
free(tcg_ctx->cpu_tbr);
for (i = 0; i < 8; i++) {
g_free(tcg_ctx->cpu_gregs[i]);
free(tcg_ctx->cpu_gregs[i]);
}
for (i = 0; i < 32; i++) {
g_free(tcg_ctx->cpu_gpr[i]);
free(tcg_ctx->cpu_gpr[i]);
}
g_free(tcg_ctx->cpu_PC);
g_free(tcg_ctx->btarget);
g_free(tcg_ctx->bcond);
g_free(tcg_ctx->cpu_dspctrl);
free(tcg_ctx->cpu_PC);
free(tcg_ctx->btarget);
free(tcg_ctx->bcond);
free(tcg_ctx->cpu_dspctrl);
g_free(tcg_ctx->tb_ctx.tbs);
free(tcg_ctx->tb_ctx.tbs);
}
void sparc_reg_reset(struct uc_struct *uc)