Skip to content

Commit d5d1694

Browse files
committed
java/ddlogapi.c: better document ddlog_log_replace_callback
1 parent bce8ab7 commit d5d1694

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

java/ddlogapi.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ static struct CallbackInfo* createCallback(JNIEnv* env, jobject obj, jstring met
7575
return cbinfo;
7676
}
7777

78-
79-
8078
static void deleteCallback(struct CallbackInfo* cbinfo) {
8179
if (cbinfo == NULL)
8280
return;
@@ -282,6 +280,9 @@ void log_callback(uintptr_t callbackInfo, int level, const char *msg) {
282280

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

0 commit comments

Comments
 (0)