reactos/sdk/tools/widl/header.h

112 lines
4 KiB
C
Raw Normal View History

/*
* IDL Compiler
*
* Copyright 2002 Ove Kaaven
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef __WIDL_HEADER_H
#define __WIDL_HEADER_H
#include "typetree.h"
extern int is_ptrchain_attr(const var_t *var, enum attr_type t);
Sync to wine-0.9.60: - Rob Shearman <rob@codeweavers.com> Wed, 26 Mar 2008 widl: Support using context handles as the binding handle in client functions. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Use is_string_type for detecting strings in write_typeformatstring_var to make it consistent with write_remoting_arg. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Add support for generic binding handles. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Fix detection of non-pointer context handles. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Make sure that string types are always written out by write_string_tfs and not write_simple_pointer. - Rob Shearman <rob@codeweavers.com> Mon, 31 Mar 2008 widl: Parse typedefs of function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 1 Apr 2008 widl: Be more strict about where semicolons can appear in IDL files. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Add a function to get the return type of a parsed function. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Store function and function pointer types completely within type_t type. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Support parsing calling conventions for function identifiers. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Support __fastcall and __pascal calling conventions. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Add a newline between function prototypes for non-object interfaces. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Fix the writing out of function pointers with more than one level of indirection. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Turn on verbose errors, which gives a little more information in the case of a syntax error. - Dan Hipschman <dsh@linux.ucla.edu> Thu, 3 Apr 2008 widl: Fix a mistake in an ordered list (keywords). svn path=/trunk/; revision=36829
2008-10-19 12:30:41 +00:00
extern int is_aliaschain_attr(const type_t *var, enum attr_type t);
extern int is_attr(const attr_list_t *list, enum attr_type t);
extern void *get_attrp(const attr_list_t *list, enum attr_type t);
extern unsigned int get_attrv(const attr_list_t *list, enum attr_type t);
extern const char* get_name(const var_t *v);
extern void write_type_left(FILE *h, type_t *t, enum name_type name_type, int declonly);
extern void write_type_right(FILE *h, type_t *t, int is_field);
extern void write_type_decl(FILE *f, type_t *t, const char *name);
extern void write_type_decl_left(FILE *f, type_t *t);
extern unsigned int get_context_handle_offset( const type_t *type );
extern unsigned int get_generic_handle_offset( const type_t *type );
extern int needs_space_after(type_t *t);
extern int is_object(const type_t *iface);
extern int is_local(const attr_list_t *list);
extern int count_methods(const type_t *iface);
extern int need_stub(const type_t *iface);
extern int need_proxy(const type_t *iface);
extern int need_inline_stubs(const type_t *iface);
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
extern int need_stub_files(const statement_list_t *stmts);
extern int need_proxy_file(const statement_list_t *stmts);
extern int need_proxy_delegation(const statement_list_t *stmts);
extern int need_inline_stubs_file(const statement_list_t *stmts);
extern const var_t *is_callas(const attr_list_t *list);
extern void write_args(FILE *h, const var_list_t *arg, const char *name, int obj, int do_indent);
Sync to wine-0.9.60: - Rob Shearman <rob@codeweavers.com> Wed, 26 Mar 2008 widl: Support using context handles as the binding handle in client functions. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Use is_string_type for detecting strings in write_typeformatstring_var to make it consistent with write_remoting_arg. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Add support for generic binding handles. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Fix detection of non-pointer context handles. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Make sure that string types are always written out by write_string_tfs and not write_simple_pointer. - Rob Shearman <rob@codeweavers.com> Mon, 31 Mar 2008 widl: Parse typedefs of function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 1 Apr 2008 widl: Be more strict about where semicolons can appear in IDL files. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Add a function to get the return type of a parsed function. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Store function and function pointer types completely within type_t type. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Support parsing calling conventions for function identifiers. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Support __fastcall and __pascal calling conventions. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Add a newline between function prototypes for non-object interfaces. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Fix the writing out of function pointers with more than one level of indirection. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Turn on verbose errors, which gives a little more information in the case of a syntax error. - Dan Hipschman <dsh@linux.ucla.edu> Thu, 3 Apr 2008 widl: Fix a mistake in an ordered list (keywords). svn path=/trunk/; revision=36829
2008-10-19 12:30:41 +00:00
extern const type_t* get_explicit_generic_handle_type(const var_t* var);
extern const var_t *get_func_handle_var( const type_t *iface, const var_t *func,
unsigned char *explicit_fc, unsigned char *implicit_fc );
extern int has_out_arg_or_return(const var_t *func);
Sync to wine-0.9.61: - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Stop looping in check_remoting_args when a context_handle or wire_marshal type is found as they are in effect fundamental types. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Check that fields in structures and unions referenced by non-local functions can be marshalled and that their attributes are consistent. -Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: The implicit_handle attribute is allowed with a handle explicitly specified in the function parameters. In that case, that handle is used instead of the implicit handle. Fix the check for the explicit_handle attribute being specified without a handle being specified in the function parameters, even though issuing an error is wrong. (Thanks to Marcus Meissner & Coverity for spotting that the check didn't do what it was supposed to do.) - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Automatically add "handle_t IDL_handle" parameter to functions with no explicit handle specified whose containing interface has the explicit_handle attribute. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Issue an error instead of crashing for dividing by zero in a constant expression. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for "->" and "." operators in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for arrays in expressions. - Rob Shearman <rob@codeweavers.com> Sun, 20 Apr 2008 widl: Add support for '%' operator in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Fix operator precedence in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Require a constant expression for case statements. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Add support for comparison, exclusive or, logical not and positive operators in expressions. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove EXPR_MEMBERPTR and implement it using EXPR_PPTR and EXPR_MEMBER instead. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Don't free input_name in pop_import as we keep pointers to it in the var_t type now. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Pass the actual type into check_remoting_fields and check_field_common instead of the type name. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Check that expressions resolve so that expressions in generated code will compile. Also check that expressions return the correct type for the attribute. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Move expression functions to a new file, expr.c. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Use expr_resolve_type to get the type of the identifier in write_conf_or_var_desc. Remove the conversion of pointer types into base types as this was only needed due to lack of proper type resolving. - Rob Shearman <rob@codeweavers.com> Tue, 22 Apr 2008 widl: Remove duplicated code in the form of the write_struct_expr function by enhancing write_expr to allow toplevel identifiers to be prefixed by a string, if specified. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Implement lcid property on library declarations. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Construct the pointer chain while parsing pointers, rather than storing a ptr_level. This method is more flexible and somewhat simpler. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Allow NULL to be used in expressions. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Create a list of statements in the whole IDL file, instead of just a list of interfaces. - Rob Shearman <rob@codeweavers.com> Thu, 24 Apr 2008 widl: Add typedef statements to the statement lists. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Consolidate most of the inner loop of reg_typedefs into set_type. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Rename pident to declarator and parse the array declarations as part of declarators. This allows arrays to be used in typedefs and const statements. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Make the rules for parsing fields in structures, encapsulated unions and non-encapsulated unions more strict. Move the rules in fields that handle empty union cases into separate union rules so that they can't erroneously be accepted for structures or other types of unions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for declaring multiple fields of a structure in one statement. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Add support for string literals and wide-string literals in expressions. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Create a statement object for import statements. Move the writing of include directives into the generated header into header.c. - Rob Shearman <rob@codeweavers.com> Fri, 25 Apr 2008 widl: Move the func_declarator rule entirely into direct_declarator. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Add typedefs to typelibs which have the public or uuid attributes, not any other attribute. - Rob Shearman <rob@codeweavers.com> Sat, 26 Apr 2008 widl: Support hex digits that use an uppercase 0X prefix. - Rob Shearman <rob@codeweavers.com> Sun, 27 Apr 2008 widl: Accept integer constant suffixes in the lexer. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Keep const attributes applied to pointers when writing out the type. Use an attribute to store the const qualifier for the pointer and type. Allow multiple type-qualifiers to be applied to a type by adding a declaration-specifier rule that encompasses type-qualifiers and types. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Add support for "inline" on function definitions. Fix applying calling convention to function type. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Make constdef and externdef take a declarator instead of an ident so that functions and arrays can be defined using the statements. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: Allow pointer attributes to be applied to function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 29 Apr 2008 widl: callback, code, comm_status and in_line are attribute names, not keywords. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Prepare for supporting storage classes in declaration statements. Return a decl_spec_t structure from decl_spec rules so that the storage class and type qualifiers can both be returned. - Rob Shearman <rob@codeweavers.com> Wed, 30 Apr 2008 widl: Add the parsing of storage classes into declaration-specifiers. Support the static and register keywords. This consolidates externdef and constdef rules into one declaration rule. - Rob Shearman <rob@codeweavers.com> Thu, 1 May 2008 widl: Consolidate writing of COM and dispatch interfaces into one function to remove duplicated code. Split up the writing into start and end to eventually support the style MIDL uses where it writes declared types, etc. between the start and end of the interface. Make internal header functions take the file pointer to print to. Don't write interface IDs for non-object interfaces and always write handle declarations even if the interface has no methods, like MIDL does. - Gerald Pfeifer <gerald@pfeifer.com> Fri, 2 May 2008 widl: Fix syntax to also work with older versions of bison. svn path=/trunk/; revision=37313
2008-11-12 19:26:25 +00:00
extern int is_const_decl(const var_t *var);
extern void write_serialize_functions(FILE *file, const type_t *type, const type_t *iface);
static inline int is_ptr(const type_t *t)
{
return type_get_type(t) == TYPE_POINTER;
}
static inline int is_array(const type_t *t)
{
return type_get_type(t) == TYPE_ARRAY;
}
static inline int is_void(const type_t *t)
{
return type_get_type(t) == TYPE_VOID;
}
static inline int is_declptr(const type_t *t)
{
return is_ptr(t) || (type_get_type(t) == TYPE_ARRAY && type_array_is_decl_as_ptr(t));
}
static inline int is_conformant_array(const type_t *t)
{
return is_array(t) && type_array_has_conformance(t);
}
static inline int last_ptr(const type_t *type)
{
return is_ptr(type) && !is_declptr(type_pointer_get_ref(type));
}
static inline int last_array(const type_t *type)
{
return is_array(type) && !is_array(type_array_get_element(type));
}
static inline int is_string_type(const attr_list_t *attrs, const type_t *type)
{
Sync to wine-0.9.60: - Rob Shearman <rob@codeweavers.com> Wed, 26 Mar 2008 widl: Support using context handles as the binding handle in client functions. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Use is_string_type for detecting strings in write_typeformatstring_var to make it consistent with write_remoting_arg. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Add support for generic binding handles. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Fix detection of non-pointer context handles. - Rob Shearman <rob@codeweavers.com> Thu, 27 Mar 2008 widl: Make sure that string types are always written out by write_string_tfs and not write_simple_pointer. - Rob Shearman <rob@codeweavers.com> Mon, 31 Mar 2008 widl: Parse typedefs of function pointers. - Rob Shearman <rob@codeweavers.com> Tue, 1 Apr 2008 widl: Be more strict about where semicolons can appear in IDL files. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Add a function to get the return type of a parsed function. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Store function and function pointer types completely within type_t type. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Support parsing calling conventions for function identifiers. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Support __fastcall and __pascal calling conventions. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Add a newline between function prototypes for non-object interfaces. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Fix the writing out of function pointers with more than one level of indirection. - Rob Shearman <rob@codeweavers.com> Wed, 2 Apr 2008 widl: Turn on verbose errors, which gives a little more information in the case of a syntax error. - Dan Hipschman <dsh@linux.ucla.edu> Thu, 3 Apr 2008 widl: Fix a mistake in an ordered list (keywords). svn path=/trunk/; revision=36829
2008-10-19 12:30:41 +00:00
return ((is_attr(attrs, ATTR_STRING) || is_aliaschain_attr(type, ATTR_STRING))
&& (last_ptr(type) || last_array(type)));
}
static inline int is_context_handle(const type_t *type)
{
const type_t *t;
for (t = type;
is_ptr(t) || type_is_alias(t);
t = type_is_alias(t) ? type_alias_get_aliasee(t) : type_pointer_get_ref(t))
if (is_attr(t->attrs, ATTR_CONTEXTHANDLE))
return 1;
return 0;
}
#endif