pyGHDL.libghdl.files_map_editor#

Functions


Functions

pyGHDL.libghdl.files_map_editor.Replace_Text(File, Start_Line, Start_Offset, End_Line, End_Offset, Text)[source]#

Replace [START; END) by TEXT.

Parameters:
  • File (TypeVar(SourceFileEntry, bound= c_uint)) – File where to replace a text section.

  • Start_Line (int) – undocumented

  • Start_Offset (int) – undocumented

  • End_Line (int) – undocumented

  • End_Offset (int) – undocumented

  • Text (str) – undocumented

Return type:

bool

Returns:

Return True in case of success, False in case of failure (the gap is too small).

pyGHDL.libghdl.files_map_editor.Fill_Text(File, Text_Pointer, Text_Length)[source]#

Replace the content of File with TEXT.

Todo

Replace Text_Pointer and Text_Length with Python string

Parameters:
  • File (TypeVar(SourceFileEntry, bound= c_uint)) – File where to replace the content.

  • Text_Pointer – Type: File_Buffer_Ptr

  • Text_Length (int) – Type: Source_Ptr

Return type:

None

pyGHDL.libghdl.files_map_editor.Check_Buffer_Content(File, String_Pointer, String_Length)[source]#

Check that content of File is STR[1 .. STR_LEN].

Todo

Replace String_Pointer and String_Length with Python string

Parameters:
  • File (TypeVar(SourceFileEntry, bound= c_uint)) – File to check the content.

  • String_Pointer (c_char_p) – Type: File_Buffer_Ptr

  • String_Length (c_uint) – Type: Source_Ptr

Return type:

None

pyGHDL.libghdl.files_map_editor.Copy_Source_File(Dest, Src)[source]#

Copy content of Src to Dest. :rtype: None

Warning

The size of Dest must be large enough.

Clear lines table of Dest.

Parameters:
  • Dest (SourceFileEntry) –

  • Src (SourceFileEntry) –

Return type:

None