| 
     
      
      
      From: Jeff H. <je...@ac...> - 2008-12-08 23:46:45
      
     
   | 
Donal K. Fellows wrote: > Jan Nijtmans wrote: >> Further on, I agree with Joe about the Tcl_NRAddCallback >> signature: it is overkill to have 4 clientData arguments, >> one would be sufficient. For use inside the core, >> there still is an internal variant with 4 arguments, so this >> change is easy: Just make Tcl NRAddCallback call >> TclNRAddCallback, but with NULL as the last 3 arguments. >> I considered giving Tcl_NRAddCallback a variable number of >> arguments, but I think that would needlessly complicate things. > > I've written a few of the actual uses of that API, and can supply a bit > of grist to this mill. It is most certainly useful to be able to pass > more than one machine-word to the callback, and 4 covers a vast majority > of cases: keeping down the number of times you have to allocate memory > on the critical path is also a good idea. > > IIRC, the number 4 was chosen because that was what it was convenient to > provide in the backing structure while retaining a fast allocator. Or > something like that. Then why doesn't it receive some objv/objc API?  |