Skip to content

Commit

Permalink
Regenerated Rapa
Browse files Browse the repository at this point in the history
  • Loading branch information
dbussink committed Apr 11, 2012
1 parent 98529eb commit eb83313
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 9 deletions.
2 changes: 1 addition & 1 deletion vm/builtin/pack18.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This file was generated by Ragel. Your edits will be lost.
*
* This is a state machine implementation of Array#pack.
* See http://github.com/brixen/rapa.
* See http://github.com/rubinius/rapa.
*
* vim: filetype=cpp
*/
Expand Down
2 changes: 1 addition & 1 deletion vm/builtin/pack19.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This file was generated by Ragel. Your edits will be lost.
*
* This is a state machine implementation of Array#pack.
* See http://github.com/brixen/rapa.
* See http://github.com/rubinius/rapa.
*
* vim: filetype=cpp
*/
Expand Down
6 changes: 3 additions & 3 deletions vm/builtin/unpack18.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This file was generated by Ragel. Your edits will be lost.
*
* This is a state machine implementation of String#unpack.
* See http://github.com/brixen/rapa.
* See http://github.com/rubinius/rapa.
*
* vim: filetype=cpp
*/
Expand Down Expand Up @@ -274,7 +274,7 @@ namespace rubinius {
return str;
}

static const int32_t utf8_limits[] = {
static const uint32_t utf8_limits[] = {
0x0, /* 1 */
0x80, /* 2 */
0x800, /* 3 */
Expand All @@ -294,7 +294,7 @@ namespace rubinius {

for(; count > 0 && bytes < bytes_end; count--) {
native_int remainder = bytes_end - bytes;
int32_t c = *bytes++ & 0xff, value = c;
uint32_t c = *bytes++ & 0xff, value = c;
int n = 0;
length = 1;

Expand Down
14 changes: 10 additions & 4 deletions vm/builtin/unpack19.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* This file was generated by Ragel. Your edits will be lost.
*
* This is a state machine implementation of String#unpack.
* See http://github.com/brixen/rapa.
* See http://github.com/rubinius/rapa.
*
* vim: filetype=cpp
*/
Expand All @@ -18,6 +18,7 @@

#include "builtin/array.hpp"
#include "builtin/bytearray.hpp"
#include "builtin/encoding.hpp"
#include "builtin/exception.hpp"
#include "builtin/fixnum.hpp"
#include "builtin/float.hpp"
Expand Down Expand Up @@ -139,7 +140,11 @@ namespace rubinius {
const char* bytes_end, native_int remainder)
{
if(remainder == 0) {
return String::create(state, 0, 0);
String* str = String::create(state, 0, 0);

str->encoding(state, Encoding::ascii8bit_encoding(state));

return str;
}

static bool initialized = false;
Expand Down Expand Up @@ -212,6 +217,7 @@ namespace rubinius {
}

*buf = 0;
str->encoding(state, Encoding::ascii8bit_encoding(state));
str->num_bytes(state, Fixnum::from(buf - str->byte_address()));
return str;
}
Expand Down Expand Up @@ -274,7 +280,7 @@ namespace rubinius {
return str;
}

static const int32_t utf8_limits[] = {
static const uint32_t utf8_limits[] = {
0x0, /* 1 */
0x80, /* 2 */
0x800, /* 3 */
Expand All @@ -294,7 +300,7 @@ namespace rubinius {

for(; count > 0 && bytes < bytes_end; count--) {
native_int remainder = bytes_end - bytes;
int32_t c = *bytes++ & 0xff, value = c;
uint32_t c = *bytes++ & 0xff, value = c;
int n = 0;
length = 1;

Expand Down

0 comments on commit eb83313

Please sign in to comment.