From 9e64d4521dbf5247580929eb0a00c9f83cd311f8 Mon Sep 17 00:00:00 2001 From: Steve Bennett Date: Tue, 28 Sep 2010 07:47:28 +1000 Subject: Ensure that Tcl extensions can be built-in or external All C extensions must call Jim_PackageProvide() make-c-ext ensures that Tcl extensions call Jim_PackageProvide() if compiled in. Signed-off-by: Steve Bennett --- jim-syslog.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'jim-syslog.c') diff --git a/jim-syslog.c b/jim-syslog.c index 21c9eed..a128e63 100644 --- a/jim-syslog.c +++ b/jim-syslog.c @@ -170,7 +170,12 @@ int Jim_SyslogCmd(Jim_Interp *interp, int argc, Jim_Obj *const *argv) int Jim_syslogInit(Jim_Interp *interp) { - SyslogInfo *info = Jim_Alloc(sizeof(*info)); + SyslogInfo *info; + + if (Jim_PackageProvide(interp, "syslog", "1.0", JIM_ERRMSG)) + return JIM_ERR; + + info = Jim_Alloc(sizeof(*info)); info->logOpened = 0; info->options = 0; -- cgit v1.1