forked from sbinet/go-clang
-
Notifications
You must be signed in to change notification settings - Fork 1
/
version.go
39 lines (34 loc) · 879 Bytes
/
version.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
package clang
// #include <stdlib.h>
// #include "go-clang.h"
//
import "C"
/**
* \brief Describes a version number of the form major.minor.subminor.
*/
type Version struct {
c C.CXVersion
}
/**
* \brief The major version number, e.g., the '10' in '10.7.3'. A negative
* value indicates that there is no version number at all.
*/
func (v Version) Major() int {
return int(v.c.Major)
}
/**
* \brief The minor version number, e.g., the '7' in '10.7.3'. This value
* will be negative if no minor version number was provided, e.g., for
* version '10'.
*/
func (v Version) Minor() int {
return int(v.c.Minor)
}
/**
* \brief The subminor version number, e.g., the '3' in '10.7.3'. This value
* will be negative if no minor or subminor version number was provided,
* e.g., in version '10' or '10.7'.
*/
func (v Version) Subminor() int {
return int(v.c.Subminor)
}