diff --git a/runtime/debug.c b/runtime/debug.c index 7ae3a74f2..d311ef2b8 100644 --- a/runtime/debug.c +++ b/runtime/debug.c @@ -962,7 +962,7 @@ dbgoprint(obj_t *pObj, char *fmt, ...) * WARNING: duplicate code, see dbgoprin above! */ void -dbgprintf(char *fmt, ...) +dbgprintf(const char *fmt, ...) { va_list ap; char pszWriteBuf[32*1024]; diff --git a/runtime/obj-types.h b/runtime/obj-types.h index 61e9782f8..ae105f31e 100644 --- a/runtime/obj-types.h +++ b/runtime/obj-types.h @@ -232,7 +232,7 @@ rsRetVal objName##ClassExit(void) \ * rgerhards, 2008-01-10 */ #define BEGINobjConstruct(obj) \ - rsRetVal obj##Initialize(obj##_t __attribute__((unused)) *pThis) \ + static rsRetVal obj##Initialize(obj##_t __attribute__((unused)) *pThis) \ { \ DEFiRet; @@ -240,6 +240,7 @@ rsRetVal objName##ClassExit(void) \ /* use finalize_it: before calling the macro (if you need it)! */ \ RETiRet; \ } \ + rsRetVal obj##Construct(obj##_t **ppThis); \ rsRetVal obj##Construct(obj##_t **ppThis) \ { \ DEFiRet; \ @@ -278,6 +279,8 @@ rsRetVal objName##ClassExit(void) \ * processing. * rgerhards, 2008-01-30 */ +#define PROTOTYPEobjDestruct(OBJ) \ + rsRetVal OBJ##Destruct(OBJ##_t __attribute__((unused)) **ppThis) #define BEGINobjDestruct(OBJ) \ rsRetVal OBJ##Destruct(OBJ##_t __attribute__((unused)) **ppThis) \ { \ diff --git a/runtime/rsconf.c b/runtime/rsconf.c index da15964bf..a24c75e5f 100644 --- a/runtime/rsconf.c +++ b/runtime/rsconf.c @@ -177,7 +177,8 @@ ENDobjConstruct(rsconf) /* ConstructionFinalizer */ -rsRetVal rsconfConstructFinalize(rsconf_t __attribute__((unused)) *pThis) +static rsRetVal +rsconfConstructFinalize(rsconf_t __attribute__((unused)) *pThis) { DEFiRet; ISOBJ_TYPE_assert(pThis, rsconf); @@ -206,6 +207,7 @@ freeCnf(rsconf_t *pThis) /* destructor for the rsconf object */ +PROTOTYPEobjDestruct(rsconf); BEGINobjDestruct(rsconf) /* be sure to specify the object type also in END and CODESTART macros! */ CODESTARTobjDestruct(rsconf) freeCnf(pThis); @@ -219,6 +221,7 @@ ENDobjDestruct(rsconf) /* DebugPrint support for the rsconf object */ +PROTOTYPEObjDebugPrint(rsconf); BEGINobjDebugPrint(rsconf) /* be sure to specify the object type also in END and CODESTART macros! */ cfgmodules_etry_t *modNode; @@ -1363,8 +1366,6 @@ CODESTARTobjQueryInterface(rsconf) * work here (if we can support an older interface version - that, * of course, also affects the "if" above). */ - pIf->Construct = rsconfConstruct; - pIf->ConstructFinalize = rsconfConstructFinalize; pIf->Destruct = rsconfDestruct; pIf->DebugPrint = rsconfDebugPrint; pIf->Load = load; diff --git a/runtime/rsconf.h b/runtime/rsconf.h index ea5213759..61c75ecde 100644 --- a/runtime/rsconf.h +++ b/runtime/rsconf.h @@ -163,8 +163,6 @@ struct rsconf_s { /* interfaces */ BEGINinterface(rsconf) /* name must also be changed in ENDinterface macro! */ INTERFACEObjDebugPrint(rsconf); - rsRetVal (*Construct)(rsconf_t **ppThis); - rsRetVal (*ConstructFinalize)(rsconf_t __attribute__((unused)) *pThis); rsRetVal (*Destruct)(rsconf_t **ppThis); rsRetVal (*Load)(rsconf_t **ppThis, uchar *confFile); rsRetVal (*Activate)(rsconf_t *ppThis);