Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
nobu opened this issue Dec 10, 2021 · 3 comments
Open

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

nobu opened this issue Dec 10, 2021 · 3 comments

Comments

@nobu
Copy link
Member

nobu commented Dec 10, 2021

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.

@ioquatix
Copy link
Member

I would say C99 is okay, personally.

@nobu
Copy link
Member Author

nobu commented Dec 26, 2021

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

@rhenium
Copy link
Member

rhenium commented Dec 26, 2021

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
Labels
None yet
Development

No branches or pull requests

3 participants