Skip to content

Commit

Permalink
Remove commented-out error-handling code
Browse files Browse the repository at this point in the history
  • Loading branch information
johnjcamilleri committed Aug 31, 2021
1 parent aecaa42 commit 02dc4e8
Showing 1 changed file with 2 additions and 36 deletions.
38 changes: 2 additions & 36 deletions src/runtime/python/pypgf.c
Original file line number Diff line number Diff line change
Expand Up @@ -2987,21 +2987,9 @@ PGF_getCategories(PGFObject *self, void *closure)
if (categories == NULL)
return NULL;

// GuPool* tmp_pool = gu_local_pool();
//
// Create an exception frame that catches all errors.
// GuExn* err = gu_new_exn(tmp_pool);

PyPGFClosure clo = { { pgf_collect_cats }, self, categories };
pgf_iter_categories(self->pgf, &clo.fn);

// if (!gu_ok(err)) {
// Py_DECREF(categories);
// gu_pool_free(tmp_pool);
// return NULL;
// }
//
// gu_pool_free(tmp_pool);
return categories;
}

Expand Down Expand Up @@ -3055,20 +3043,9 @@ PGF_getFunctions(PGFObject *self, void *closure)
if (functions == NULL)
return NULL;

// GuPool* tmp_pool = gu_local_pool();

// Create an exception frame that catches all errors.
// GuExn* err = gu_new_exn(tmp_pool);

PyPGFClosure clo = { { pgf_collect_funs }, self, functions };
pgf_iter_functions(self->pgf, &clo.fn);
// if (!gu_ok(err)) {
// Py_DECREF(functions);
// gu_pool_free(tmp_pool);
// return NULL;
// }
//
// gu_pool_free(tmp_pool);

return functions;
}

Expand All @@ -3090,20 +3067,9 @@ PGF_functionsByCat(PGFObject* self, PyObject *args)
return NULL;
}

// GuPool *tmp_pool = gu_local_pool();

// Create an exception frame that catches all errors.
// GuExn* err = gu_new_exn(tmp_pool);

PyPGFClosure clo = { { pgf_collect_funs }, self, functions };
pgf_iter_functions_by_cat(self->pgf, catname, &clo.fn);
// if (!gu_ok(err)) {
// Py_DECREF(functions);
// gu_pool_free(tmp_pool);
// return NULL;
// }
//
// gu_pool_free(tmp_pool);

return functions;
}

Expand Down

0 comments on commit 02dc4e8

Please sign in to comment.