JS_ToCStringLen2 contract is documented wrong

オープン
#1,950 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@bnoordhuis がすでに取り組んでいます。

2026年11月24日 から。

  • #1951 @bnoordhuis による — オープン

評価

難易度
2/5
見積もり時間
1〜3時間
初心者へのやさしさ
45/100
issue の種類
ドキュメント
明瞭さ
おおむね明確
活発さ
活発
技術スタック
c
領域
documentation

調査の方向性

The issue is about the documentation of JS_ToCStringLen2, the C API function that converts a JS string to a C string. Find that function's declaration and its doc comment in the public header, then check the implementation to confirm the encoding it returns. Read the linked rquickjs report for context. Done means the doc comment states the actual encoding (WTF-8, which can hold unpaired surrogates) instead of UTF-8, and the wording is consistent with the implementation.

索引モデルが issue の本文から書いたものです。

説明

Following an issue report on https://github.com/DelSkayn/rquickjs/issues/805, I looked into the codebase and it does seem like quickjs always returned WTF-8 from the very early commits. But the documentation states that the C API will return UTF-8, this is not true.

主要言語
C
スター
3.9k
フォーク
389
平均マージ
2日 2時間
マージ済み PR(30日)
19

環境構築

このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

quickjs-ng/quickjs のほかの issue

quickjs-ng/quickjs の issue をすべて見る

似ている issue

C の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。