Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions docs/api/scripts/target-instance.md
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,30 @@ target:is_arch("x86")
target:is_arch("x64", "x86_64")
```

## target:is_arch64

- Is the current architecture a 64-bit one

#### Function Prototype

::: tip API
```lua
target:is_arch64()
```
:::

#### Parameter Description

No parameters required for this function.

#### Usage


Comment on lines +229 to +231

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The Usage section should have an explanation, similar to other functions in this file like target:is_arch. This helps users understand when and why to use this function. The extra newline can also be removed to improve consistency.

Suggested change
#### Usage
#### Usage
This is a helper function to check for 64-bit architectures. It is recommended over the global `is_arch64` function for target-specific scripts, as a target can have its own architecture set via `set_arch`.

```lua
- Is the current architecture 64-bit?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The comment syntax is incorrect for Lua. Lua comments start with --. Also, for consistency with other code examples in this document, the comment should be a statement, not a question.

Suggested change
- Is the current architecture 64-bit?
-- Is the current architecture 64-bit

target:is_arch64()
```

## target:targetfile

- Get the target file path
Expand Down