Skip to content

Commit

Permalink
Merge pull request #383 from mgkuhn/typos
Browse files Browse the repository at this point in the history
fixed some documentation typos
  • Loading branch information
Gnimuc authored Jul 15, 2022
2 parents 9931c38 + c4691ee commit 39e3a25
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/src/generator.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ build!(ctx, BUILDSTAGE_PRINTING_ONLY)
```

### Multi-platform configuration
Some headers may contain system-dependent symbols such as `long` or `char`, or system-indenpendent symbols may be resolved to system depent ones. For example, `time_t` is usually just a 64-bit unsigned integer, but implementations may conditionally implement it as `long` or `long long`, which is not portable. You can skip these symbols and add them back manually as in [Skipping specific symbols](@ref). If the differences are too large to be manually fixed, you can generate wrappers for each platform as in [LibClang.jl](https://github.com/Gnimuc/LibClang.jl/blob/v0.61.0/gen/generator.jl).
Some headers may contain system-dependent symbols such as `long` or `char`, or system-independent symbols may be resolved to system-dependent ones. For example, `time_t` is usually just a 64-bit unsigned integer, but implementations may conditionally implement it as `long` or `long long`, which is not portable. You can skip these symbols and add them back manually as in [Skipping specific symbols](@ref). If the differences are too large to be manually fixed, you can generate wrappers for each platform as in [LibClang.jl](https://github.com/Gnimuc/LibClang.jl/blob/v0.61.0/gen/generator.jl).

## Variadic Function
With the help of `@ccall` macro, variadic C functions can be called from Julia. For example, `@ccall printf("%d\n"::Cstring; 123::Cint)::Cint` can be used to call the C function `printf`. Note that those arguments after the semicolon `;` are variadic arguments.
Expand Down
4 changes: 2 additions & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ The package includes a generator to create Julia wrappers for C libraries from a
- macro: limited support
- bitfield: experimental support

Here is a minimalistic example that wrappes example.h and prints the wrapper to screen.
The following example wraps `include/clang-c/*.h` from `Clang_jll` and prints the wrapper to `LibClang.jl`.

First write a configuration script `generator.toml`.
```toml
Expand Down Expand Up @@ -72,5 +72,5 @@ build!(ctx)
## LibClang
LibClang is a thin wrapper over libclang. It's one-to-one mapped to the libclang APIs.
By `using Clang.LibClang`, all of the `CX`/`clang_`-prefixed libclang APIs are imported into the
current namespace, with which you could build up your own tools from the scratch. If you are
current namespace, with which you could build up your own tools from scratch. If you are
unfamiliar with the Clang AST, a good starting point is the [Introduction to the Clang AST](http://clang.llvm.org/docs/IntroductionToTheClangAST.html).
4 changes: 2 additions & 2 deletions gen/generator.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ library_names = {}
# output file path relative to the working directory
output_file_path = "../lib/LibClang.jl"

# if these are set, common file (types and constants) and API file (functions) will be seperated
# if these are set, common file (types and constants) and API file (functions) will be separated
# this is for compatibility, so prologue and epilogue are not supported.
# output_api_file_path = "api.jl"
# output_common_file_path = "common.jl"
Expand Down Expand Up @@ -75,7 +75,7 @@ print_enum_as_integer = false
use_deterministic_symbol = true

# by default, only those declarations in the local header file are processed.
# those declarations in the system headers will be treated sepcially and will be generated if necessary.
# those declarations in the system headers will be treated specially and will be generated if necessary.
# if you'd like to generate all of the symbols in the system headers, please set this option to false.
is_local_header_only = true

Expand Down

0 comments on commit 39e3a25

Please sign in to comment.