erbal 1.2 → 1.3

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.
@@ -66,7 +66,7 @@ VALUE rb_erbal_initialize(int argc, VALUE *argv, VALUE self) {
66
66
  rb_erbal_setup_option(self, parser, &parser->unsafe_concat_method, "unsafe_concat_method", "concat");
67
67
  rb_erbal_setup_option(self, parser, &parser->safe_concat_keyword, "safe_concat_keyword", "");
68
68
 
69
- if (strcmp(RSTRING(parser->safe_concat_method)->ptr, RSTRING(parser->unsafe_concat_method)->ptr) == 0) {
69
+ if (strcmp(RSTRING_PTR(parser->safe_concat_method), RSTRING_PTR(parser->unsafe_concat_method)) == 0) {
70
70
  parser->concat_methods_identical = 1;
71
71
  } else {
72
72
  parser->concat_methods_identical = 0;
@@ -45,7 +45,7 @@ inline void erbal_parser_tag_open_with_dash(erbal_parser *parser) {
45
45
  }
46
46
 
47
47
  inline void erbal_parser_tag_open_choose_concat(erbal_parser *parser) {
48
- if (strcmp(RSTRING(parser->safe_concat_keyword)->ptr, "") == 0 || strcmp(RSTRING(parser->keyword)->ptr, RSTRING(parser->safe_concat_keyword)->ptr) != 0) {
48
+ if (strcmp(RSTRING_PTR(parser->safe_concat_keyword), "") == 0 || strcmp(RSTRING_PTR(parser->keyword), RSTRING_PTR(parser->safe_concat_keyword)) != 0) {
49
49
  /* Keyword doesn't match, reset the buffer to the start of the expression match and act as if a keyword wasn't seen. */
50
50
  p = parser->keyword_preceding_whitespace - 1;
51
51
  erbal_parser_tag_open_for_unsafe_concat(parser);
@@ -123,7 +123,7 @@ inline void erbal_parser_tag_close(erbal_parser *parser) {
123
123
 
124
124
  inline VALUE erbal_escape_special_chars(erbal_parser *parser) {
125
125
  VALUE buf = rb_str_buf_new(0);
126
- int i, n, slashes_seen = 0;
126
+ unsigned int i, n, slashes_seen = 0;
127
127
  char *current_char;
128
128
 
129
129
  for (i = 0; i < parser->state->chars_seen; i++) {
@@ -210,7 +210,7 @@ inline void erbal_parser_finish(erbal_parser *parser) {
210
210
  rb_str_concat(parser->src, parser->buffer_name);
211
211
 
212
212
  if (parser->debug) {
213
- printf("ERBAL DEBUG: %s\n", RSTRING(rb_inspect(parser->src))->ptr);
213
+ printf("ERBAL DEBUG: %s\n", RSTRING_PTR(rb_inspect(parser->src)));
214
214
  }
215
215
  }
216
216
 
@@ -233,7 +233,7 @@ void erbal_parser_init(VALUE self, erbal_parser *parser) {
233
233
  }
234
234
 
235
235
  void erbal_parser_exec(erbal_parser *parser) {
236
- p = RSTRING(parser->str)->ptr;
236
+ p = RSTRING_PTR(parser->str);
237
237
  pe = p + strlen(p);
238
238
 
239
239
  #line 240 "parser.c"
@@ -59,7 +59,7 @@ inline void erbal_parser_tag_open_with_dash(erbal_parser *parser) {
59
59
  }
60
60
 
61
61
  inline void erbal_parser_tag_open_choose_concat(erbal_parser *parser) {
62
- if (strcmp(RSTRING(parser->safe_concat_keyword)->ptr, "") == 0 || strcmp(RSTRING(parser->keyword)->ptr, RSTRING(parser->safe_concat_keyword)->ptr) != 0) {
62
+ if (strcmp(RSTRING_PTR(parser->safe_concat_keyword), "") == 0 || strcmp(RSTRING_PTR(parser->keyword), RSTRING_PTR(parser->safe_concat_keyword)) != 0) {
63
63
  /* Keyword doesn't match, reset the buffer to the start of the expression match and act as if a keyword wasn't seen. */
64
64
  p = parser->keyword_preceding_whitespace - 1;
65
65
  erbal_parser_tag_open_for_unsafe_concat(parser);
@@ -137,7 +137,7 @@ inline void erbal_parser_tag_close(erbal_parser *parser) {
137
137
 
138
138
  inline VALUE erbal_escape_special_chars(erbal_parser *parser) {
139
139
  VALUE buf = rb_str_buf_new(0);
140
- int i, n, slashes_seen = 0;
140
+ unsigned int i, n, slashes_seen = 0;
141
141
  char *current_char;
142
142
 
143
143
  for (i = 0; i < parser->state->chars_seen; i++) {
@@ -224,7 +224,7 @@ inline void erbal_parser_finish(erbal_parser *parser) {
224
224
  rb_str_concat(parser->src, parser->buffer_name);
225
225
 
226
226
  if (parser->debug) {
227
- printf("ERBAL DEBUG: %s\n", RSTRING(rb_inspect(parser->src))->ptr);
227
+ printf("ERBAL DEBUG: %s\n", RSTRING_PTR(rb_inspect(parser->src)));
228
228
  }
229
229
  }
230
230
 
@@ -238,7 +238,7 @@ void erbal_parser_init(VALUE self, erbal_parser *parser) {
238
238
  }
239
239
 
240
240
  void erbal_parser_exec(erbal_parser *parser) {
241
- p = RSTRING(parser->str)->ptr;
241
+ p = RSTRING_PTR(parser->str);
242
242
  pe = p + strlen(p);
243
243
  %% write exec;
244
244
  erbal_parser_finish(parser);
@@ -2,7 +2,7 @@ require 'rake/gempackagetask'
2
2
  require 'yaml'
3
3
 
4
4
  WIN_SUFFIX = ENV['WIN_SUFFIX'] || 'i386-mswin32'
5
- ERBAL_VERSION = '1.2'
5
+ ERBAL_VERSION = '1.3'
6
6
 
7
7
  task :clean => :clobber_package
8
8
 
metadata CHANGED
@@ -1,12 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: erbal
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
5
4
  prerelease: false
6
5
  segments:
7
6
  - 1
8
- - 2
9
- version: "1.2"
7
+ - 3
8
+ version: "1.3"
10
9
  platform: ruby
11
10
  authors:
12
11
  - Ian Leitch
@@ -14,7 +13,7 @@ autorequire:
14
13
  bindir: bin
15
14
  cert_chain: []
16
15
 
17
- date: 2011-01-11 00:00:00 +11:00
16
+ date: 2011-01-29 00:00:00 +11:00
18
17
  default_executable:
19
18
  dependencies: []
20
19
 
@@ -59,7 +58,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
59
58
  requirements:
60
59
  - - ">="
61
60
  - !ruby/object:Gem::Version
62
- hash: 3
63
61
  segments:
64
62
  - 0
65
63
  version: "0"
@@ -68,7 +66,6 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
66
  requirements:
69
67
  - - ">="
70
68
  - !ruby/object:Gem::Version
71
- hash: 3
72
69
  segments:
73
70
  - 0
74
71
  version: "0"