return 0;
if (NULL == aTHX) {
- c_ithread_t *t = NULL;
+ t = NULL;
pthread_mutex_lock (&perl_threads->mutex);
t = c_ithread_create (perl_threads->head->interp);
/* bootstrap the Collectd module */
static void xs_init (pTHX)
{
- HV *stash = NULL;
- SV *tmp = NULL;
- char *file = __FILE__;
+ HV *stash = NULL;
+ SV *tmp = NULL;
+ const char *file = __FILE__;
int i = 0;
int current_status = 0;
if (NULL != perl_threads)
- aTHX = PERL_GET_CONTEXT;
+ {
+ if ((aTHX = PERL_GET_CONTEXT) == NULL)
+ return -1;
+ }
if (0 == strcasecmp (c->key, "LoadPlugin"))
current_status = perl_config_loadplugin (aTHX_ c);