Skip to content
Merged
Show file tree
Hide file tree
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
26 changes: 26 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Documentation

on:
push:
branches: [master]

jobs:
swift-doc:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
- name: Generate Documentation
uses: MaxDesiatov/swift-doc@prebuilt-image
with:
inputs: "Sources"
module-name: JavaScriptKit
format: html
base-url: "/JavaScriptKit"
output: ./.build/documentation
- run: sudo chmod o+r -R ./.build/documentation
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./.build/documentation
4 changes: 2 additions & 2 deletions Sources/JavaScriptKit/BasicObjects/JSError.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** A wrapper around the [JavaScript Error
/** A wrapper around [the JavaScript Error
class](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Error) that
exposes its properties in a type-safe way.
*/
Expand All @@ -24,7 +24,7 @@ public final class JSError: Error {
jsObject.name.string!
}

/// The JavaScript call trace that led to the creation of this error object.
/// The JavaScript call stack that led to the creation of this error object.
public var stack: String? {
jsObject.stack.string
}
Expand Down
6 changes: 3 additions & 3 deletions Sources/JavaScriptKit/FundamentalObjects/JSFunction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,18 +105,18 @@ public class JSClosure: JSFunction {
}

@_cdecl("swjs_prepare_host_function_call")
public func _prepare_host_function_call(_ argc: Int32) -> UnsafeMutableRawPointer {
func _prepare_host_function_call(_ argc: Int32) -> UnsafeMutableRawPointer {
let argumentSize = MemoryLayout<RawJSValue>.size * Int(argc)
return malloc(Int(argumentSize))!
}

@_cdecl("swjs_cleanup_host_function_call")
public func _cleanup_host_function_call(_ pointer: UnsafeMutableRawPointer) {
func _cleanup_host_function_call(_ pointer: UnsafeMutableRawPointer) {
free(pointer)
}

@_cdecl("swjs_call_host_function")
public func _call_host_function(
func _call_host_function(
_ hostFuncRef: JavaScriptHostFuncRef,
_ argv: UnsafePointer<RawJSValue>, _ argc: Int32,
_ callbackFuncRef: JavaScriptObjectRef
Expand Down