Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Recognize multiple valid CCode.gir_namespace/_version attributes in V…
…API files Fixes https://gitlab.gnome.org/GNOME/vala/issues/1189
- Loading branch information
Showing
7 changed files
with
106 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
Packages: combined | ||
GIRWriter | ||
|
||
Input: | ||
|
||
public Foo.Test use_combined_foo (Foo.Test param) { | ||
return param; | ||
} | ||
public Bar.Test use_combined_bar (Bar.Test param) { | ||
return param; | ||
} | ||
public Manam.Test use_combined_manam (Manam.Test param) { | ||
return param; | ||
} | ||
|
||
Output: | ||
|
||
<include name="Foo" version="1.0"/> | ||
<include name="Bar" version="1.0"/> | ||
<include name="Manam" version="1.0"/> | ||
<package name="test"/> | ||
<c:include name="test.h"/> | ||
<namespace name="Test" version="1.2" c:prefix="Test" c:identifier-prefixes="Test" c:symbol-prefixes="test"> | ||
<function name="use_combined_foo" c:identifier="test_use_combined_foo"> | ||
<return-value transfer-ownership="full"> | ||
<type name="Foo.Test" c:type="FooTest*"/> | ||
</return-value> | ||
<parameters> | ||
<parameter name="param" transfer-ownership="none"> | ||
<type name="Foo.Test" c:type="FooTest*"/> | ||
</parameter> | ||
</parameters> | ||
</function> | ||
<function name="use_combined_bar" c:identifier="test_use_combined_bar"> | ||
<return-value transfer-ownership="full"> | ||
<type name="Bar.Test" c:type="BarTest*"/> | ||
</return-value> | ||
<parameters> | ||
<parameter name="param" transfer-ownership="none"> | ||
<type name="Bar.Test" c:type="BarTest*"/> | ||
</parameter> | ||
</parameters> | ||
</function> | ||
<function name="use_combined_manam" c:identifier="test_use_combined_manam"> | ||
<return-value transfer-ownership="full"> | ||
<type name="Manam.Test" c:type="ManamTest*"/> | ||
</return-value> | ||
<parameters> | ||
<parameter name="param" transfer-ownership="none"> | ||
<type name="Manam.Test" c:type="ManamTest*"/> | ||
</parameter> | ||
</parameters> | ||
</function> | ||
</namespace> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
[CCode (cprefix = "Bar", gir_namespace = "Bar", gir_version = "1.0", lower_case_cprefix = "bar_")] | ||
namespace Bar { | ||
public class Test { | ||
} | ||
} | ||
[CCode (cprefix = "Foo", gir_namespace = "Foo", gir_version = "1.0", lower_case_cprefix = "foo_")] | ||
namespace Foo { | ||
public class Test { | ||
} | ||
} | ||
[CCode (cprefix = "Manam", gir_namespace = "Manam", gir_version = "1.0", lower_case_cprefix = "manam_")] | ||
namespace Manam { | ||
public class Test { | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
VALAFLAGS="--vapidir ${abs_srcdir}/girwriter" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters