Skip to content

Instantly share code, notes, and snippets.

@krzyzanowskim
Last active August 29, 2015 14:03
Show Gist options
  • Save krzyzanowskim/9cde199238f945d0d1f1 to your computer and use it in GitHub Desktop.
Save krzyzanowskim/9cde199238f945d0d1f1 to your computer and use it in GitHub Desktop.
Valid C function pointer declaration is invalid for Swift
// I found that when intagrate C API, something strange happending with function declarations
struct testswitf
{
int (*va_args)(int *I)
};
// end with strange error
// <unknown>:0: error: file.h:100: expected ')'
// <unknown>:0: note: file.h:100: to match this '('
// However after I change it to this, then all is good.
int (*va_args)(int *i);
// the only change I've made is "I" -> "i" in parameters.
// This is strange
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment