Skip to content

Commit

Permalink
fix a tcl callback issue
Browse files Browse the repository at this point in the history
  • Loading branch information
JeffBezanson committed Sep 23, 2012
1 parent ea478f1 commit 7235170
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion deps/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -924,7 +924,7 @@ distclean-zlib:

## Tk wrapper ##

TKW_INC = -I $(USRINC) -I $(JULIAHOME)/src -I $(JULIAHOME)/src/support
TKW_INC = -I $(USRINC) -I /usr/include/tcl -I $(JULIAHOME)/src -I $(JULIAHOME)/src/support
TKW_LIB = -ltcl8.5 -ltk8.5 -L$(USRLIB)/ -ljulia-release

$(USRLIB)/libtk_wrapper.$(SHLIB_EXT): tk_wrapper.c
Expand Down
5 changes: 4 additions & 1 deletion deps/tk_wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ int jl_tcl_callback(ClientData clientData, Tcl_Interp *interp,
JL_GC_POP();
return TCL_ERROR;
}
Tcl_SetResult(interp, jl_string_data(result), TCL_VOLATILE);
if (jl_is_byte_string(result))
Tcl_SetResult(interp, jl_string_data(result), TCL_VOLATILE);
else
Tcl_SetResult(interp, "", TCL_STATIC);
JL_GC_POP();
return TCL_OK;
}
Expand Down
2 changes: 2 additions & 0 deletions src/julia.expmap
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@
jl_exception_in_transit;
jl_expand;
jl_expr_type;
jl_ascii_string_type;
jl_utf8_string_type;
jl_fd_clr;
jl_fd_isset;
jl_fd_set;
Expand Down
4 changes: 2 additions & 2 deletions src/julia.h
Original file line number Diff line number Diff line change
Expand Up @@ -359,8 +359,8 @@ extern jl_tag_type_t *jl_abstractarray_type;
extern jl_struct_type_t *jl_array_type;
extern jl_typename_t *jl_array_typename;
extern jl_struct_type_t *jl_weakref_type;
extern jl_struct_type_t *jl_ascii_string_type;
extern jl_struct_type_t *jl_utf8_string_type;
extern DLLEXPORT jl_struct_type_t *jl_ascii_string_type;
extern DLLEXPORT jl_struct_type_t *jl_utf8_string_type;
extern DLLEXPORT jl_struct_type_t *jl_errorexception_type;
extern jl_struct_type_t *jl_typeerror_type;
extern DLLEXPORT jl_struct_type_t *jl_loaderror_type;
Expand Down

0 comments on commit 7235170

Please sign in to comment.