Skip to content

Drop C89 support (= Ruby 2.x support)? #18

Open

Description

@nobu

ext/cgi/escape.c uses C99 features, which cannot use before ruby 3.0.

  • Designated Initializers for html_escape_table
  • Variable declaration after code in optimized_escape_html

The latter is easy to make C89-compliant but the former needs to expand the table.

Activity

  1. ioquatix commented on Dec 24, 2021

    @ioquatix
    Member

    I would say C99 is okay, personally.

  2. nobu commented on Dec 26, 2021

    @nobu
    MemberAuthor

    The problem is it must be C89-compliant to support ruby 2.x, which will not reach the EOL one year at least.

  3. rhenium commented on Dec 26, 2021

    @rhenium
    Member

    My understanding is that Ruby 2.7 is the earliest version to require a C99 compiler: https://bugs.ruby-lang.org/projects/ruby-master/wiki/C99

    Apparently, the C99-ism was introduced before cgi was extracted to this repo, and it has been included in all existing gem releases 0.1.0-0.3.1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions