On Fri, 8 May 2020 19:12:48 GMT, Kevin Rushforth <[email protected]> wrote:

>> modules/javafx.graphics/src/main/native-prism-d3d/D3DPipeline.cc line 39:
>> 
>>> 38:
>>> 39: static jboolean checkAndClearException(JNIEnv *env) {
>>> 40:     if (!env->ExceptionCheck()) {
>> 
>> while this looks ok to me, I'm not sure why the old code had `extern` 
>> followed by the implementation. There might be
>> reasons I don't understand, and in that case it might be safer to #ifdef 
>> here with STATIC_BUILD. But maybe
>> @kevinrushforth  knows why this construct is here?
>
> I suspect it was either a copy/paste or else a holdover from when it really 
> was used from more than one file. I think
> it should be fine to make it static.
> There is a function of the same name in two other places: native-prism-font 
> and native-iio. In native-prism-font it
> really is defined in one place and used in multiple files. In native-iio it 
> is only used in a single file and defined
> as a static function.  I'll test this with a default (non-static) build to 
> make sure there are no unintended changes.

The alternative is to prefix the method as is done in native-prism-sw. But 
using static instead looked like a cleaner
way.

I've also built both the regular and static version and they both worked 
without issues.

-------------

PR: https://git.openjdk.java.net/jfx/pull/214

Reply via email to