Mercurial > vba-clojure
comparison 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 |
comparison
equal
deleted
inserted
replaced
75:eb7d4efe0f34 | 76:d7c38ce83421 |
---|---|
77 } | 77 } |
78 | 78 |
79 /* | 79 /* |
80 * Class: com_aurellem_gb_Gb | 80 * Class: com_aurellem_gb_Gb |
81 * Method: saveState | 81 * Method: saveState |
82 * Signature: (Ljava/nio/ByteBuffer;)V | 82 * Signature: (Ljava/nio/ByteBuffer;I)J |
83 */ | 83 */ |
84 JNIEXPORT void JNICALL Java_com_aurellem_gb_Gb_saveState | 84 JNIEXPORT jlong JNICALL Java_com_aurellem_gb_Gb_saveState |
85 (JNIEnv *env, jclass clazz, jobject buffer, jint size){ | 85 (JNIEnv *env, jclass clazz, jobject buffer, jint size){ |
86 char* buffer_address = | 86 char* buffer_address = |
87 ((char*) env->GetDirectBufferAddress(buffer)); | 87 ((char*) env->GetDirectBufferAddress(buffer)); |
88 gbWriteMemSaveState(buffer_address, size); | 88 long limit = gbWriteMemSaveStatePos(buffer_address, size); |
89 return limit; | |
89 } | 90 } |
90 | 91 |
91 /* | 92 /* |
92 * Class: com_aurellem_gb_Gb | 93 * Class: com_aurellem_gb_Gb |
93 * Method: loadState | 94 * Method: loadState |