Changeset 280 for trunk/idl-compiler/c/emitter.c
- Timestamp:
- Mar 30, 2007, 10:31:24 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/idl-compiler/c/emitter.c
r278 r280 54 54 { 55 55 int b; 56 gchar *chrType; 56 57 PMETHODPARAM pm=(PMETHODPARAM)g_ptr_array_index(pArray, a); 58 59 chrType= pm->chrType; 60 61 /* For old IDL files using orbit IDL compiler */ 62 if(!strcmp(pm->chrType, "string")) 63 chrType="CORBA_char*"; 64 if(!strcmp(pm->chrType, "long")) 65 chrType="CORBA_long"; 57 66 58 67 switch(pm->uiDirection) 59 68 { 60 69 case PARM_DIRECTION_IN: 61 fprintf(fh, " const %s", pm->chrType);70 fprintf(fh, " const %s", chrType); 62 71 break; 63 72 case PARM_DIRECTION_OUT: 64 fprintf(fh, " %s*", pm->chrType);73 fprintf(fh, " %s*", chrType); 65 74 break; 66 75 case PARM_DIRECTION_INOUT: 67 76 fprintf(fh, " %s*", chrType); 68 77 break; 69 78 default: 70 fprintf(fh, " %s*", pm->chrType); 79 71 80 break; 72 81 } … … 91 100 } 92 101 } 102 103 /** 104 This function emits the return type of a method. It translates CORBA identifiers 105 into another representation e.g. long->glong. At the moment it's used to be compatible 106 with old source written using the orbit IDL compiler. 107 */ 108 void emitReturnType(PPARSEINFO pLocalPI, PINTERFACE pif, PMETHOD pm) 109 { 110 FILE* fh=pLocalPI->outFile; 111 int b; 112 gchar* chrType; 113 114 chrType= pm->mpReturn.chrType; 115 116 /* Support for orbit IDL files */ 117 if(!strcmp(pm->mpReturn.chrType, "long")) 118 chrType="CORBA_long"; 119 else if(!strcmp(pm->mpReturn.chrType, "boolean")) 120 chrType="CORBA_boolean"; 121 122 fprintf(fh, "%s", chrType); 123 for(b=0;b<pm->mpReturn.uiStar;b++) 124 fprintf(fh, "*"); 125 }
Note:
See TracChangeset
for help on using the changeset viewer.