Skip to content

Instantly share code, notes, and snippets.

@fjolnir
Created May 27, 2014 09:25
Show Gist options
  • Save fjolnir/ad590d4b5f71b8b0a487 to your computer and use it in GitHub Desktop.
Save fjolnir/ad590d4b5f71b8b0a487 to your computer and use it in GitHub Desktop.
// Would an instance created from C++ be safe to pass to C and vice versa?
struct Name {
int x, y, z;
#ifdef __cplusplus
int foo() { return x+y+z; }
#endif
}
@fjolnir
Copy link
Author

fjolnir commented May 27, 2014

Seems the answer is yes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment