On Apr 25, 5:09 am, "Jack" <[EMAIL PROTECTED]> wrote:

> typedef struct
> {
>  char *country_short;
>  char *country_long;
>  char *region;
>  char *city;
>  char *isp;
>  float latitude;
>  float longitude;
>  char *domain;
>  char *zipcode;
>  char *timezone;
>  char *netspeed;
>
> } IP2LocationRecord;


First define a struct type IP2LocationRecord by subclassing from
ctypes.Structure. Then define a pointer type as
ctypes.POINTER(IP2LocationRecord) and set that as the function's
restype attribute. See the ctypes tutorial or reference for details.






--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to