From: Antonio Borneo Date: Sat, 19 Jun 2010 15:34:05 +0000 (+0800) Subject: helper/jim-eventloop: review scope of symbols X-Git-Tag: v0.5.0-rc1~569 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=ec073e89435785375dece2fb7c4664002c22859c;p=openocd helper/jim-eventloop: review scope of symbols Add "static" qualifier to private functions. Remove private prototypes from include file. Remove empty definition of JIM_STATIC. Signed-off-by: Antonio Borneo --- diff --git a/src/helper/jim-eventloop.c b/src/helper/jim-eventloop.c index fae46e89..23115fe6 100644 --- a/src/helper/jim-eventloop.c +++ b/src/helper/jim-eventloop.c @@ -90,7 +90,7 @@ typedef struct Jim_EventLoop { Jim_TimeEvent *timeEventHead; } Jim_EventLoop; -void Jim_CreateFileHandler(Jim_Interp *interp, void *handle, int mask, +static void Jim_CreateFileHandler(Jim_Interp *interp, void *handle, int mask, Jim_FileProc *proc, void *clientData, Jim_EventFinalizerProc *finalizerProc) { @@ -109,7 +109,7 @@ void Jim_CreateFileHandler(Jim_Interp *interp, void *handle, int mask, // fprintf(stderr,"raus\n"); } -void Jim_DeleteFileHandler(Jim_Interp *interp, void *handle) +static void Jim_DeleteFileHandler(Jim_Interp *interp, void *handle) { Jim_FileEvent *fe, *prev = NULL; Jim_EventLoop *eventLoop = Jim_GetAssocData(interp, "eventloop"); @@ -152,7 +152,7 @@ static void JimGetTime(long *seconds, long *milliseconds) *milliseconds = tv.tv_usec/1000; } -jim_wide Jim_CreateTimeHandler(Jim_Interp *interp, jim_wide milliseconds, +static jim_wide Jim_CreateTimeHandler(Jim_Interp *interp, jim_wide milliseconds, Jim_TimeProc *proc, void *clientData, Jim_EventFinalizerProc *finalizerProc) { @@ -181,7 +181,7 @@ jim_wide Jim_CreateTimeHandler(Jim_Interp *interp, jim_wide milliseconds, return id; } -jim_wide Jim_DeleteTimeHandler(Jim_Interp *interp, jim_wide id) +static jim_wide Jim_DeleteTimeHandler(Jim_Interp *interp, jim_wide id) { Jim_TimeEvent *te, *prev = NULL; Jim_EventLoop *eventLoop = Jim_GetAssocData(interp, "eventloop"); @@ -391,7 +391,7 @@ int Jim_ProcessEvents(Jim_Interp *interp, int flags) } /* ---------------------------------------------------------------------- */ -void JimELAssocDataDeleProc(Jim_Interp *interp, void *data) +static void JimELAssocDataDeleProc(Jim_Interp *interp, void *data) { void *next; Jim_FileEvent *fe; @@ -446,14 +446,14 @@ static int JimELVwaitCommand(Jim_Interp *interp, int argc, return JIM_OK; } -void JimAfterTimeHandler(Jim_Interp *interp, void *clientData) +static void JimAfterTimeHandler(Jim_Interp *interp, void *clientData) { Jim_Obj *objPtr = clientData; Jim_EvalObjBackground(interp, objPtr); } -void JimAfterTimeEventFinalizer(Jim_Interp *interp, void *clientData) +static void JimAfterTimeEventFinalizer(Jim_Interp *interp, void *clientData) { Jim_Obj *objPtr = clientData; diff --git a/src/helper/jim-eventloop.h b/src/helper/jim-eventloop.h index ddb6fc98..77ee8fec 100644 --- a/src/helper/jim-eventloop.h +++ b/src/helper/jim-eventloop.h @@ -64,9 +64,8 @@ typedef void Jim_EventFinalizerProc(Jim_Interp *interp, void *clientData); #define JIM_EVENT_FEOF 8 #define JIM_API(x) x -#define JIM_STATIC -JIM_STATIC int Jim_EventLoopOnLoad(Jim_Interp *interp); +int Jim_EventLoopOnLoad(Jim_Interp *interp); /* --- POSIX version of Jim_ProcessEvents, for now the only available --- */ #define JIM_FILE_EVENTS 1 @@ -74,20 +73,8 @@ JIM_STATIC int Jim_EventLoopOnLoad(Jim_Interp *interp); #define JIM_ALL_EVENTS (JIM_FILE_EVENTS | JIM_TIME_EVENTS) #define JIM_DONT_WAIT 4 -JIM_STATIC void JIM_API(Jim_CreateFileHandler) (Jim_Interp *interp, - void *handle, int mask, - Jim_FileProc *proc, void *clientData, - Jim_EventFinalizerProc *finalizerProc); -JIM_STATIC void JIM_API(Jim_DeleteFileHandler) (Jim_Interp *interp, - void *handle); -JIM_STATIC jim_wide JIM_API(Jim_CreateTimeHandler) (Jim_Interp *interp, - jim_wide milliseconds, - Jim_TimeProc *proc, void *clientData, - Jim_EventFinalizerProc *finalizerProc); -JIM_STATIC jim_wide JIM_API(Jim_DeleteTimeHandler) (Jim_Interp *interp, jim_wide id); -JIM_STATIC int JIM_API(Jim_ProcessEvents) (Jim_Interp *interp, int flags); +int JIM_API(Jim_ProcessEvents) (Jim_Interp *interp, int flags); -#undef JIM_STATIC #undef JIM_API #ifndef __JIM_EVENTLOOP_CORE__