logo       

Re: Next SWIG release: msg#00167

programming.swig

Subject: Re: Next SWIG release

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>
Google Custom Search

News | FAQ | advertise