From a34f7295f74c204f3750376792f8c0d68a4d73a8 Mon Sep 17 00:00:00 2001 From: qiniu-ci Date: Thu, 11 Sep 2025 09:59:26 +0800 Subject: [PATCH 1/3] Initial plan for Issue #568: docs:find typo & fix it From 191e40a774b70d0981a9db94e38e659f5de393b6 Mon Sep 17 00:00:00 2001 From: qiniu-ci Date: Thu, 11 Sep 2025 10:03:01 +0800 Subject: [PATCH 2/3] docs: fix typos and improve clarity in markdown files - Fix duplicate JSON key in README.md example code - Correct grammar from "deps for load" to "deps to load" - Remove unicode artifacts in headerOnly description - Clarify "PC name" to "pkg-config name" for better understanding - Fix spacing issues in documentation Closes #568 --- README.md | 6 +++--- doc/en/dev/llcppcfg.md | 2 +- doc/en/dev/llcppg.md | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index ff589f9c..49d87427 100644 --- a/README.md +++ b/README.md @@ -103,14 +103,14 @@ import ( func main() { mod := cjson.CreateObject() mod.AddItemToObject(c.Str("hello"), cjson.CreateString(c.Str("llgo"))) - mod.AddItemToObject(c.Str("hello"), cjson.CreateString(c.Str("llcppg"))) + mod.AddItemToObject(c.Str("world"), cjson.CreateString(c.Str("llcppg"))) cstr := mod.PrintUnformatted() c.Printf(c.Str("%s\n"), cstr) } ``` Run the demo with `llgo run .`, you will see the following output: ``` -{"hello":"llgo","hello":"llcppg"} +{"hello":"llgo","world":"llcppg"} ``` ### Generated Bindings @@ -180,7 +180,7 @@ cJSON CJSON cJSON_Hooks Hooks cJSON_bool Bool ``` - You can customize these type mappings by editing this file (see [Customizing Bindings](#type-customization)). +You can customize these type mappings by editing this file (see [Customizing Bindings](#type-customization)). ### Customizing Bindings #### Function Customization diff --git a/doc/en/dev/llcppcfg.md b/doc/en/dev/llcppcfg.md index ce2ce45c..9588cfd8 100644 --- a/doc/en/dev/llcppcfg.md +++ b/doc/en/dev/llcppcfg.md @@ -2,7 +2,7 @@ The llcppg core configuration file, `llcppg.cfg`, can be complex and error-prone to configure. This is because it requires a deep understanding of the project structure and compilation details. We have designed llcppcfg to automatically generate the basic `llcppg.cfg` configuration file for users. It greatly simplifies the configuration process, allowing users to simply provide the target library's name as input. The tool then generates corresponding configuration content based on established rules or templates. # Basic Usage -`llcppcfg [options] ` +`llcppcfg [options] ` ## Example of Generating Configuration File `llcppcfg cjson` diff --git a/doc/en/dev/llcppg.md b/doc/en/dev/llcppg.md index ee70c63d..3bb86ad0 100644 --- a/doc/en/dev/llcppg.md +++ b/doc/en/dev/llcppg.md @@ -596,8 +596,8 @@ xmlChar * xsltGetNsProp(xmlNodePtr node, const xmlChar *name, const xmlChar *nam If `xmlChar` and `xmlNodePtr` mappings are not found (not declare `llcppg-libxml` in `deps`), llcppg will notify the user of these missing types and indicate they are from `libxml2` header files. The corresponding notification would be: ```bash -convert /path/to/include/libxml2/libxml/xmlstring.h first, declare its converted package in `llcppg.cfg` deps for load [xmlChar]. -convert /path/to/libxml2/libxml/tree.h first, declare its converted package in `llcppg.cfg` deps for load [xmlNodePtr]. +convert /path/to/include/libxml2/libxml/xmlstring.h first, declare its converted package in `llcppg.cfg` deps to load [xmlChar]. +convert /path/to/libxml2/libxml/tree.h first, declare its converted package in `llcppg.cfg` deps to load [xmlNodePtr]. ``` For this project, `llcppg` will automatically handle type references to libxml2. During the process, `llcppg` uses the `llcppg.pub` file from the generated libxml2 package to ensure type consistency. @@ -728,7 +728,7 @@ The configuration file supports the following options: - `typeMap`: Custom name mapping from C types to Go types. - `symMap`: Custom name mapping from C function names to Go function names. - `staticLib`: Set to true to enable static library symbol reading instead of dynamic library linking. When enabled, llcppg will read symbols from static libraries (.a files) rather than dynamic libraries (.so/.dylib files). -- `headerOnly`: Set to true to ​​skip the symbol intersection process​​ described in [step 3](#llcppsymg). +- `headerOnly`: Set to true to skip the symbol intersection process described in [step 3](#llcppsymg). ## Output From 7cca2a03cb10e19e3c7885f474c7a626605c41da Mon Sep 17 00:00:00 2001 From: niupilot Date: Wed, 17 Sep 2025 12:26:35 +0000 Subject: [PATCH 3/3] revert: keep original duplicate hello keys in README.md example as requested by maintainer Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: niupilot --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 49d87427..82dcdf60 100644 --- a/README.md +++ b/README.md @@ -103,14 +103,14 @@ import ( func main() { mod := cjson.CreateObject() mod.AddItemToObject(c.Str("hello"), cjson.CreateString(c.Str("llgo"))) - mod.AddItemToObject(c.Str("world"), cjson.CreateString(c.Str("llcppg"))) + mod.AddItemToObject(c.Str("hello"), cjson.CreateString(c.Str("llcppg"))) cstr := mod.PrintUnformatted() c.Printf(c.Str("%s\n"), cstr) } ``` Run the demo with `llgo run .`, you will see the following output: ``` -{"hello":"llgo","world":"llcppg"} +{"hello":"llgo","hello":"llcppg"} ``` ### Generated Bindings