Uploaded image for project: 'Axis2-C'
  1. Axis2-C
  2. AXIS2C-1379

typedef done too late in special cases - CADBBeanTemplateHeader.xsl

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 1.6.0
    • None
    • Windows VS2005 and gcc 3.4.4 on Windows

    Description

      The code generated by the "class" template in CADBBeanTemplateHeader generates code that looks like the code below.
      The problem is that the typedef sometimes occurs too late.
      This happens, I believe, when an element can include itself recursively. In this case, the compiler complains when it sees X_t.

      A simple fix is to move the typedef at the top.

      — CADBBeanTemplateHeader.xsl —

      /**

      • X.h
        *
      • This file was auto-generated from WSDL
      • by the Apache Axis2/Java version: ...
        */

      #include "..."
      ... more #include "..."

      #include <stdio.h>
      #include <axiom.h>
      #include <axis2_util.h>
      #include <axiom_soap.h>
      #include <axis2_client.h>

      #ifdef __cplusplus
      extern "C"
      {
      #endif

      #define ADB_DEFAULT_DIGIT_LIMIT 1024
      #define ADB_DEFAULT_NAMESPACE_PREFIX_LIMIT 64

      typedef struct X X_t;

      Attachments

        1. CircularReference.diff
          1 kB
          Allan Schrum

        Activity

          People

            Unassigned Unassigned
            alainbo Alain Beauregard
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: