mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
fix dangling ptr issue
This commit is contained in:
parent
67f2db3cbd
commit
a81fecb564
3 changed files with 31 additions and 26 deletions
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
|
@ -82,28 +82,4 @@ jobs:
|
||||||
- uses: actions/upload-artifact@v2
|
- uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: coverage
|
name: coverage
|
||||||
path: coverage
|
path: coverage
|
||||||
|
|
||||||
web:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v1
|
|
||||||
- name: setup emsdk
|
|
||||||
uses: mymindstorm/setup-emsdk@v9
|
|
||||||
with:
|
|
||||||
version: 1.38.40
|
|
||||||
actions-cache-folder: 'emsdk-cache'
|
|
||||||
- name: verify emsdk
|
|
||||||
run: |
|
|
||||||
emcc -v # verify emscripten installed successfully
|
|
||||||
- name: cmake configure
|
|
||||||
run: |
|
|
||||||
emcmake cmake .
|
|
||||||
- name: build
|
|
||||||
run: |
|
|
||||||
cmake --build . --target Luau.Repl.CLI --config Debug # as seen above but only Repl.CLI.
|
|
||||||
- uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: luau-web-artifacts
|
|
||||||
path: docs/assets/luau/
|
|
||||||
if-no-files-found: error
|
|
28
.github/workflows/release.yml
vendored
28
.github/workflows/release.yml
vendored
|
@ -33,3 +33,31 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: luau-${{matrix.os}}
|
name: luau-${{matrix.os}}
|
||||||
path: Release\luau*.exe
|
path: Release\luau*.exe
|
||||||
|
web:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- name: setup emsdk
|
||||||
|
uses: mymindstorm/setup-emsdk@v9
|
||||||
|
with:
|
||||||
|
version: 1.38.40
|
||||||
|
actions-cache-folder: 'emsdk-cache'
|
||||||
|
- name: verify emsdk
|
||||||
|
run: |
|
||||||
|
emcc -v # verify emscripten installed successfully
|
||||||
|
- name: cmake configure
|
||||||
|
run: |
|
||||||
|
emcmake cmake .
|
||||||
|
- name: build
|
||||||
|
run: |
|
||||||
|
cmake --build . --target Luau.Repl.CLI --config Debug # as seen above but only Repl.CLI.
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: luau.wasm
|
||||||
|
path: docs/assets/luau/luau.wasm
|
||||||
|
if-no-files-found: error
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: luau.js
|
||||||
|
path: docs/assets/luau/luau.js
|
||||||
|
if-no-files-found: error
|
|
@ -223,9 +223,10 @@ extern "C"
|
||||||
std::string error = runCode(L, source);
|
std::string error = runCode(L, source);
|
||||||
|
|
||||||
// output error(s)
|
// output error(s)
|
||||||
|
static std::string result = error;
|
||||||
if (error.length())
|
if (error.length())
|
||||||
{
|
{
|
||||||
return std::move(error.c_str());
|
return result.c_str();
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue