Ignore:
Timestamp:
Nov 28, 2006, 7:12:30 PM (19 years ago)
Author:
cinc
Message:

Automatically typedef pointer on classes in the *.h file. Macro to define pointer on classes as native types for use in IDL files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ORBit2-2.14.0/src/idl-compiler/orbit-idl-c-headers.c

    r119 r121  
    106106      fprintf(ci->fh, "/*\n * (%s, %s line %d)\n */\n", __FILE__, __FUNCTION__, __LINE__);
    107107      fprintf(ci->fh, "/*\n * C specific class structure\n */\n");
    108       fprintf(ci->fh, "NOMEXTERN struct %sCClassDataStructure {\n   nomMethodTabs parentMtab;\n   nomDToken instanceDataToken;\n\
    109 } NOMDLINK %sCClassData;\n\n", id, id);
     108      fprintf(ci->fh, "NOMEXTERN struct %sCClassDataStructure {\n", id);
     109      fprintf(ci->fh, "   nomMethodTabs parentMtab;\n   nomDToken instanceDataToken;\n} NOMDLINK %sCClassData;\n\n", id);
    110110      /* vomNewClass() */
    111111      fprintf(ci->fh, "/*\n * Class creation function\n */\n");
     
    328328
    329329    fprintf(ci->fh, "#define %s %sObj\n", fullname, fullname);
     330    fprintf(ci->fh, "typedef %s *P%s;\n", fullname, fullname);
    330331    fprintf(ci->fh, "#endif\n");
    331332#endif
     
    446447ch_output_native(IDL_tree tree, OIDL_Run_Info *rinfo, OIDL_C_Info *ci)
    447448{
     449#ifdef USE_LIBIDL_CODE
    448450    char *ctmp;
    449451    IDL_tree id = IDL_NATIVE(tree).ident;
     
    454456    fprintf(ci->fh, "#endif\n");
    455457    g_free(ctmp);
     458#endif
    456459}
    457460
Note: See TracChangeset for help on using the changeset viewer.