A simple test case.
Test.java
public class test {
public native int write(byte[] b, int len);
}
compile test.java and use
javah -old -stubs -Xnew test
and
javah -old -stubs test
Output differs only by a 'p' and and 'i' in the 2nd parameter
-Xnew: _P_[0].i = test_write(_P_[0].p,((_P_[1].i)),((_P_[2].i)));
and ^^^
_P_[0].i = test_write(_P_[0].p,((_P_[1].p)),((_P_[2].i)));
^^^
All diffs below are in similar fashion
###@###.### 2003-10-02
for the following command
=========================
javah -old -stubs -o actualOutput File InputFile OutputFile
then the output "actualOutput" is 'diff'ed with an expcted results, gold.c
the differences are,
#9c9
#< _P_[0].p = InputFile_arr(_P_[0].p,((_P_[1].p)));
#---
#> _P_[0].i = InputFile_arr(_P_[0].p,((_P_[1].i)));
#27c27
#< _P_[0].i = InputFile_read(_P_[0].p,((_P_[1].p)),((_P_[2].i)));
#---
#> _P_[0].i = InputFile_read(_P_[0].p,((_P_[1].i)),((_P_[2].i)));
#101c101
#< (void) InputFile_passArray_func(_P_[0].p,((_P_[1].p)));
#---
#> (void) InputFile_passArray_func(_P_[0].p,((_P_[1].i)));
#107c107
#< (void) InputFile_passArray_func(_P_[0].p,((_P_[1].p)));
#---
#> (void) InputFile_passArray_func(_P_[0].p,((_P_[1].i)));
#113c113
#< (void) InputFile_passArray_func(_P_[0].p,((_P_[1].p)));
#---
#> (void) InputFile_passArray_func(_P_[0].p,((_P_[1].i)));
#119c119
#< (void) InputFile_passArray_func(_P_[0].p,((_P_[1].p)));
#---
#> (void) InputFile_passArray_func(_P_[0].p,((_P_[1].i)));
#123a124
#> jvalue _t1;
#125c126
#< (void) InputFile_passArray_func(_P_[0].p,((_P_[1].p)));
#---
#> (void) InputFile_passArray_func(_P_[0].p,GET_INT64(_t1, _P_+1));
#131c132
#< (void) InputFile_passArray_func(_P_[0].p,((_P_[1].p)));
#---
#> (void) InputFile_passArray_func(_P_[0].p,((_P_[1].i)));
#137c138
#< (void) InputFile_passArray_func(_P_[0].p,((_P_[1].p)));
#---
#> (void) InputFile_passArray_func(_P_[0].p,((_P_[1].f)));
#141a143
#> jvalue _t1;
#143c145
#< (void) InputFile_passArray_func(_P_[0].p,((_P_[1].p)));
#---
#> (void) InputFile_passArray_func(_P_[0].p,GET_DOUBLE(_t1, _P_+1));
#198c200
#< _P_[0].i = OutputFile_write(_P_[0].p,((_P_[1].p)),((_P_[2].i)));
#---
#> _P_[0].i = OutputFile_write(_P_[0].p,((_P_[1].i)),((_P_[2].i)))
To reproduce this, I am attaching the java source files (File.java,
InputFile.java, OutputFile.java) and the expected results file (gold.c) which
worked with the old javah well.
Test.java
public class test {
public native int write(byte[] b, int len);
}
compile test.java and use
javah -old -stubs -Xnew test
and
javah -old -stubs test
Output differs only by a 'p' and and 'i' in the 2nd parameter
-Xnew: _P_[0].i = test_write(_P_[0].p,((_P_[1].i)),((_P_[2].i)));
and ^^^
_P_[0].i = test_write(_P_[0].p,((_P_[1].p)),((_P_[2].i)));
^^^
All diffs below are in similar fashion
###@###.### 2003-10-02
for the following command
=========================
javah -old -stubs -o actualOutput File InputFile OutputFile
then the output "actualOutput" is 'diff'ed with an expcted results, gold.c
the differences are,
#9c9
#< _P_[0].p = InputFile_arr(_P_[0].p,((_P_[1].p)));
#---
#> _P_[0].i = InputFile_arr(_P_[0].p,((_P_[1].i)));
#27c27
#< _P_[0].i = InputFile_read(_P_[0].p,((_P_[1].p)),((_P_[2].i)));
#---
#> _P_[0].i = InputFile_read(_P_[0].p,((_P_[1].i)),((_P_[2].i)));
#101c101
#< (void) InputFile_passArray_func(_P_[0].p,((_P_[1].p)));
#---
#> (void) InputFile_passArray_func(_P_[0].p,((_P_[1].i)));
#107c107
#< (void) InputFile_passArray_func(_P_[0].p,((_P_[1].p)));
#---
#> (void) InputFile_passArray_func(_P_[0].p,((_P_[1].i)));
#113c113
#< (void) InputFile_passArray_func(_P_[0].p,((_P_[1].p)));
#---
#> (void) InputFile_passArray_func(_P_[0].p,((_P_[1].i)));
#119c119
#< (void) InputFile_passArray_func(_P_[0].p,((_P_[1].p)));
#---
#> (void) InputFile_passArray_func(_P_[0].p,((_P_[1].i)));
#123a124
#> jvalue _t1;
#125c126
#< (void) InputFile_passArray_func(_P_[0].p,((_P_[1].p)));
#---
#> (void) InputFile_passArray_func(_P_[0].p,GET_INT64(_t1, _P_+1));
#131c132
#< (void) InputFile_passArray_func(_P_[0].p,((_P_[1].p)));
#---
#> (void) InputFile_passArray_func(_P_[0].p,((_P_[1].i)));
#137c138
#< (void) InputFile_passArray_func(_P_[0].p,((_P_[1].p)));
#---
#> (void) InputFile_passArray_func(_P_[0].p,((_P_[1].f)));
#141a143
#> jvalue _t1;
#143c145
#< (void) InputFile_passArray_func(_P_[0].p,((_P_[1].p)));
#---
#> (void) InputFile_passArray_func(_P_[0].p,GET_DOUBLE(_t1, _P_+1));
#198c200
#< _P_[0].i = OutputFile_write(_P_[0].p,((_P_[1].p)),((_P_[2].i)));
#---
#> _P_[0].i = OutputFile_write(_P_[0].p,((_P_[1].i)),((_P_[2].i)))
To reproduce this, I am attaching the java source files (File.java,
InputFile.java, OutputFile.java) and the expected results file (gold.c) which
worked with the old javah well.
- relates to
-
JDK-4945058 remove javah -old option
- Resolved