2
0
Эх сурвалжийг харах

[std] remove hl_maybe_print_custom_stack from hl api as not used

Yuxiao Mao 3 өдөр өмнө
parent
commit
0d0ccf64d5
2 өөрчлөгдсөн 2 нэмэгдсэн , 3 устгасан
  1. 0 1
      src/hl.h
  2. 2 2
      src/std/error.c

+ 0 - 1
src/hl.h

@@ -635,7 +635,6 @@ HL_API HL_NO_RETURN( void hl_null_access( void ) );
 HL_API void hl_setup_longjump( void *j );
 HL_API void hl_setup_exception( void *resolve_symbol, void *capture_stack );
 HL_API void hl_dump_stack( void );
-HL_API bool hl_maybe_print_custom_stack( vdynamic *exc );
 HL_API void hl_print_uncaught_exception( vdynamic *exc );
 HL_API varray *hl_exception_stack( void );
 HL_API bool hl_detect_debugger( void );

+ 2 - 2
src/std/error.c

@@ -167,7 +167,7 @@ HL_PRIM void hl_dump_stack() {
 	fflush(stdout);
 }
 
-HL_PRIM bool hl_maybe_print_custom_stack( vdynamic *exc ) {
+static bool maybe_print_custom_stack( vdynamic *exc ) {
 	hl_type *ot = exc->t;
 	while( ot->kind == HOBJ ) {
 		if( ot->obj->super == NULL ) {
@@ -189,7 +189,7 @@ HL_PRIM bool hl_maybe_print_custom_stack( vdynamic *exc ) {
 
 HL_PRIM void hl_print_uncaught_exception(vdynamic *exc) {
 	uprintf(USTR("Uncaught exception: %s\n"), hl_to_string(exc));
-	if (!hl_maybe_print_custom_stack(exc)) {
+	if (!maybe_print_custom_stack(exc)) {
 		varray *a = hl_exception_stack();
 		for (int i = 0; i < a->size; i++)
 			uprintf(USTR("Called from %s\n"), hl_aptr(a, uchar *)[i]);