The C code
int setCallback(Fl_Widget* wgt, Fl_Callback *cb, void *pdata=NULL, int
num=1);
Run
can be translated into
proc setCallback*(wgt: ptr Fl_Widget; cb: ptr Fl_Callback;
pdata: pointer = nil; num: cint = 1): cint
Run
Instead of
setCallback(wgt, cb, nil, 2)
Run
I want to call the function as
setCallback(wgt, cb, 0, 2)
Run
I have tried use
converter toNil(x: int=0): type(nil) = nil
Run
but
Error: invalid type: 'nil' in this context: 'proc (x: int): nil' for proc
Run
so, is it possible to write a convertor which actually convert number zero only
to nil? thanks