/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/utils/utils.vala

  • Committer: Gustav Hartvigsson
  • Date: 2024-12-21 22:39:17 UTC
  • Revision ID: gustav.hartvigsson@gmail.com-20241221223917-jbt2ylyz9nxjss49
various changes
[utils/utils.vala]
* Removed uneeded int32_abs function

[utils/stack]
* more informative error when trying to pop an empty stack.

[utils/random.vala]
* added c_names to functions (probobly not needed).

[utils/pair.vala]
* Made compact
* made FreeFunc delegates unowned to fix error
* added constructor Pair.with_free_func ().

[utils/named_vector.vala]
* made class compact.

[utils/meson.build]
* Reordered files in list
* added logger.vala.

[utils/logger.vala]
* Added fast and easy logger class.

[utils/fast_number.vala]
* added a bunch of cname CCode attributes.

[general]
* Spelling in comments and functions.

[meson.build]
* Made dependancies easier to read
* added vala posix dependency

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
 */
6
6
[CCode (cname = "V", cprefix = "v_")]
7
7
namespace Utils {
8
 
  // int32 is missinng the abs method. This will have to do for the time being.
9
 
  // BUG: https://gitlab.gnome.org/GNOME/vala/-/issues/1328
10
 
  [CCode (cname = "v_int32_abs")]
11
 
  static int32 int32_abs (int32 N) { return ((N < 0) ? ( -N ) : (N)); }
 
8
  [CCode (cname = "VFreeFunc")]
 
9
  public delegate void FreeFunc (void * ptr);
12
10
 
13
11
  [CCode (cname = "v_str_cmp")]
14
12
  public int str_cmp (string a, string b) {