/vqdr/trunk

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/vqdr/trunk

« back to all changes in this revision

Viewing changes to src/libvee/pair.vala

  • Committer: Gustav Hartvigsson
  • Date: 2024-12-21 23:51:45 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20241221235145-4metak6z6u6vf6b0
[General] Major refactoring. Utils -> Vee nenaming.
Todo: Split libvee into a different library??

Also: Fixed spelling mistakes.

Show diffs side-by-side

added added

removed removed

Lines of Context:
3
3
 *
4
4
 * Created by Gustav Hartivgsson.
5
5
 */
6
 
[CCode (cname = "V", cprefix = "v_")]
7
 
namespace  Utils {
8
 
  [CCode (cname = "VPair", cprefix = "v_pair_")]
 
6
 
 
7
namespace  Vee {
9
8
  [Compact]
10
9
  public class Pair<T1, T2> {
11
10
    public T1 v1;
17
16
      this.v1 = v1;
18
17
      this.v2 = v2;
19
18
    }
20
 
    [CCode (cname = "v_pair_new_with_free_func")]
 
19
    
21
20
    public Pair.with_free_func (T1 v1, T2 v2,
22
21
                               FreeFunc v1_free_func,
23
22
                               FreeFunc v2_free_func) {
27
26
      this.v2_free_func = v2_free_func;
28
27
    }
29
28
    
30
 
    [CCode (cname = "v_pair_destroy")]
 
29
    
31
30
    ~Pair () {
32
31
      if (this.v1_free_func != null) {
33
32
        this.v1_free_func (v1);