You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This feature pull request adds the appropriate C language equivalent for
declaring `list` and `set` containers in Python, as well as freeing
their memory, with the help of the STC library. This fixespyccel#1655 and
pyccel#1659.
**Commit Summary**
- Copy STC files to the destination path using
`copy_internal_library()`.
- Change the order of printing the module and the module header in
`codegen` to determine the appropriate STC macros.
- Perform the appropriate class method renaming in `_print_Module()`
instead of `_print_Module_Header()`.
- Determine the right STC container type and construct its macros, as
well as the container variable name (`i_type` macro).
- Generate the deallocation node of a container using the STC method
`container_X_drop(&container_var)`.
- Generate the initialization of an STC container in C using the method
`c_init()`.
- Add tests to check the initialization of `list` and `set` using
different data types.
---------
Co-authored-by: Farouk-Echaref <[email protected]>
Co-authored-by: mustapha-belbiad <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>
Co-authored-by: EmilyBourne <[email protected]>
0 commit comments