Skip to content

Commit

Permalink
fix: file closing
Browse files Browse the repository at this point in the history
Signed-off-by: Sarapulov Vasilii <[email protected]>
  • Loading branch information
Sarapulov-Vas committed Jul 11, 2024
1 parent 81033d8 commit 92ba761
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 49 deletions.
32 changes: 0 additions & 32 deletions src/code_receiving.py

This file was deleted.

17 changes: 0 additions & 17 deletions src/write_program_data_types

This file was deleted.

14 changes: 14 additions & 0 deletions src/write_program_data_types.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
'''Dumping program data types'''
#pylint: disable=wrong-import-position
import pyhidra # pylint: disable=import-error
pyhidra.start()
import ghidra # pylint: disable=import-error
from java.io import PrintWriter # pylint: disable=import-error

def write_program_data_types(program, file, monitor):
"""Dumping program data types"""
dtm = program.getDataTypeManager()
c_file_writer = PrintWriter(file)
data_type_writer = ghidra.program.model.data.DataTypeWriter(dtm, c_file_writer, False)
data_type_writer.write(dtm, monitor)
c_file_writer.close()

0 comments on commit 92ba761

Please sign in to comment.