text: /* !---- DO NOT EDIT: This file autogenerated by com/jogamp/gluegen/JavaEmitter.java on Wed Jul 01 10:37:37 CEST 2015 ----! */
  
  #include <jni.h>
  #include <stdlib.h>
  
  #include <assert.h>
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: int sqlc_db_close(long db)
   *     C function: int sqlc_db_close(sqlc_handle_t db);
   */
  JNIEXPORT jint JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1db_1close__J(JNIEnv *env, jclass _unused, jlong db) {
    int _res;
    _res = sqlc_db_close((sqlc_handle_t) db);
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: int sqlc_db_key_native_string(long db, java.lang.String key_string)
   *     C function: int sqlc_db_key_native_string(sqlc_handle_t db, char *  key_string);
   */
  JNIEXPORT jint JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1db_1key_1native_1string__JLjava_lang_String_2(JNIEnv *env, jclass _unused, jlong db, jstring key_string) {
    const char* _strchars_key_string = NULL;
    int _res;
    if ( NULL != key_string ) {
      _strchars_key_string = (*env)->GetStringUTFChars(env, key_string, (jboolean*)NULL);
    if ( NULL == _strchars_key_string ) {
        (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/OutOfMemoryError"),
                         "Failed to get UTF-8 chars for argument \"key_string\" in native dispatcher for \"sqlc_db_key_native_string\"");
        return 0;
      }
    }
    _res = sqlc_db_key_native_string((sqlc_handle_t) db, (char *) _strchars_key_string);
    if ( NULL != key_string ) {
      (*env)->ReleaseStringUTFChars(env, key_string, _strchars_key_string);
    }
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: long sqlc_db_last_insert_rowid(long db)
   *     C function: sqlc_long_t sqlc_db_last_insert_rowid(sqlc_handle_t db);
   */
  JNIEXPORT jlong JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1db_1last_1insert_1rowid__J(JNIEnv *env, jclass _unused, jlong db) {
    sqlc_long_t _res;
    _res = sqlc_db_last_insert_rowid((sqlc_handle_t) db);
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: long sqlc_db_open(java.lang.String filename, int flags)
   *     C function: sqlc_handle_t sqlc_db_open(const char *  filename, int flags);
   */
  JNIEXPORT jlong JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1db_1open__Ljava_lang_String_2I(JNIEnv *env, jclass _unused, jstring filename, jint flags) {
    const char* _strchars_filename = NULL;
    sqlc_handle_t _res;
    if ( NULL != filename ) {
      _strchars_filename = (*env)->GetStringUTFChars(env, filename, (jboolean*)NULL);
    if ( NULL == _strchars_filename ) {
        (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/OutOfMemoryError"),
                         "Failed to get UTF-8 chars for argument \"filename\" in native dispatcher for \"sqlc_db_open\"");
        return 0;
      }
    }
    _res = sqlc_db_open((char *) _strchars_filename, (int) flags);
    if ( NULL != filename ) {
      (*env)->ReleaseStringUTFChars(env, filename, _strchars_filename);
    }
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: long sqlc_db_prepare_st(long db, java.lang.String sql)
   *     C function: sqlc_handle_t sqlc_db_prepare_st(sqlc_handle_t db, const char *  sql);
   */
  JNIEXPORT jlong JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1db_1prepare_1st__JLjava_lang_String_2(JNIEnv *env, jclass _unused, jlong db, jstring sql) {
    const char* _strchars_sql = NULL;
    sqlc_handle_t _res;
    if ( NULL != sql ) {
      _strchars_sql = (*env)->GetStringUTFChars(env, sql, (jboolean*)NULL);
    if ( NULL == _strchars_sql ) {
        (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/OutOfMemoryError"),
                         "Failed to get UTF-8 chars for argument \"sql\" in native dispatcher for \"sqlc_db_prepare_st\"");
        return 0;
      }
    }
    _res = sqlc_db_prepare_st((sqlc_handle_t) db, (char *) _strchars_sql);
    if ( NULL != sql ) {
      (*env)->ReleaseStringUTFChars(env, sql, _strchars_sql);
    }
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: int sqlc_db_total_changes(long db)
   *     C function: int sqlc_db_total_changes(sqlc_handle_t db);
   */
  JNIEXPORT jint JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1db_1total_1changes__J(JNIEnv *env, jclass _unused, jlong db) {
    int _res;
    _res = sqlc_db_total_changes((sqlc_handle_t) db);
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: int sqlc_st_bind_double(long st, int pos, double val)
   *     C function: int sqlc_st_bind_double(sqlc_handle_t st, int pos, double val);
   */
  JNIEXPORT jint JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1st_1bind_1double__JID(JNIEnv *env, jclass _unused, jlong st, jint pos, jdouble val) {
    int _res;
    _res = sqlc_st_bind_double((sqlc_handle_t) st, (int) pos, (double) val);
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: int sqlc_st_bind_int(long st, int pos, int val)
   *     C function: int sqlc_st_bind_int(sqlc_handle_t st, int pos, int val);
   */
  JNIEXPORT jint JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1st_1bind_1int__JII(JNIEnv *env, jclass _unused, jlong st, jint pos, jint val) {
    int _res;
    _res = sqlc_st_bind_int((sqlc_handle_t) st, (int) pos, (int) val);
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: int sqlc_st_bind_long(long st, int pos, long val)
   *     C function: int sqlc_st_bind_long(sqlc_handle_t st, int pos, sqlc_long_t val);
   */
  JNIEXPORT jint JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1st_1bind_1long__JIJ(JNIEnv *env, jclass _unused, jlong st, jint pos, jlong val) {
    int _res;
    _res = sqlc_st_bind_long((sqlc_handle_t) st, (int) pos, (sqlc_long_t) val);
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: int sqlc_st_bind_null(long st, int pos)
   *     C function: int sqlc_st_bind_null(sqlc_handle_t st, int pos);
   */
  JNIEXPORT jint JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1st_1bind_1null__JI(JNIEnv *env, jclass _unused, jlong st, jint pos) {
    int _res;
    _res = sqlc_st_bind_null((sqlc_handle_t) st, (int) pos);
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: int sqlc_st_bind_text_native(long st, int col, java.lang.String val)
   *     C function: int sqlc_st_bind_text_native(sqlc_handle_t st, int col, const char *  val);
   */
  JNIEXPORT jint JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1st_1bind_1text_1native__JILjava_lang_String_2(JNIEnv *env, jclass _unused, jlong st, jint col, jstring val) {
    const char* _strchars_val = NULL;
    int _res;
    if ( NULL != val ) {
      _strchars_val = (*env)->GetStringUTFChars(env, val, (jboolean*)NULL);
    if ( NULL == _strchars_val ) {
        (*env)->ThrowNew(env, (*env)->FindClass(env, "java/lang/OutOfMemoryError"),
                         "Failed to get UTF-8 chars for argument \"val\" in native dispatcher for \"sqlc_st_bind_text_native\"");
        return 0;
      }
    }
    _res = sqlc_st_bind_text_native((sqlc_handle_t) st, (int) col, (char *) _strchars_val);
    if ( NULL != val ) {
      (*env)->ReleaseStringUTFChars(env, val, _strchars_val);
    }
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: int sqlc_st_column_count(long st)
   *     C function: int sqlc_st_column_count(sqlc_handle_t st);
   */
  JNIEXPORT jint JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1st_1column_1count__J(JNIEnv *env, jclass _unused, jlong st) {
    int _res;
    _res = sqlc_st_column_count((sqlc_handle_t) st);
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: double sqlc_st_column_double(long st, int col)
   *     C function: double sqlc_st_column_double(sqlc_handle_t st, int col);
   */
  JNIEXPORT jdouble JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1st_1column_1double__JI(JNIEnv *env, jclass _unused, jlong st, jint col) {
    double _res;
    _res = sqlc_st_column_double((sqlc_handle_t) st, (int) col);
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: int sqlc_st_column_int(long st, int col)
   *     C function: int sqlc_st_column_int(sqlc_handle_t st, int col);
   */
  JNIEXPORT jint JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1st_1column_1int__JI(JNIEnv *env, jclass _unused, jlong st, jint col) {
    int _res;
    _res = sqlc_st_column_int((sqlc_handle_t) st, (int) col);
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: long sqlc_st_column_long(long st, int col)
   *     C function: sqlc_long_t sqlc_st_column_long(sqlc_handle_t st, int col);
   */
  JNIEXPORT jlong JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1st_1column_1long__JI(JNIEnv *env, jclass _unused, jlong st, jint col) {
    sqlc_long_t _res;
    _res = sqlc_st_column_long((sqlc_handle_t) st, (int) col);
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: java.lang.String sqlc_st_column_name(long st, int col)
   *     C function: const char *  sqlc_st_column_name(sqlc_handle_t st, int col);
   */
  JNIEXPORT jstring JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1st_1column_1name__JI(JNIEnv *env, jclass _unused, jlong st, jint col) {
    const char *  _res;
    _res = sqlc_st_column_name((sqlc_handle_t) st, (int) col);
    if (NULL == _res) return NULL;
    return (*env)->NewStringUTF(env, _res);
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: java.lang.String sqlc_st_column_text_native(long st, int col)
   *     C function: const char *  sqlc_st_column_text_native(sqlc_handle_t st, int col);
   */
  JNIEXPORT jstring JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1st_1column_1text_1native__JI(JNIEnv *env, jclass _unused, jlong st, jint col) {
    const char *  _res;
    _res = sqlc_st_column_text_native((sqlc_handle_t) st, (int) col);
    if (NULL == _res) return NULL;
    return (*env)->NewStringUTF(env, _res);
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: int sqlc_st_column_type(long st, int col)
   *     C function: int sqlc_st_column_type(sqlc_handle_t st, int col);
   */
  JNIEXPORT jint JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1st_1column_1type__JI(JNIEnv *env, jclass _unused, jlong st, jint col) {
    int _res;
    _res = sqlc_st_column_type((sqlc_handle_t) st, (int) col);
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: int sqlc_st_finish(long st)
   *     C function: int sqlc_st_finish(sqlc_handle_t st);
   */
  JNIEXPORT jint JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1st_1finish__J(JNIEnv *env, jclass _unused, jlong st) {
    int _res;
    _res = sqlc_st_finish((sqlc_handle_t) st);
    return _res;
  }
  
  
  /*   Java->C glue code:
   *   Java package: io.liteglue.SQLiteNative
   *    Java method: int sqlc_st_step(long st)
   *     C function: int sqlc_st_step(sqlc_handle_t st);
   */
  JNIEXPORT jint JNICALL 
  Java_io_liteglue_SQLiteNative_sqlc_1st_1step__J(JNIEnv *env, jclass _unused, jlong st) {
    int _res;
    _res = sqlc_st_step((sqlc_handle_t) st);
    return _res;
  }
  
  
  