2
* The contects of this file is in the Public Domain.
4
* Created by Gustav Hartivgsson.
6
[CCode (cname = "V", cprefix = "v_")]
8
[CCode (cname = "VPair", cprefix = "v_pair_")]
10
public class Pair<T1, T2> {
13
public unowned FreeFunc v1_free_func;
14
public unowned FreeFunc v2_free_func;
15
[CCode (cname = "v_pair_new")]
16
public Pair (T1 v1, T2 v2) {
20
[CCode (cname = "v_pair_new_with_free_func")]
21
public Pair.with_free_func (T1 v1, T2 v2,
22
FreeFunc v1_free_func,
23
FreeFunc v2_free_func) {
26
this.v1_free_func = v1_free_func;
27
this.v2_free_func = v2_free_func;
30
[CCode (cname = "v_pair_destroy")]
32
if (this.v1_free_func != null) {
33
this.v1_free_func (v1);
35
if (this.v2_free_func != null) {
36
this.v2_free_func (v2);