-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error in creating an instance of structure. #69
Comments
From the top of my head bool is not a standard C type. So you need to add a definition and you can use the bool present in ctypes to represent it. |
Hello, ...
elif typ[0] == 'bool':
cls = c_bool
else:
raise KeyError("Can't find base type for {}".format(typ))
... and it's working. Are you suggesting the same? If not then could you please explain further. |
I am a bit confused because bool is present in the Could you inspect this attribute and post the version you are using ? |
I am using version 0.2.1 |
So it is the last version which is up to date with main. So can you check the content of the |
I don't see this types attribute. Neither on parser nor on the library object. Here is the output: print(dir(parser))
['__class__', '__delattr__', '__dict__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__le__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', '_format_parsed_file', '_init', 'abstract_declarator', 'add_def', 'build_parser', 'cache_version', 'compile_fn_macro', 'compiled_types', 'current_file', 'data_list', 'decl_list', 'declarator', 'declarator_list', 'defs', 'enum_decl', 'enum_type', 'eval', 'eval_expr', 'eval_preprocessor_expr', 'eval_type', 'expand_fn_macro', 'expand_macros', 'file_defs', 'file_order', 'files', 'find', 'find_headers', 'find_text', 'function_decl', 'import_dict', 'init_opts', 'is_fund_type', 'load_cache', 'load_file', 'pack_list', 'packing_at', 'parse_defs', 'parser', 'pp_define', 'preprocess', 'print_all', 'process_all', 'process_declarator', 'process_enum', 'process_function', 'process_macro_defn', 'process_struct', 'process_type', 'process_typedef', 'process_variable', 'rem_def', 'remove_comments', 'struct_decl', 'struct_member', 'struct_type', 'type_decl', 'type_spec', 'typeless_function_decl', 'variable_decl', 'write_cache'] |
Hello,
struct in header file
I have added a print statement in ctypes.py
Loading the lib using parser object with prefix=['WGPU','wgpu'] options.
and the error is
The text was updated successfully, but these errors were encountered: