Author: cwittich
Date: Tue Jan 6 00:16:55 2009
New Revision: 38599
URL:
http://svn.reactos.org/svn/reactos?rev=38599&view=rev
Log:
-Dmitry Timoshkov <dmitry <at> codeweavers.com> Mon Nov 10 2008
widl: Make the generated string pointers const as well.
-Alexandre Julliard <julliard <at> winehq.org> Tue Nov 25 2008
widl: Make sure format strings for structure and union types are only output once.
Modified:
trunk/reactos/tools/widl/typegen.c
Modified: trunk/reactos/tools/widl/typegen.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/typegen.c?rev=3…
==============================================================================
--- trunk/reactos/tools/widl/typegen.c [iso-8859-1] (original)
+++ trunk/reactos/tools/widl/typegen.c [iso-8859-1] Tue Jan 6 00:16:55 2009
@@ -1866,8 +1866,9 @@
nothing is written to file yet. On the actual writing pass,
this will have been updated. */
unsigned int absoff = type->ptrdesc ? type->ptrdesc : *tfsoff;
- short reloff = absoff - *tfsoff;
- print_file(file, 2, "NdrFcShort(0x%hx),\t/* Offset= %hd (%u) */\n",
+ int reloff = absoff - *tfsoff;
+ assert( reloff >= 0 );
+ print_file(file, 2, "NdrFcShort(0x%x),\t/* Offset= %d (%u) */\n",
reloff, reloff, absoff);
*tfsoff += 2;
}
@@ -2255,6 +2256,8 @@
/* basic types don't need a type format string */
if (is_base_type(type->type))
return 0;
+
+ if (processed(type)) return type->typestring_offset;
switch (type->type)
{
@@ -3351,7 +3354,7 @@
const char *p;
/* this should be an array of RPC_PROTSEQ_ENDPOINT but we want const strings */
- print_file( f, 0, "static const unsigned char * %s__RpcProtseqEndpoint[][2]
=\n{\n", prefix );
+ print_file( f, 0, "static const unsigned char * const
%s__RpcProtseqEndpoint[][2] =\n{\n", prefix );
LIST_FOR_EACH_ENTRY( endpoint, list, const struct str_list_entry_t, entry )
{
print_file( f, 1, "{ (const unsigned char *)\"" );