Fix bug dereferencing namespaces in convert_swig (#1696)

This commit is contained in:
Thomas Brain 2024-04-23 10:49:39 -05:00 committed by GitHub
parent 6937d003b3
commit 873e4e203d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -622,7 +622,7 @@ sub process_class($$$$$) {
my $sanitized_namespace = $split_namespaces[-1] ;
my @namespace_split = split /namespace\s*$sanitized_namespace/, $$new_contents_ref;
$save_namespace_content = 'namespace ' . $sanitized_namespace . $namespace_split[-1];
$$new_contents_ref = join('namespace ' . $sanitized_namespace, $namespace_split[0 .. $#namespace_split-1]);
$$new_contents_ref = join('namespace ' . $sanitized_namespace, @namespace_split[0 .. $#namespace_split-1]);
}
# SWIG doesn't like "const static". Change it to "static const"