Skip to content

Commit

Permalink
Mark __crystal_personality as nodoc [fixup #15070] (#15219)
Browse files Browse the repository at this point in the history
  • Loading branch information
BlobCodes authored Dec 10, 2024
1 parent 746075e commit 512a8b7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/raise.cr
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ end
end
{% else %}
{% mingw = flag?(:win32) && flag?(:gnu) %}
# :nodoc:
fun {{ mingw ? "__crystal_personality_imp".id : "__crystal_personality".id }}(
version : Int32, actions : LibUnwind::Action, exception_class : UInt64, exception_object : LibUnwind::Exception*, context : Void*,
) : LibUnwind::ReasonCode
Expand All @@ -206,12 +207,14 @@ end
alias DISPATCHER_CONTEXT = Void
end

# :nodoc:
lib LibUnwind
alias PersonalityFn = Int32, Action, UInt64, Exception*, Void* -> ReasonCode

fun _GCC_specific_handler(ms_exc : LibC::EXCEPTION_RECORD64*, this_frame : Void*, ms_orig_context : LibC::CONTEXT*, ms_disp : LibC::DISPATCHER_CONTEXT*, gcc_per : PersonalityFn) : LibC::EXCEPTION_DISPOSITION
end

# :nodoc:
fun __crystal_personality(ms_exc : LibC::EXCEPTION_RECORD64*, this_frame : Void*, ms_orig_context : LibC::CONTEXT*, ms_disp : LibC::DISPATCHER_CONTEXT*) : LibC::EXCEPTION_DISPOSITION
LibUnwind._GCC_specific_handler(ms_exc, this_frame, ms_orig_context, ms_disp, ->__crystal_personality_imp)
end
Expand Down Expand Up @@ -293,6 +296,7 @@ fun __crystal_raise_overflow : NoReturn
end

{% if flag?(:interpreted) %}
# :nodoc:
def __crystal_raise_cast_failed(obj, type_name : String, location : String)
raise TypeCastError.new("Cast from #{obj.class} to #{type_name} failed, at #{location}")
end
Expand Down

0 comments on commit 512a8b7

Please sign in to comment.