mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Remove get_actual_encoding() and the dynamic endian detection for dummy UTF-16/UTF-32
* And simplify callers of get_actual_encoding(). * See [Feature #18949]. * See https://github.com/ruby/ruby/pull/6322#issuecomment-1242758474
This commit is contained in:
parent
ed029e9bd4
commit
6525b6f760
7 changed files with 26 additions and 101 deletions
|
@ -17,7 +17,7 @@
|
|||
#define ENC_DEFINE(name) rb_encdb_declare(name)
|
||||
#define ENC_SET_BASE(name, orig) rb_enc_set_base((name), (orig))
|
||||
#define ENC_SET_DUMMY(name, orig) rb_enc_set_dummy(name)
|
||||
#define ENC_DUMMY_UNICODE(name) rb_encdb_set_unicode(rb_enc_set_dummy(ENC_REPLICATE((name), name "BE")))
|
||||
#define ENC_DUMMY_UNICODE(name) ENC_DUMMY(name)
|
||||
|
||||
void
|
||||
Init_encdb(void)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "regenc.h"
|
||||
/* dummy for unsupported, stateful encoding */
|
||||
#define ENC_DUMMY_UNICODE(name) ENC_REPLICATE(name, name "BE")
|
||||
#define ENC_DUMMY_UNICODE(name) ENC_DUMMY(name)
|
||||
ENC_DUMMY_UNICODE("UTF-16");
|
||||
ENC_DUMMY_UNICODE("UTF-32");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue