[pypy-dev] lltype.malloc with opaque structs

Ryan Gonzalez rymg19 at gmail.com
Wed Nov 5 01:45:04 CET 2014


I think last time I checked, I used rffi.COpaquePtr("MyType") to refer to a
pointer to MyType.

On Tue, Nov 4, 2014 at 6:30 PM, Timothy Baldridge <tbaldridge at gmail.com>
wrote:

> There seem to be many ways to define rffi structs, rffi.Struct CStruct,
> rffi_platform.Struct, lltype.Struct, what I need is this:
>
> There's a struct defined in a c header I'm including via rffi. I want to
> malloc it, but I don't want to define what the contents are, it's just a
> blob that this library requires me to malloc and free. So I really don't
> even know the size. What should I be using?
>
> Timothy
>
> _______________________________________________
> pypy-dev mailing list
> pypy-dev at python.org
> https://mail.python.org/mailman/listinfo/pypy-dev
>
>


-- 
Ryan
If anybody ever asks me why I prefer C++ to C, my answer will be simple:
"It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was
nul-terminated."
Personal reality distortion fields are immune to contradictory evidence. -
srean
Check out my website: http://kirbyfan64.github.io/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/pypy-dev/attachments/20141104/e850154b/attachment.html>


More information about the pypy-dev mailing list