@ -26,12 +26,18 @@ namespace CppSharp.Passes
if (@class == null)
return false;
// TODO: If the translation units of the declarations are different,
// and we apply the pass, we might need additional includes in the
// generated translation unit of the class.
if (@class.TranslationUnit != function.TranslationUnit)
// Clean up the name of the function now that it will be a static method.
var name = function.Name.Substring(@class.Name.Length);
function.ExplicityIgnored = true;
// Create a new fake method so it acts as a static method.
var method = new Method()
var method = new Method
{
Namespace = @class,
OriginalNamespace = function.Namespace,