accessing __*__ functions from C

Andy Bensky (ab@infoseek.com)
Mon, 19 Sep 1994 13:24:28 -0700

I am writing some C code which uses a number of user-defined classes.
Some of these classes implement smart lists, that is, they provide
__getslice__(), __getitem__() and __len__(). Is it possible, from
within C, to make use of these functions without calling them directly?
I would like to simply use getlistitem() and getlistsize() without writing
special wrappers for each method, but looking at the code it doesn't look
like this is possible.

For now I am using the simple workaround of getting the list from the
smart-list object and using the standard list functions on that, but it
less convenient that way and I was hoping for a more general solution.

Andy Bensky
InfoSeek Corp.