File: java_DbLsn.cpp

package info (click to toggle)
htdig 3.1.6-3woody1
  • links: PTS
  • area: main
  • in suites: woody
  • size: 11,324 kB
  • ctags: 10,056
  • sloc: ansic: 39,949; cpp: 21,701; tcl: 8,401; sh: 3,227; perl: 2,280; makefile: 1,650; java: 1,632; awk: 111; xml: 80; asm: 41
file content (38 lines) | stat: -rw-r--r-- 907 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
/*-
 * See the file LICENSE for redistribution information.
 *
 * Copyright (c) 1997, 1998
 *	Sleepycat Software.  All rights reserved.
 */
#include "config.h"

#ifndef lint
static const char sccsid[] = "@(#)java_DbLsn.cpp	10.3 (Sleepycat) 5/2/98";
#endif /* not lint */

#include <jni.h>
#include <errno.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>              // needed for FILENAME_MAX

#include "db.h"
#include "java_util.h"
#include "com_sleepycat_db_DbLsn.h"

JNIEXPORT void JNICALL Java_com_sleepycat_db_DbLsn_init_1lsn
  (JNIEnv *jnienv, /*DbLsn*/ jobject jthis)
{
    DB_LSN *lsn = NEW(DB_LSN);
    memset(lsn, 0, sizeof(DB_LSN));
    set_private_info(jnienv, name_DB_LSN, jthis, lsn);
}

JNIEXPORT void JNICALL Java_com_sleepycat_db_DbLsn_finalize
  (JNIEnv *jnienv, jobject jthis)
{
    DB_LSN *dblsn = get_DB_LSN(jnienv, jthis);
    if (dblsn) {
        DELETE(dblsn);
    }
}