<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://jogamp.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://jogamp.org/bugzilla/"
          
          maintainer="sgothel@jausoft.com"
>

    <bug>
          <bug_id>1025</bug_id>
          
          <creation_ts>2014-06-25 09:52:17 +0200</creation_ts>
          <short_desc>GlueGen: Add accessor for compound fields of type array, pointer and string (code generation)</short_desc>
          <delta_ts>2014-06-25 11:39:43 +0200</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>3</classification_id>
          <classification>JogAmp</classification>
          <product>Gluegen</product>
          <component>core</component>
          <version>2</version>
          <rep_platform>All</rep_platform>
          <op_sys>all</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>---</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          <dependson>1022</dependson>
          <blocked>1021</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Sven Gothel">sgothel</reporter>
          <assigned_to name="Sven Gothel">sgothel</assigned_to>
          <cc>harvey.harrison</cc>
    
    <cc>rami.santina</cc>
          
          <cf_type>---</cf_type>
          <cf_scm_refs>gluegen 9ee44e1a289ecbac024662dd5a2ffc42e8add023
gluegen 679d484d4d8c3528aacc5b98dca644086948fcc5
gluegen 8f571b2c0008df1b6554fa8fa754440c0f024052
jocl 49d7ae5356c279d519fc6744129c92a166e4f504
jogl a515faf5e7d679b7ad87a05fa8fc81ab148bcd41</cf_scm_refs>
          <cf_workaround>---</cf_workaround>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3992</commentid>
    <comment_count>0</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2014-06-25 09:52:17 +0200</bug_when>
    <thetext>Enhance compound access as delivered by Bug 1022,
to also generate accessors (getter and setter) for
array, pointer and string types.

Allow configuration of array length either via
their internal size (c-header) or config &apos;ReturnedArrayLength&apos;.

&apos;ReturnedArrayLength&apos; allows specifying a java expression.

Canonical field names of compounds are _now_ specified as
follows for configuration entries:
  COMPOUND.FIELD
e.g.
  StructA.fieldB

Also allow configuration of pointer fields to be treated as 
referenced arrays via &apos;ReturnedArrayLength&apos;.

Further, allow specifying &apos;pointer fields&apos; as String values
via &apos;ReturnsString&apos; configuration.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3993</commentid>
    <comment_count>1</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2014-06-25 10:25:07 +0200</bug_when>
    <thetext>gluegen commit 9ee44e1a289ecbac024662dd5a2ffc42e8add023:

Implementation details:
 - handle above described accessor features
 - enhance JavaDoc for generated accessors
 - generate native JNI compound and string accessor on demand
 - encapsule accessor code generation in their own methods
 - enhance exception messages
 - enhance type verbosity in debug mode
 - verbose debug output via GlueGen.debug()

Tests:
 - Features covered by test1.[ch]
   and Test1p1JavaEmitter and Test1p2ProcAddressEmitter

- Validated compilation and unit tests for modules:
 - joal
 - jogl (minor config changes req.)
   commit a515faf5e7d679b7ad87a05fa8fc81ab148bcd41
 - jocl (minor config changes req.)
   commit 49d7ae5356c279d519fc6744129c92a166e4f504</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3994</commentid>
    <comment_count>2</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2014-06-25 10:33:16 +0200</bug_when>
    <thetext>679d484d4d8c3528aacc5b98dca644086948fcc5
  GlueGen: Fix test case (gcc compiler regression due to redefined types / removed them)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3995</commentid>
    <comment_count>3</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2014-06-25 10:49:27 +0200</bug_when>
    <thetext>Issues w/ opaque &apos;long&apos; field access of structs
where native size != java size (e.g. 32bit):

  /** Getter for native field: CType[&apos;TK_Context&apos; (typedef), size [fixed false, lnx64 8], [pointer*1]], with array length of &lt;code&gt;1&lt;/code&gt; */
  public long getCtx() {
    return accessor.getLongAt(ctx_offset[mdIdx]);
  }


.. reopened.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3996</commentid>
    <comment_count>4</comment_count>
    <who name="Sven Gothel">sgothel</who>
    <bug_when>2014-06-25 11:39:43 +0200</bug_when>
    <thetext>commit 8f571b2c0008df1b6554fa8fa754440c0f024052

  Fix regression of single non-native sized compound fields,
  see comment 3.
    
  Single non-native sized compound fields, if an opaque array/pointer,
  must utilized the native size StructAccessor get/set method.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>