Skip to content

Instantly share code, notes, and snippets.

@banshee
Created October 15, 2013 23:46
Show Gist options
  • Save banshee/7000449 to your computer and use it in GitHub Desktop.
Save banshee/7000449 to your computer and use it in GitHub Desktop.
Modify the output of swig for use with Xamarin
ARGF.each do |l|
case l
when /public delegate void Exception(Argument)?Delegate/
puts " [MonoTouch.MonoNativeFunctionWrapper]", l
when /static void SetPendingArgument(Null|OutOfRange)?Exception/
puts " [MonoTouch.MonoPInvokeCallback (typeof (ExceptionArgumentDelegate))]", l
when /static void SetPending.*Exception/
puts " [MonoTouch.MonoPInvokeCallback (typeof (ExceptionDelegate))]", l
when /static string CreateString/
puts " [MonoTouch.MonoPInvokeCallback (typeof (SWIGStringDelegate))]", l
else
puts l
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment