/*
* Global variables
*/
-static JavaVM *jvm = NULL;
+static JavaVM *jvm;
static pthread_key_t jvm_env_key;
/* Configuration options for the JVM. */
-static char **jvm_argv = NULL;
-static size_t jvm_argc = 0;
+static char **jvm_argv;
+static size_t jvm_argc;
/* List of class names to load */
-static java_plugin_class_t *java_classes_list = NULL;
+static java_plugin_class_t *java_classes_list;
static size_t java_classes_list_len;
/* List of config, init, and shutdown callbacks. */
-static cjni_callback_info_t *java_callbacks = NULL;
-static size_t java_callbacks_num = 0;
+static cjni_callback_info_t *java_callbacks;
+static size_t java_callbacks_num;
static pthread_mutex_t java_callbacks_lock = PTHREAD_MUTEX_INITIALIZER;
-static oconfig_item_t *config_block = NULL;
+static oconfig_item_t *config_block;
/*
* Prototypes
return 0;
} /* }}} int jtoc_notification */
- /*
- * Functions accessible from Java
- */
+/*
+ * Functions accessible from Java
+ */
static jint JNICALL cjni_api_dispatch_values(JNIEnv *jvm_env, /* {{{ */
jobject this, jobject java_vl) {
value_list_t vl = VALUE_LIST_INIT;
vm_args.nOptions = (jint)jvm_argc;
for (size_t i = 0; i < jvm_argc; i++) {
- DEBUG("java plugin: cjni_create_jvm: jvm_argv[%zu] = %s", i, jvm_argv[i]);
+ DEBUG("java plugin: cjni_create_jvm: jvm_argv[%" PRIsz "] = %s", i,
+ jvm_argv[i]);
vm_args.options[i].optionString = jvm_argv[i];
}
}
}
- DEBUG("java plugin: jvm_argc = %zu;", jvm_argc);
- DEBUG("java plugin: java_classes_list_len = %zu;", java_classes_list_len);
+ DEBUG("java plugin: jvm_argc = %" PRIsz ";", jvm_argc);
+ DEBUG("java plugin: java_classes_list_len = %" PRIsz ";",
+ java_classes_list_len);
if ((success == 0) && (errors > 0)) {
ERROR("java plugin: All statements failed.");