cgi icon indicating copy to clipboard operation
cgi copied to clipboard

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

Open nobu opened this issue 3 years ago • 3 comments

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.

nobu avatar Dec 10 '21 06:12 nobu

I would say C99 is okay, personally.

ioquatix avatar Dec 24 '21 21:12 ioquatix

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

nobu avatar Dec 26 '21 04:12 nobu

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.

rhenium avatar Dec 26 '21 16:12 rhenium