character-encodings 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Rakefile CHANGED
@@ -10,7 +10,7 @@ require 'rake/testtask'
10
10
  require 'spec/rake/spectask'
11
11
 
12
12
  PackageName = 'character-encodings'
13
- PackageVersion = '0.3.0'
13
+ PackageVersion = '0.4.0'
14
14
 
15
15
  desc 'Default task'
16
16
  task :default => [:extensions]
@@ -40,8 +40,8 @@ enum {
40
40
  /* {{{1
41
41
  * Return the combinging class of ‘c’.
42
42
  */
43
- inline int
44
- _unichar_combining_class(unichar c)
43
+ int
44
+ unichar_combining_class(unichar c)
45
45
  {
46
46
  return COMBINING_CLASS(c);
47
47
  }
@@ -43,6 +43,5 @@ bool binary_search_unicode_table(const void *table, size_t n, size_t sizeof_entr
43
43
 
44
44
  unichar *_utf_normalize_wc(const char *str, size_t max_len, bool use_len,
45
45
  NormalizeMode mode) HIDDEN;
46
- int _unichar_combining_class(unichar c) HIDDEN;
47
46
 
48
47
  #endif /* PRIVATE_H */
@@ -727,7 +727,7 @@ static bool
727
727
  has_more_above(const char *str)
728
728
  {
729
729
  for (const char *p = str; *p != '\0'; p = utf_next(p)) {
730
- int c_class = _unichar_combining_class(utf_char(p));
730
+ int c_class = unichar_combining_class(utf_char(p));
731
731
 
732
732
  if (c_class == 230)
733
733
  return true;
@@ -8,6 +8,12 @@
8
8
  #ifndef UNICODE_H
9
9
  #define UNICODE_H
10
10
 
11
+ #if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 4)
12
+ #define CONST_FUNC \
13
+ __attribute__((__const__))
14
+ #else
15
+ #define CONST_FUNC
16
+ #endif
11
17
 
12
18
  typedef uint32_t unichar;
13
19
 
@@ -84,6 +90,8 @@ int unichar_xdigit_value(unichar c);
84
90
 
85
91
  UnicodeType unichar_type(unichar c);
86
92
 
93
+ int unichar_combining_class(unichar c) CONST_FUNC;
94
+
87
95
  bool unichar_mirror(unichar c, unichar *mirrored);
88
96
 
89
97
 
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: character-encodings
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.3.0
7
- date: 2007-11-22 00:00:00 +01:00
6
+ version: 0.4.0
7
+ date: 2007-12-04 00:00:00 +01:00
8
8
  summary: A pluggable character-encoding library
9
9
  require_paths:
10
10
  - lib