Skip to content

Commit

Permalink
Use GVAR_FUNC, don't assume Obj == UInt**
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin authored and ChrisJefferson committed Jul 1, 2022
1 parent 58255a6 commit 045c8b9
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/ferret.cc
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

extern "C" {

Obj FuncSOLVE(Obj self, Obj conlist, Obj options) {
static Obj FuncYAPB_SOLVE(Obj self, Obj conlist, Obj options) {
(void)self; // remove warning

if(!IS_REC(options))
Expand All @@ -22,7 +22,7 @@ Obj FuncSOLVE(Obj self, Obj conlist, Obj options) {
return solver(conlist, options);
}

Obj FuncSOLVE_COSET(Obj self, Obj conlistC, Obj conlistL, Obj conlistR, Obj options) {
static Obj FuncYAPB_SOLVE_COSET(Obj self, Obj conlistC, Obj conlistL, Obj conlistR, Obj options) {
(void)self; // remove warning

if(!IS_REC(options))
Expand All @@ -33,11 +33,9 @@ Obj FuncSOLVE_COSET(Obj self, Obj conlistC, Obj conlistL, Obj conlistR, Obj opti
}

static StructGVarFunc GVarFuncs [] = {
{ "YAPB_SOLVE", 2, "object, object", (UInt**(*)())FuncSOLVE, "src/string.c:FuncSOLVE" },
{ "YAPB_SOLVE_COSET", 4, "object, object, object, object", (UInt**(*)())FuncSOLVE_COSET, "src/string.c:FuncSOLVE_COSET" },

{ 0 }

GVAR_FUNC(YAPB_SOLVE, 2, "object, object"),
GVAR_FUNC(YAPB_SOLVE_COSET, 4, "object, object, object, object"),
{ 0 }
};


Expand Down

0 comments on commit 045c8b9

Please sign in to comment.