There are no blocks and never will be
Edit me

Disable blocks

A good first step is to wrap all method declarations and definitions with

#ifdef __has_extension(blocks)
#endif

If you are lucky, blocks are just a non-integral,value-added feature in the ported library.

Rewrite

Generally at this point, you should check how much blocks code there is. If it is used only a few places, here are some ideas how to convert the code for mulle-objc.

Transform to NSInvocation

Blocks that are stored for later execution, are basically a form of NSInvocation. Transform your blocks code into a method and create an NSInvocation for it.

Transform to C function

If the block is used immediately, perhaps to map it to an NSArray, extract the code into a C function. Encapsulate the parameters into a C struct.

Tags: language