ext/iodine/iodine_helpers.c
/**
Decodes a percent encoded String (normally the "path" of a request), editing the
String in place.

Raises an exception on error... but this might result in a partially decoded
String.
*/
Decodes a percent encoded String (normally the "path" of a request), editing the
String in place.

Raises an exception on error... but this might result in a partially decoded
String.
Decodes a percent encoded String ( normally the " path " of a request ) editing the String in place . Raises an exception on error ... but this might result in a partially decoded String .
static VALUE path_decode_inplace(VALUE self, VALUE str) {
  Check_Type(str, T_STRING);
  ssize_t len =
      http_decode_path(RSTRING_PTR(str), RSTRING_PTR(str), RSTRING_LEN(str));
  if (len < 0)
    rb_raise(rb_eRuntimeError,
             "Malformed URL path string - couldn't decode (String "
             "might have been partially altered).");
  rb_str_set_len(str, len);
  return str;
  (void)self;
}
static VALUE path_decode_inplace ( VALUE self , VALUE str ) { Check_Type ( str , T_STRING ) ; ssize_t len = http_decode_path ( RSTRING_PTR ( str ) , RSTRING_PTR ( str ) , RSTRING_LEN ( str ) ) ; if ( len < 0 ) rb_raise ( rb_eRuntimeError , " " " " ) ; rb_str_set_len ( str , len ) ; return str ; ( void ) self ; }
Decodes a percent encoded String (normally the "path" of a request), editing the
String in place.
Decodes a percent encoded String ( normally the " path " of a request ) editing the String in place .