@@ -164,16 +164,10 @@ #ifndef Tcl_StackChannel #error "Unable to compile on this version of Tcl" #endif /* Tcl_GetStackedChannel */ #endif /* USE_TCL_STUBS */ -#if TCL_MAJOR_VERSION < 9 - typedef char tls_free_type; -#else - typedef void tls_free_type; -#endif - #ifndef JOIN # define JOIN(a,b) JOIN1(a,b) # define JOIN1(a,b) a##b #endif @@ -198,14 +192,19 @@ Tcl_Channel Tls_GetParent(State *statePtr, int maskFlags); Tcl_Obj *Tls_NewX509Obj(Tcl_Interp *interp, X509 *cert); Tcl_Obj *Tls_NewCAObj(Tcl_Interp *interp, const SSL *ssl, int peer); void Tls_Error(State *statePtr, const char *msg); -void Tls_Free(tls_free_type *blockPtr); +#if TCL_MAJOR_VERSION > 8 +void Tls_Free(void *blockPtr); +#else +void Tls_Free(char *blockPtr); +#define Tls_Free(blockPtr) (Tls_Free)((char *)blockPtr) +#endif void Tls_Clean(State *statePtr); int Tls_WaitForConnect(State *statePtr, int *errorCodePtr, int handshakeFailureIsPermanent); BIO *BIO_new_tcl(State* statePtr, int flags); #define PTR2INT(x) ((int) ((intptr_t) (x))) #endif /* _TLSINT_H */