Skip to content

Commit

Permalink
Use the new function to setup the c++ parser for the pygccxml example
Browse files Browse the repository at this point in the history
  • Loading branch information
iMichka committed May 30, 2015
1 parent 1e8f96b commit 5976204
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions docs/example/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,20 +9,20 @@
# Find out the file location within the sources tree
this_module_dir_path = os.path.abspath(
os.path.dirname(sys.modules[__name__].__file__))
# Find out gccxml location
gccxml_09_path = os.path.join(
this_module_dir_path, '..', '..', '..',
'gccxml_bin', 'v09', sys.platform, 'bin')
# Add pygccxml package to Python path
sys.path.append(os.path.join(this_module_dir_path, '..', '..'))


from pygccxml import parser # nopep8
from pygccxml import declarations # nopep8
from pygccxml import utils # nopep8

# Configure GCC-XML parser
# Find out the c++ parser (gccxml or castxml)
parser_path, parser_name = utils.find_cpp_parser()

# Configure the c++ parser
config = parser.gccxml_configuration_t(
gccxml_path=gccxml_09_path, compiler='gcc')
gccxml_path=parser_path, caster=parser_name, compiler="gcc")

# Parsing source file
decls = parser.parse([this_module_dir_path + '/example.hpp'], config)
Expand Down

0 comments on commit 5976204

Please sign in to comment.