Project

Profile

Help

Bug #2649

closed

Compilation with DEBUG defined

Added by Omar Rodriguez almost 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
C API
Start date:
2016-02-25
Due date:
% Done:

100%

Estimated time:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
1.0.0
Fixed in version:
1.0.1
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:

Description

When the DEBUG flag is defined the following compilation error is produced...

../../Saxon.C.API/SaxonCProcessor.c: In function 'xsltApplyStylesheet':

../../Saxon.C.API/SaxonCProcessor.c:146:37: error: invalid type argument of '->' (have 'sxnc_environment')

../../Saxon.C.API/SaxonCProcessor.c:147:9: error: invalid type argument of '->' (have 'sxnc_environment')

../../Saxon.C.API/SaxonCProcessor.c: In function 'xsltApplyStylesheet':

../../Saxon.C.API/SaxonCProcessor.c:146:37: error: invalid type argument of '->' (have 'sxnc_environment')

../../Saxon.C.API/SaxonCProcessor.c:147:9: error: invalid type argument of '->' (have 'sxnc_environment')

../../Saxon.C.API/SaxonCProcessor.c: In function 'xsltApplyStylesheet':

../../Saxon.C.API/SaxonCProcessor.c:146:37: error: invalid type argument of '->' (have 'sxnc_environment')

../../Saxon.C.API/SaxonCProcessor.c:147:9: error: invalid type argument of '->' (have 'sxnc_environment')

Lines referenced are:

#ifdef DEBUG

    jmethodID debugMID = environ->env->GetStaticMethodID(environ.env, cppClass, "setDebugMode", "(Z)V");

environ->env->CallStaticVoidMethod(environ.env, cppClass, debugMID, (jboolean)true);

#endif

In order to make these lines to compile I changed the code to....

#ifdef DEBUG

    jmethodID debugMID = (*(environ.env))->GetStaticMethodID(environ.env, cppClass, "setDebugMode", "(Z)V");

(*(environ.env))->CallStaticVoidMethod(environ.env, cppClass, debugMID, (jboolean)true);

#endif

Please register to edit this issue

Also available in: Atom PDF