From 395e57b030a2161bf4c7f919338c986b3746eff7 Mon Sep 17 00:00:00 2001 From: pavet Date: Fri, 17 Sep 2004 14:57:05 +0000 Subject: meilleure explicitation de la demarche d'installation et de la dépendance tkinter. --- docs/dev/how2build.html | 36 +++++++++++++------ docs/dev/maintainer_notes.txt | 82 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+), 11 deletions(-) (limited to 'docs') diff --git a/docs/dev/how2build.html b/docs/dev/how2build.html index 738bf8e..bdca950 100644 --- a/docs/dev/how2build.html +++ b/docs/dev/how2build.html @@ -4,26 +4,40 @@ -

Ivycpy - buiding instructions

-

First of all ivycpy is building process is managed by autoconf.

+

Ivycpy - buiding instructions

+ +

First of all ivycpy building process is managed by +autoconf. The configure script file shoule help you +to build a GNUmakefile with the suitable environment or hlep you +detect the flaws in your environment.

+

You should have to do the following actions:


-Last modified: Mon May 24 16:43:51 CEST 2004 +Last modified: Fri Sep 17 16:49:43 CEST 2004 diff --git a/docs/dev/maintainer_notes.txt b/docs/dev/maintainer_notes.txt index 54a6147..8a59ccb 100644 --- a/docs/dev/maintainer_notes.txt +++ b/docs/dev/maintainer_notes.txt @@ -1,3 +1,85 @@ +L'adaptation a faire sur tkinter est la suivante : + +Il faut rendre partageable les macros ENTER_TCL, LEAVE_TCL, +ENTER_OVERLAP, LEAVE_OVERLAP_TCL, ENTER_PYTHON, LEAVE_PYTHON + +ces definistions se trouvent dans le corps du module _tkinter.c dans +la version standard ; il faut les exporter (dans le header) et definir +les variables associes comme extern; + +le _tkinter.h doit ressembler à ceci : + +<< +#ifndef _TKINTER_H +#define _TKINTER_H + +#ifdef WITH_THREAD + +#include "pythread.h" + +/* also included in body _tkinter.c but necessary for client using this header + dp 062004 */ +#ifndef TCL_THREADS +#define TCL_THREADS +#endif + +extern PyThread_type_lock tcl_lock ; + +#ifdef TCL_THREADS +extern Tcl_ThreadDataKey state_key; +typedef PyThreadState *ThreadSpecificData; +#define tcl_tstate (*(PyThreadState**)Tcl_GetThreadData(&state_key, sizeof(PyThreadState*))) +#else +extern PyThreadState *tcl_tstate; +#endif /* TCL_THREADS */ + +#define ENTER_TCL \ + { PyThreadState *tstate = PyThreadState_Get(); Py_BEGIN_ALLOW_THREADS \ + if(tcl_lock)PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; + +#define LEAVE_TCL \ + tcl_tstate = NULL; if(tcl_lock)PyThread_release_lock(tcl_lock); Py_END_ALLOW_THREADS} + +#define ENTER_OVERLAP \ + Py_END_ALLOW_THREADS + +#define LEAVE_OVERLAP_TCL \ + tcl_tstate = NULL; if(tcl_lock)PyThread_release_lock(tcl_lock); } + +#define ENTER_PYTHON \ + { PyThreadState *tstate = tcl_tstate; tcl_tstate = NULL; \ + if(tcl_lock)PyThread_release_lock(tcl_lock); PyEval_RestoreThread((tstate)); } + +#define LEAVE_PYTHON \ + { PyThreadState *tstate = PyEval_SaveThread(); \ + if(tcl_lock)PyThread_acquire_lock(tcl_lock, 1); tcl_tstate = tstate; } + +#define CHECK_TCL_APPARTMENT \ + if (((TkappObject *)self)->threaded && \ + ((TkappObject *)self)->thread_id != Tcl_GetCurrentThread()) { \ + PyErr_SetString(PyExc_RuntimeError, "Calling Tcl from different appartment"); \ + return 0; \ + } + + +#else + +#define ENTER_TCL +#define LEAVE_TCL +#define ENTER_OVERLAP +#define LEAVE_OVERLAP_TCL +#define ENTER_PYTHON +#define LEAVE_PYTHON +#define CHECK_TCL_APPARTMENT + +#endif /* WITH_THREAD */ + +#endif /* !_TKINTER_H */ + +>> + + + Echanges avec Martin Loewis concerant les évolutions de Python et Tkinter liés au wrapper python <-> ivy -- cgit v1.1