I could redo this method using the correct Obj-C syntax, but I was wondering what to call it from Obj-C. The method is as follows
@interface YarMidiCommon : NSObject static MIDIPacketList *makePacketList(Byte *packetBuffer, const UInt8 *data, UInt32 size); @end
but I have no idea how to call this method. I tried
Byte packetBuffer[size+100]; MIDIPacketList *packetList = makePacketList(packetBuffer, bytes, size);
but the error "has an internal connection but is not defined." Is this possible without resorting to the βcorrectβ Obj-C syntax?
For the record, the method I want to emulate will look like
+ (MIDIPacketList*) makePacketListWithPacketBuffer:(Byte*)packetBuffer data:(const UInt8 *)data size:(UInt32)size;
which is verbose and annoying since everything here is C. anyway.
This is related to this other answer I received today.
source share