ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ctypes-users
ctypes-users
[ctypes-users] Re: Functions returning structures
by Thomas Heller other posts by this author
Apr 27 2004 5:43PM messages near this date
Re: [ctypes-users] Functions returning structures | [ctypes-users] What's going on in CVS
Myers Carpenter <myers@[...].org>  writes:

>  The ctypes tutorial says:
> > Allowed values for restype are simple data types like c_int, c_long,
> > c_char and so on as well as pointers to other data types. Functions
> > returning structures are not yet supported.
> 
>  What would it take to get structures supported?  It would seem if you
>  can pack a structure into memory to be read by C code you could do the
>  reverse pretty easily.

Of course it's possible, but Structure support is even weaker in the
non-windows version, where libffi is used.  You cannot even pass
structures by value currently, and it would require quite some changes
to make it work there.

I would prefer to add this thing when libffi has been integrated more
closely, so that it can also be used on Windows.

Thomas



-------------------------------------------------------
This SF.net email is sponsored by: The Robotic Monkeys at ThinkGeek
For a limited time only, get FREE Ground shipping on all orders of $35
or more. Hurry up and shop folks, this offer expires April 30th!
http://www.thinkgeek.com/freeshipping/?cpg=12297
_______________________________________________
ctypes-users mailing list
ctypes-users@[...].net
https://lists.sourceforge.net/lists/listinfo/ctypes-users
Thread:
Myers Carpenter
Myers Carpenter
Thomas Heller

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved