diff src/clojure/clojure.cpp @ 76:d7c38ce83421

working on disk-backup for save-states
author Robert McIntyre <rlm@mit.edu>
date Thu, 08 Mar 2012 19:48:54 -0600
parents 4699c7bab77d
children 95cb2152d7cd
line wrap: on
line diff
     1.1 --- a/src/clojure/clojure.cpp	Thu Mar 08 06:01:09 2012 -0600
     1.2 +++ b/src/clojure/clojure.cpp	Thu Mar 08 19:48:54 2012 -0600
     1.3 @@ -79,13 +79,14 @@
     1.4  /*
     1.5   * Class:     com_aurellem_gb_Gb
     1.6   * Method:    saveState
     1.7 - * Signature: (Ljava/nio/ByteBuffer;)V
     1.8 + * Signature: (Ljava/nio/ByteBuffer;I)J
     1.9   */
    1.10 -JNIEXPORT void JNICALL Java_com_aurellem_gb_Gb_saveState
    1.11 +JNIEXPORT jlong JNICALL Java_com_aurellem_gb_Gb_saveState
    1.12  (JNIEnv *env, jclass clazz, jobject buffer, jint size){
    1.13    char* buffer_address = 
    1.14      ((char*) env->GetDirectBufferAddress(buffer));
    1.15 -  gbWriteMemSaveState(buffer_address, size);
    1.16 +  long limit = gbWriteMemSaveStatePos(buffer_address, size);
    1.17 +  return limit;
    1.18  }
    1.19  
    1.20  /*