bugfix in the java binding

This commit is contained in:
kr.angelov
2013-08-27 22:53:38 +00:00
parent c9c599977f
commit 2995a16da3
4 changed files with 5 additions and 5 deletions

View File

@@ -220,8 +220,8 @@ Java_org_grammaticalframework_pgf_Parser_parse
}
jclass expiter_class = (*env)->FindClass(env, "org/grammaticalframework/pgf/ExprIterator");
jmethodID constrId = (*env)->GetMethodID(env, expiter_class, "<init>", "(JJJ)V");
jobject jexpiter = (*env)->NewObject(env, expiter_class, constrId, (jlong) pool, (jlong) out_pool, (jlong) res);
jmethodID constrId = (*env)->GetMethodID(env, expiter_class, "<init>", "(Lorg/grammaticalframework/pgf/Concr;JJJ)V");
jobject jexpiter = (*env)->NewObject(env, expiter_class, constrId, concr, (jlong) pool, (jlong) out_pool, (jlong) res);
return jexpiter;
}

View File

@@ -5,7 +5,7 @@ import java.util.*;
public class Concr {
public native String getName();
public Iterable<ExprProb> parse(String startCat, String s) {
return new Parser(this, startCat, s);
}

View File

@@ -22,7 +22,7 @@ class ExprIterator implements Iterator<ExprProb> {
private void fetch() {
if (!fetched) {
ep = fetchExprProb(enumRef, out_pool);
ep = fetchExprProb(ref, out_pool);
fetched = true;
}
}

View File

@@ -21,5 +21,5 @@ class Parser implements Iterable<ExprProb> {
return iter;
}
public static native ExprIterator parse(Concr concr, String startCat, String s);
static native ExprIterator parse(Concr concr, String startCat, String s);
}