Skip to content

Commit b635c51

Browse files
committed
Export sqlreturn and check nargs in registerfunc.
1 parent 33cb906 commit b635c51

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/SQLite.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ end
3131
SQLiteDB(file,handle) = SQLiteDB(file,handle,0)
3232

3333
include("UDF.jl")
34-
export registerfunc, @scalarfunc, @sr_str
34+
export registerfunc, sqlreturn, @scalarfunc, @sr_str
3535

3636

3737
function changes(db::SQLiteDB)

src/UDF.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ function registerfunc(db, name, nargs, func, step, final, isdeterm)
1818
end
1919
end
2020

21+
@assert (-1 <= nargs <= 127) "nargs must follow the inequality -1 <= nargs <= 127"
22+
2123
cfunc = func == C_NULL ? C_NULL : cfunction(
2224
func, Nothing, (Ptr{Void}, Cint, Ptr{Ptr{Void}})
2325
)

0 commit comments

Comments
 (0)