%typemap(in) void (* cb)(void *) , void *data , void (cb)(void *){ //if SvGETMAGIC($input) {}; $1 = INT2PTR($1_ltype, SvUV($input)); printf(":: x%" UVxf " to x%lx\n", SvUV($input), $1); { int ret = SWIG_ConvertFunctionPtr($input, (void**)(& $1), 0); printf(":: to x%lx\n", $1); } if(SvGMAGICAL($input)) mg_get($input); $1 = DPTR2FPTR($1_ltype, SvUV($input)); printf("::DPTR2FPTR x%lx to x%lx\n", SvIV($input), $1); }