Changeset 104485 in vbox
- Timestamp:
- May 2, 2024 4:28:55 PM (9 months ago)
- Location:
- trunk/src/libs/xpcom18a4/xpcom/typelib
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_header.c
r103977 r104485 253 253 fputs(" {\n" 254 254 " public: \n\n", state->file); 255 if (iid) { 256 fputs(" NS_DEFINE_STATIC_IID_ACCESSOR(", state->file); 257 write_classname_iid_define(state->file, className); 258 fputs(")\n\n", state->file); 259 } 255 256 fputs(" NS_DEFINE_STATIC_IID_ACCESSOR(", state->file); 257 write_classname_iid_define(state->file, className); 258 fputs(")\n\n", state->file); 260 259 261 260 orig = state->tree; /* It would be nice to remove this state-twiddling. */ … … 1137 1136 const char *desc = IDL_CODEFRAG(state->tree).desc; 1138 1137 GSList *lines = IDL_CODEFRAG(state->tree).lines; 1139 guint fragment_length; 1140 1138 1141 1139 if (strcmp(desc, "C++") && /* libIDL bug? */ strcmp(desc, "C++\r")) { 1142 1140 XPIDL_WARNING((state->tree, IDL_WARNING1, … … 1155 1153 * we backtrack to get the proper line for the beginning of the block. 1156 1154 */ 1157 /*1158 * Looks like getting this right means maintaining an accurate line1159 * count of everything generated, so we can set the file back to the1160 * correct line in the generated file afterwards. Skipping for now...1161 */1162 1163 fragment_length = g_slist_length(lines);1164 /* fprintf(state->file, "#line %d \"%s\"\n", */1165 /* state->tree->_line - fragment_length - 1, */1166 /* state->tree->_file); */1167 1168 1155 g_slist_foreach(lines, write_codefrag_line, (gpointer)state); 1169 1156 -
trunk/src/libs/xpcom18a4/xpcom/typelib/xpidl/xpidl_typelib.c
r103505 r104485 130 130 { 131 131 TreeState *state = user_data; 132 IDL_tree up;133 132 if (IDL_NODE_TYPE(tfd->tree) == IDLN_IDENT) { 134 IDL_tree_type node_type = IDL_NODE_TYPE( (up = IDL_NODE_UP(tfd->tree)));133 IDL_tree_type node_type = IDL_NODE_TYPE(IDL_NODE_UP(tfd->tree)); 135 134 if (node_type == IDLN_INTERFACE || node_type == IDLN_FORWARD_DCL) { 136 135 … … 168 167 #endif 169 168 } 170 } else {171 #ifdef DEBUG_shaver_ifaces172 fprintf(stderr, "ident %s isn't an interface (%s)\n",173 IDL_IDENT(tfd->tree).str, IDL_NODE_TYPE_NAME(up));174 #endif175 169 } 176 170 } … … 278 272 const XPTInterfaceDirectoryEntry *a = ap, *b = bp; 279 273 const nsID *aid = &a->iid, *bid = &b->iid; 280 const char *ans, *bns;281 274 282 275 int i; … … 289 282 COMPARE(m3[i]); 290 283 } 291 292 /* defend against NULL name_space by using empty string. */293 ans = a->name_space ? a->name_space : "";294 bns = b->name_space ? b->name_space : "";295 284 296 285 if (a->name_space && b->name_space) { … … 848 837 break; 849 838 } 850 case IDLN_NATIVE: {851 char *ident;839 case IDLN_NATIVE: 840 { 852 841 853 842 /* jband - adding goto for iid_is when type is native */ … … 857 846 goto handle_iid_is; 858 847 859 ident = IDL_IDENT(type).str;860 848 if (IDL_tree_property_get(type, "nsid")) { 861 849 td->prefix.flags = TD_PNSIID; -
trunk/src/libs/xpcom18a4/xpcom/typelib/xpt/src/xpt_struct.c
r103505 r104485 280 280 * the stack on large xpt files. 281 281 */ 282 ann =next = header->annotations;282 next = header->annotations; 283 283 annp = &header->annotations; 284 284 do { … … 937 937 938 938 static XPT_TYPELIB_VERSIONS_STRUCT versions[] = XPT_TYPELIB_VERSIONS; 939 #define XPT_TYPELIB_VERSIONS_COUNT (sizeof(versions) / sizeof(versions[0]))940 939 941 940 XPT_PUBLIC_API(PRUint16) 942 941 XPT_ParseVersionString(const char* str, PRUint8* major, PRUint8* minor) 943 942 { 944 int i; 945 for (i = 0; i < XPT_TYPELIB_VERSIONS_COUNT; i++) { 943 for (uint32_t i = 0; i < RT_ELEMENTS(versions); i++) { 946 944 if (!strcmp(versions[i].str, str)) { 947 945 *major = versions[i].major; -
trunk/src/libs/xpcom18a4/xpcom/typelib/xpt/src/xpt_xdr.c
r49491 r104485 214 214 XPT_DELETE(arena, state); 215 215 err_free_arena: 216 if (arena) 217 XPT_DestroyArena(arena); 216 XPT_DestroyArena(arena); 218 217 return NULL; 219 218 } -
trunk/src/libs/xpcom18a4/xpcom/typelib/xpt/tools/xpt_link.c
r103114 r104485 240 240 241 241 state = XPT_NewXDRState(XPT_DECODE, whole, flen); 242 if (!state) 243 { 244 fprintf(stdout, "XPT_NewXDRState failed for %s\n", name); 245 return 1; 246 } 242 247 if (!XPT_MakeCursor(state, XPT_HEADER, 0, cursor)) { 243 248 fprintf(stdout, "XPT_MakeCursor failed for %s\n", name);
Note:
See TracChangeset
for help on using the changeset viewer.