Skip to content

Commit

Permalink
Include the metadata headers in the generated SWIG bindings (#2069)
Browse files Browse the repository at this point in the history
This allows access to functions that indicate what object type an OID
represents as well as metadata of an attribute.

Signed-off-by: Saikrishna Arcot <sarcot@microsoft.com>
  • Loading branch information
saiarcot895 authored Sep 19, 2024
1 parent 9b81852 commit baba10c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion meta/parse.pl
Original file line number Diff line number Diff line change
Expand Up @@ -5498,13 +5498,22 @@ sub CreateSaiSwigApiStructs
}

my @headers = GetHeaderFiles();
my @metaheaders = GetMetaHeaderFiles();
my @exheaders = GetExperimentalHeaderFiles();

my @merged = (@headers, @exheaders);
push(@metaheaders, "saimetadata.h");

my @merged = (@headers, @metaheaders, @exheaders);

WriteSwig "%ignore sai_metadata_log;";
WriteSwig "%ignore sai_metadata_log_level;";
WriteSwig "%ignore sai_free_attribute;";

for my $header (sort @merged)
{
WriteSwig "%nodefaultctor;" if $header =~ /saimetadatatypes\.h/;
WriteSwig "%include \"$header\"";
WriteSwig "%clearnodefaultctor;" if $header =~ /saimetadatatypes\.h/;
}
}

Expand Down

0 comments on commit baba10c

Please sign in to comment.