Skip to content

Commit

Permalink
allow cfunctions in argparse :map
Browse files Browse the repository at this point in the history
  • Loading branch information
tionis committed Oct 26, 2023
1 parent 641b272 commit d25dd9a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion spork/argparse.janet
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,8 @@
(defn handle-map [name handler]
(when-let [value (get res name)
map-func (handler :map)
is-func (function? map-func)]
is-func (or (function? map-func)
(cfunction? map-func))]
(put res name (map-func value))))

# Handle an option
Expand Down

0 comments on commit d25dd9a

Please sign in to comment.