From: Zoran V. <zv...@ar...> - 2006-01-13 15:34:26
|
Am 11.01.2006 um 19:06 schrieb Zoran Vasiljevic: > I'm looking into this now... I will suggest we change > this for *all* Tcl callbacks. I'm about to checkin changes to various ns_schedule_* and ns_register_* procs to allow variable number of arguments passed to scripts as discussed here. Here is the list of procedures affected: lexxsrv:nscp 3> ns_register_proc wrong # args: should be "ns_register_proc ?-noinherit? ?--? method url script ?args?" lexxsrv:nscp 6> ns_register_url2file wrong # args: should be "ns_register_url2file ?-noinherit? ?--? url script ?args?" lexxsrv:nscp 7> ns_register_filter wrong # args: should be "ns_register_filter ?-first? ?--? when method urlPattern script ?args?" lexxsrv:nscp 8> ns_register_trace wrong # args: should be "ns_register_trace method urlPattern script ? args?" lexxsrv:nscp 12> ns_schedule_proc wrong # args: should be "ns_schedule_proc ?-once? ?-thread? ?--? interval script ?args?" lexxsrv:nscp 13> ns_schedule_weekly wrong # args: should be "ns_schedule_weekly ?-once? ?-thread? ?--? day hour minute script ?args?" lexxsrv:nscp 14> ns_schedule_daily wrong # args: should be "ns_schedule_daily ?-once? ?-thread? ?--? hour minute script ?args?" Normally, while building up the script, the optional args are always appended after the fixed arguments, in contrast to AS where, because of the backward compatibility reasons, some tricks are done with the command-line. On the C-API.... The Ns_TclNewCallback is now: NS_EXTERN Ns_TclCallback *Ns_TclNewCallback(Tcl_Interp *interp, void *cbProc, Tcl_Obj *scriptObjPtr, int objc, Tcl_Obj *CONST objv[]); ... so there is only object-based interface and it us used from all over the code. The string-based interface equivalent to the above is NOT implemented. The Ns_TclNewCallbackObj is gone. Please report any problems you find asap so I can fix them. Oh yes: this is INCOMPATIBLE change, meaning scripts written for AOLserver MAY NOT work correctly, but this is the price to pay for a cleaner and more logical API. Cheers Zoran |