summaryrefslogtreecommitdiff
path: root/enc
Commit message (Collapse)AuthorAgeFilesLines
* Fix handling of 6-byte codepoints in left_adjust_char_head in CESU-8 encodingJosef Haider2023-03-181-4/+19
|
* Update the depend filesMatt Valentine-House2023-02-281-66/+0
|
* Remove intern/gc.h from Make depsMatt Valentine-House2023-02-271-66/+0
|
* Extract include/ruby/internal/attr/packed_struct.hNobuyoshi Nakada2023-02-081-0/+66
| | | | | | | | | Split `PACKED_STRUCT` and `PACKED_STRUCT_UNALIGNED` macros into the macros bellow: * `RBIMPL_ATTR_PACKED_STRUCT_BEGIN` * `RBIMPL_ATTR_PACKED_STRUCT_END` * `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_BEGIN` * `RBIMPL_ATTR_PACKED_STRUCT_UNALIGNED_END`
* Ensure newline at EOF [ci skip]Nobuyoshi Nakada2023-01-0635-35/+35
| | | | Cf. https://github.com/ruby/ruby/pull/7069
* update Unicode include files to version 15.0.0Martin Dürst2022-12-062-992/+2094
|
* move Unicode include files to version 15.0.0 directoryMartin Dürst2022-12-062-0/+0
|
* fix wrong property information in name2ctype.hMartin Dürst2022-12-061-5/+16
| | | | | | | | | | | | | | Co-authored-by: Nobuyoshi Nakada [nobu@ruby-lang.org](mailto:nobu@ruby-lang.org) See https://github.com/ruby/ruby/pull/6451 and https://bugs.ruby-lang.org/issues/19007. This keeps the Unicode version at 14.0.0, so this commit is suited for backporting where applicable. At the time of this commit, the reason for the wrong properties which we fix here is still not completely known, so issue 19007 should be kept open.
* Use class methods of `File` over `Kernel.open` and `IO.read`Nobuyoshi Nakada2022-11-211-1/+1
|
* reserved_word: just use gperf 3.1 declaration卜部昌平2022-09-214-9/+5
| | | | | | | | The reason why this was commented out was because of gperf 3.0 vs 3.1 differences (see [Feature #13883]). Five years passed, I am pretty confident that we can drop support of old versions here. Ditto for uniname2ctype_p(), onig_jis_property(), and zonetab().
* Move case-folding.rb to tooldir with enc-prefixNobuyoshi Nakada2022-09-171-418/+0
|
* Remove get_actual_encoding() and the dynamic endian detection for dummy ↵Benoit Daloze2022-09-122-2/+2
| | | | | | | | UTF-16/UTF-32 * And simplify callers of get_actual_encoding(). * See [Feature #18949]. * See https://github.com/ruby/ruby/pull/6322#issuecomment-1242758474
* Support Encoding::Converter newline: :lf and :lf_newline optionsJeremy Evans2022-08-191-0/+20
| | | | | | | | | | | | | | | | Previously, newline: :lf was accepted but ignored. Where it should have been used was commented out code that didn't work, but unlike all other invalid values, using newline: :lf did not raise an error. This adds support for newline: :lf and :lf_newline, for consistency with newline: :cr and :cr_newline. This is basically the same as universal_newline, except that it only affects writing and not reading due to RUBY_ECONV_NEWLINE_DECORATOR_WRITE_MASK. Add tests for the File.open :newline option while here. Fixes [Bug #12436]
* Resolve abi symbol references from miniruby to avoid circular depsYuta Saito2022-08-041-1/+1
| | | | | | | | | | | | | | | | | | Adding `ruby` to `PREP` causes the following circular dependencies because `PREP` is used as a prerequisite by some targets required to build `ruby` target itself. ``` make: Circular .rbconfig.time <- ruby dependency dropped. make: Circular builtin_binary.inc <- ruby dependency dropped. make: Circular ext/extinit.c <- ruby dependency dropped. make: Circular ruby <- ruby dependency dropped. ``` Adding a new Make variable like `EXTPREP` only for exts may be also reasonable, but it would introduce another complexity into our build system. `-bundle_loader` doesn't care that link-time and run-time loader executables are different as long as bound symbols are provided, so it's ok to resolve from miniruby to simplify our build.
* Link ext bundles with bundle loader option for newer ld64Yuta Saito2022-08-041-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ld64 shipped with Xcode 14 emits a warning when using `-undefined dynamic_lookup`. ``` ld: warning: -undefined dynamic_lookup may not work with chained fixups ``` Actually, `-undefined dynamic_lookup` doesn't work when: 1. Link a *shared library* with the option 2. Link it with a program that uses the chained-fixup introduced from macOS 12 and iOS 15 because `-undefined dynamic_lookup` uses lazy-bindings and they won't be bound while dyld fixes-up by traversing chained-fixup info. However, we build exts as *bundles* and they are loaded only through `dlopen`, so it's safe to use `-undefined dynamic_lookup` in theory. So the warning produced by ld64 is false-positive, and it results failure of option checking in configuration. Therefore, it would be an option to ignore the warning during our configuration. On the other hand, `-undefined dynamic_lookup` is already deprecated on all darwin platforms except for macOS, so it's good time to get rid of the option. ld64 also provides `-bundle_loader <executable>` option, which allows to resolve symbols defined in the executable symtab while linking. It behaves almost the same with `-undefined dynamic_lookup`, but it makes the following changes: 1. Require that unresolved symbols among input objects must be defined in the executable. 2. Lazy symbol binding will lookup only the symtab of the bundle loader executable. (`-undefined dynamic_lookup` lookups all symtab as flat namespace) This patch adds `-bundle_loader $(RUBY)` when non-EXTSTATIC configuration by assuming ruby executable can be linked before building exts. See "New Features" subsection under "Linking" section for chained fixup https://developer.apple.com/documentation/xcode-release-notes/xcode-13-release-notes
* Rename ENCINDEX_ASCII to ENCINDEX_ASCII_8BITJean Boussier2022-07-191-3/+3
| | | | Otherwise it's way too easy to confuse it with US_ASCII.
* Remove Unicode 13.0.0 related filesMartin Dürst2022-03-162-50521/+0
|
* update Unicode Version to 14.0.0 and Emoji version to 14.0Martin Dürst2022-03-132-0/+52210
|
* Revert "enc/depend: fix out-of-src build with --with-static-linked-ext" (#5616)Nobuyoshi Nakada2022-03-021-7/+1
| | | | This reverts commit 32ad8df9d1e07e1b2435a8890d070802fcd2989f, which broke out-of-src build with the pre-generated transcoder sources.
* enc/depend: fix out-of-src build with --with-static-linked-extYuta Saito2022-03-021-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When out-of-src build, at the beginning of a build, `make -f enc.mk srcs` generates trans C sources under build dir. On the other hand, enc/trans/*.o were built from trans C sources generated under srcdir due to the following auto-generated rules from enc/depend. ``` encsrcdir = ../src/enc ... enc/trans/big5.$(OBJEXT): $(encsrcdir)/trans/big5.c ``` Therefore, trans C sources are generated twice under srcdir and build dir during a build. Ideally, trans C sources have always been built before compilation of enc/trans/*.o because the source generation is prereq, so making enc/trans/*.o doesn't trigger trans C source generation and shouldn't require MINIRUBY as a make arg for enc.mk. However, the second trans C source gen is unintentionally triggered by enc/trans/*.o, so `make -f enc.mk libencs` requires MINIRUBY for now. When no `--with-static-linked-ext`, `make -f enc.mk libencs` is triggered from common.mk with MINIRUBY, so there is no problem. But when `--with-static-linked-ext`, libencs should be statically-linked to ruby, so `make -f enc.mk libencs` is triggered from exts.mk, and exts.mk invokes it without MINIRUBY. Therefore, when out-of-src build and with `--with-static-linked-ext`, the second trans C source gen fails due to missing MINIRUBY. This issue is deterministically reproducible without -j because common.mk's `main` rule also has libencs prerequisite. This patch supresses the second trans C source gen.
* [Feature #18249] Update dependenciesPeter Zhu2022-02-221-0/+4218
|
* [Feature #18249] Include ruby.h in extensions to have ABI versionPeter Zhu2022-02-222-0/+3
| | | | | All shared libraries must have `include/ruby/internal/abi.h` to include the ABI version. Including `ruby.h` will guarantee that.
* Update dependenciesNobuyoshi Nakada2021-11-211-67/+0
|
* ruby tool/update-deps --fix卜部昌平2021-10-051-850/+895
|
* Remove no longer needed include files (Unicode Version 12.1.0)Martin Dürst2021-07-092-49238/+0
|
* Add directory and include files for Unicode version 13.0.0Martin Dürst2021-07-082-0/+50521
| | | | | | - Add directory enc/unicode/13.0.0 - Add include files casefold.h and name2ctype.h for Unicode version 13.0.0
* Use $ignore_error defined in mkmf.rbNobuyoshi Nakada2021-07-031-9/+9
|
* dependency updates卜部昌平2021-04-131-65/+0
|
* transcode-tblgen.rb: make silent a little when just -vNobuyoshi Nakada2020-12-292-1/+2
|
* Add string encoding IBM720 alias CP720 (#3803)Lars Kanis2020-11-223-1/+126
| | | | | | The mapping table is generated from the ICU project: https://github.com/unicode-org/icu/blob/master/icu4c/source/data/mappings/ibm-720_P100-1997.ucm Fixes bug 16233 : https://bugs.ruby-lang.org/issues/16233
* sed -i '/rmodule.h/d'卜部昌平2020-08-271-27/+0
|
* sed -i '/r_cast.h/d'卜部昌平2020-08-271-27/+0
|
* sed -i '\,2/extern.h,d'卜部昌平2020-08-271-65/+0
|
* Use https instead of httpKazuhiro NISHIYAMA2020-07-2813-15/+15
|
* Encode ' as &apos; when using encode(xml: :attr)Jeremy Evans2020-07-101-1/+2
| | | | Fixes [Bug #16922]
* sed -i 's|ruby/impl|ruby/internal|'卜部昌平2020-05-111-5414/+5414
| | | | To fix build failures.
* sed -i s|ruby/3|ruby/impl|g卜部昌平2020-05-111-5414/+5414
| | | | This shall fix compile errors.
* Suppress warnings by gcc 10.1.0-RC-20200430Nobuyoshi Nakada2020-05-041-0/+4
| | | | | | | | | | | | | | | | | | | | | | * Folding results should not be empty. If `OnigCodePointCount(to->n)` were 0, `for` loop using `fn` wouldn't execute and `ncs` elements are not initialized. ``` enc/unicode.c:557:21: warning: 'ncs[0]' may be used uninitialized in this function [-Wmaybe-uninitialized] 557 | for (i = 0; i < ncs[0]; i++) { | ~~~^~~ ``` * Cast to `enum yytokentype` Additional enums for scanner events by ripper are not included in `yytokentype`. ``` ripper.y:7274:28: warning: implicit conversion from 'enum <anonymous>' to 'enum yytokentype' [-Wenum-conversion] ```
* Merge pull request #2991 from shyouhei/ruby.h卜部昌平2020-04-081-0/+6080
| | | Split ruby.h
* Suppress warnings: reserved for numbered parameterKazuki Tsujimoto2020-04-051-1/+1
|
* Added tooldir variableNobuyoshi Nakada2020-04-052-2/+3
|
* more on NULL versus functions.卜部昌平2020-02-071-5/+5
| | | | | | Function pointers are not void*. See also ce4ea956d24eab5089a143bba38126f2b11b55b6 8427fca49bd85205f5a8766292dd893f003c0e48
* update dependencies卜部昌平2019-12-261-0/+33
|
* decouple internal.h headers卜部昌平2019-12-261-1/+1
| | | | | | | | | | | | | | | | | | Saves comitters' daily life by avoid #include-ing everything from internal.h to make each file do so instead. This would significantly speed up incremental builds. We take the following inclusion order in this changeset: 1. "ruby/config.h", where _GNU_SOURCE is defined (must be the very first thing among everything). 2. RUBY_EXTCONF_H if any. 3. Standard C headers, sorted alphabetically. 4. Other system headers, maybe guarded by #ifdef 5. Everything else, sorted alphabetically. Exceptions are those win32-related headers, which tend not be self- containing (headers have inclusion order dependencies).
* enc/x_emoji.h: fixed dead-links [ci skip]Nobuyoshi Nakada2019-12-241-2/+2
| | | | English version pages seem no longer provided.
* Fixed misspellingsNobuyoshi Nakada2019-12-222-2/+2
| | | | | Fixed misspellings reported at [Bug #16437], missed and a new typo.
* Update dependenciesNobuyoshi Nakada2019-11-181-43/+0
|
* Init function is need to link staticallyNobuyoshi Nakada2019-08-101-0/+5
|
* Removed unnecessary headersNobuyoshi Nakada2019-08-101-32/+0
|
* Use ENC_REPLICATE to copy an encodingNobuyoshi Nakada2019-08-101-8/+1
|