> cdef FsAsObj d = FsAsObj()
> d = d.usr.include
> call_native_c_function(d.fshandle)
> 
> Then I do
> 
> $ sudo mkdir /fshandle

No, actually you're right. With the addition of your type behaviour 
suggestions one could do

cdef FsAsObj mydir = d.fshandle # gets "/fshandle"
cdef int myhandle = d.fshandle # gets underlying file handle

which, when I look harder at it, isn't all that horrible. "Attribute 
access overloading"...

Perhaps such type-dependant behaviour would be a default mode; while 
features could be added like (when needed/if worth it/if I get time):

cdef cython.python_interface(FsAsObj) mydir...
cdef cython.c_interface(FsAsObj) mydir...

as additional access-modes for purists and contrived examples.

(Heh, promising to shut up is a promise that's hard to keep..)

-- 
Dag Sverre
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to