+
+
+ // Prebuild each API jtype to boost API json response
+ for (jdx = 0; plugins[idx]->apis[jdx].name != NULL; jdx++) {
+ AFB_privateApi *private = malloc (sizeof (AFB_privateApi));
+ if (plugins[idx]->apis[jdx].private != NULL) {
+ fprintf (stderr, "WARNING: plugin=%s api=%s private handle should be NULL\n"
+ ,plugins[idx]->prefix,plugins[idx]->apis[jdx].name);
+ }
+ private->len = strlen (plugins[idx]->apis[jdx].name);
+ private->jtype=json_object_new_string(plugins[idx]->apis[jdx].name);
+ json_object_get(private->jtype); // increase reference count to make it permanent
+ plugins[idx]->apis[jdx].private = private;
+ }