Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #7 from nodes-vapor/feature/stack-buffer-size
Browse files Browse the repository at this point in the history
Added the ability to pass in maxStackSize for stack trace buffer.
  • Loading branch information
BrettRToomey authored Apr 6, 2017
2 parents 874caae + 5f142d8 commit 86c62df
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Sources/Stacked/Stacked.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,10 @@ import Foundation


public struct FrameAddress {
public static func getStackTrace() -> [String] {
public static func getStackTrace(maxStackSize: Int = 32) -> [String] {
var count: Int32 = 0
guard let cStrings = get_stack_trace(32, &count) else {
let maxStackSize = Int32(maxStackSize)
guard let cStrings = get_stack_trace(maxStackSize, &count) else {
return []
}

Expand Down

0 comments on commit 86c62df

Please sign in to comment.