1

I want to know what would be the "thing" generating/inferring what a C struct's "buffer format string" should be, according to PEP 3118.

E.g. if I have some cython code that defines

cdef struct S:
    int field_1
    int field_2

if I tried to make a memoryview with type cdef S[:], there is an associated format string, something like

T{
  i:field_1:
  i:field_2:
}

What is the thing that inspects the struct definition to infer the format string?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.