|
Re: Next SWIG release: msg#00167programming.swig
In a project I did a while back, I made a fairly small interface between python and ocaml using the fact that functions with like prototypes can be called through a pointer with the same code. We might use that device in SWIG to reduce redundancy, as most library have groups of functions with identical prototypes. See: [memcpy, strncpy, ...], [sqrt, sin, cos, tan, ...]. Another strategy we might use is to recognize functions that are curried forms of one another such as CreateWindow and CreateWindowEx in win32 land... The functions don't really have to be related, just have a similar prototype p/m n parameters, and handle calls to these as overloads. Of course, this method should never be used on overloads, just functions with known number and type of parameters, since overloads would get sticky too fast. -- My mind then ran on in reveries concerning the probable effects upon the human constitution of living entirely on ginger-nuts. -- Herman Melville : Bartleby the Scrivener _______________________________________________ Swig maillist - Swig@xxxxxxxxxxxxxxx http://mailman.cs.uchicago.edu/mailman/listinfo/swig |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: Next SWIG release: 00167, David Beazley |
|---|---|
| Next by Date: | Re: Next SWIG release: 00167, Luigi Ballabio |
| Previous by Thread: | RE: Next SWIG releasei: 00167, David Beazley |
| Next by Thread: | Re: Next SWIG release: 00167, Luigi Ballabio |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |