1 | /* |
2 | * Copyright (C) 2018 Igalia S.L. |
3 | * |
4 | * This library is free software; you can redistribute it and/or |
5 | * modify it under the terms of the GNU Library General Public |
6 | * License as published by the Free Software Foundation; either |
7 | * version 2 of the License, or (at your option) any later version. |
8 | * |
9 | * This library is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 | * Library General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU Library General Public License |
15 | * along with this library; see the file COPYING.LIB. If not, write to |
16 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
17 | * Boston, MA 02110-1301, USA. |
18 | */ |
19 | |
20 | #include "config.h" |
21 | #include "JSCVersion.h" |
22 | |
23 | /** |
24 | * SECTION: JSCVersion |
25 | * @Short_description: Provides the JavaScriptCore version |
26 | * @Title: JSCVersion |
27 | * |
28 | * Provides convenience functions returning JavaScriptCore's major, minor and |
29 | * micro versions of the JavaScriptCore library your code is running |
30 | * against. This is not necessarily the same as the |
31 | * #JSC_MAJOR_VERSION, #JSC_MINOR_VERSION or |
32 | * #JSC_MICRO_VERSION, which represent the version of the JavaScriptCore |
33 | * headers included when compiling the code. |
34 | * |
35 | */ |
36 | |
37 | /** |
38 | * jsc_get_major_version: |
39 | * |
40 | * Returns the major version number of the JavaScriptCore library. |
41 | * (e.g. in JavaScriptCore version 1.8.3 this is 1.) |
42 | * |
43 | * This function is in the library, so it represents the JavaScriptCore library |
44 | * your code is running against. Contrast with the #JSC_MAJOR_VERSION |
45 | * macro, which represents the major version of the JavaScriptCore headers you |
46 | * have included when compiling your code. |
47 | * |
48 | * Returns: the major version number of the JavaScriptCore library |
49 | */ |
50 | guint jsc_get_major_version(void) |
51 | { |
52 | return JSC_MAJOR_VERSION; |
53 | } |
54 | |
55 | /** |
56 | * jsc_get_minor_version: |
57 | * |
58 | * Returns the minor version number of the JavaScriptCore library. |
59 | * (e.g. in JavaScriptCore version 1.8.3 this is 8.) |
60 | * |
61 | * This function is in the library, so it represents the JavaScriptCore library |
62 | * your code is running against. Contrast with the #JSC_MINOR_VERSION |
63 | * macro, which represents the minor version of the JavaScriptCore headers you |
64 | * have included when compiling your code. |
65 | * |
66 | * Returns: the minor version number of the JavaScriptCore library |
67 | */ |
68 | guint jsc_get_minor_version(void) |
69 | { |
70 | return JSC_MINOR_VERSION; |
71 | } |
72 | |
73 | /** |
74 | * jsc_get_micro_version: |
75 | * |
76 | * Returns the micro version number of the JavaScriptCore library. |
77 | * (e.g. in JavaScriptCore version 1.8.3 this is 3.) |
78 | * |
79 | * This function is in the library, so it represents the JavaScriptCore library |
80 | * your code is running against. Contrast with the #JSC_MICRO_VERSION |
81 | * macro, which represents the micro version of the JavaScriptCore headers you |
82 | * have included when compiling your code. |
83 | * |
84 | * Returns: the micro version number of the JavaScriptCore library |
85 | */ |
86 | guint jsc_get_micro_version(void) |
87 | { |
88 | return JSC_MICRO_VERSION; |
89 | } |
90 | |