Skip to content

Commit

Permalink
java/ddlogapi.c: better document ddlog_log_replace_callback
Browse files Browse the repository at this point in the history
  • Loading branch information
ryzhyk committed Jul 8, 2019
1 parent bce8ab7 commit d5d1694
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions java/ddlogapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ static struct CallbackInfo* createCallback(JNIEnv* env, jobject obj, jstring met
return cbinfo;
}



static void deleteCallback(struct CallbackInfo* cbinfo) {
if (cbinfo == NULL)
return;
Expand Down Expand Up @@ -282,6 +280,9 @@ void log_callback(uintptr_t callbackInfo, int level, const char *msg) {

/* This function sets up a new logging callback for the given module and
* then deallocates the old `CallbackInfo`, if any.
*
* Returns 0 if either `callback` is NULL or `callback` is not NULL and
* installing the new callback fails.
*/
JNIEXPORT jlong JNICALL Java_ddlogapi_DDlogAPI_ddlog_1log_1replace_1callback(
JNIEnv *env, jobject obj, jint module, jlong old_cbinfo, jobject callback, jint max_level) {
Expand Down

0 comments on commit d5d1694

Please sign in to comment.