mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 04:50:34 +05:00
define type Tcl_FreeProc
This commit is contained in:
parent
81f5ed5415
commit
03332c1146
@ -13,7 +13,7 @@ void Ng_Redraw (bool blocking) { if(Ptr_Ng_Redraw) Ptr_Ng_Redraw(blocking); }
|
||||
|
||||
namespace netgen
|
||||
{
|
||||
void (*Ptr_Ng_Tcl_SetResult)(Tcl_Interp *interp, char *result, const int freeProc) = nullptr;
|
||||
void (*Ptr_Ng_Tcl_SetResult)(Tcl_Interp *interp, char *result, Tcl_FreeProc *freeProc) = nullptr;
|
||||
void (*Ptr_Ng_Tcl_CreateCommand)(Tcl_Interp *interp,
|
||||
const char *cmdName, Tcl_CmdProc *proc) = nullptr;
|
||||
void (*Ptr_Render)(bool) = nullptr;
|
||||
|
@ -18,6 +18,8 @@ DLL_HEADER extern void (*Ptr_Ng_Redraw) (bool blocking);
|
||||
class Tcl_Interp;
|
||||
typedef int (Tcl_CmdProc) (void * clientData, Tcl_Interp *interp,
|
||||
int argc, const char *argv[]);
|
||||
typedef void (Tcl_FreeProc) (char *blockPtr);
|
||||
|
||||
namespace netgen {
|
||||
|
||||
inline constexpr int NG_TCL_VOLATILE = 1;
|
||||
@ -29,7 +31,7 @@ namespace netgen {
|
||||
inline constexpr int NG_TCL_RETURN = 2;
|
||||
inline constexpr int NG_TCL_BREAK = 3;
|
||||
inline constexpr int NG_TCL_CONTINUE = 4;
|
||||
DLL_HEADER extern void (*Ptr_Ng_Tcl_SetResult)(Tcl_Interp *interp, char *result, const int freeProc);
|
||||
DLL_HEADER extern void (*Ptr_Ng_Tcl_SetResult)(Tcl_Interp *interp, char *result, Tcl_FreeProc *freeProc);
|
||||
DLL_HEADER extern void (*Ptr_Ng_Tcl_CreateCommand)(Tcl_Interp *interp,
|
||||
const char *cmdName, Tcl_CmdProc *proc);
|
||||
|
||||
@ -49,7 +51,7 @@ namespace netgen {
|
||||
if(Ptr_UpdateVisSurfaceMeshData) Ptr_UpdateVisSurfaceMeshData(oldnl, locpointsptr, loclinesptr, plainpointsptr);
|
||||
}
|
||||
|
||||
inline void Ng_Tcl_SetResult(Tcl_Interp *interp, char *result, const int freeProc)
|
||||
inline void Ng_Tcl_SetResult(Tcl_Interp *interp, char *result, Tcl_FreeProc *freeProc)
|
||||
{
|
||||
if(Ptr_Ng_Tcl_SetResult)
|
||||
Ptr_Ng_Tcl_SetResult(interp, result, freeProc);
|
||||
|
@ -2,9 +2,9 @@
|
||||
#include "../libsrc/meshing/visual_interface.hpp"
|
||||
|
||||
|
||||
static void Impl_Ng_Tcl_SetResult(Tcl_Interp *interp, char *result, const int freeProc)
|
||||
static void Impl_Ng_Tcl_SetResult(Tcl_Interp *interp, char *result, Tcl_FreeProc *freeProc)
|
||||
{
|
||||
Tcl_SetResult(interp, result, (Tcl_FreeProc*)freeProc);
|
||||
Tcl_SetResult(interp, result, freeProc);
|
||||
}
|
||||
|
||||
static void Impl_Ng_Tcl_CreateCommand(Tcl_Interp *interp, const char *cmdName, Tcl_CmdProc *proc)
|
||||
|
Loading…
Reference in New Issue
Block a user