William S Fulton
5ac5d90f97
Add forward class definition for std::filesystem::path class
...
The namespace is missing for the path class, so this provides
more type information to fix this problem.
Closes #2993
2024-08-19 18:33:10 +01:00
William S Fulton
67bc1cbb0f
Py_XDECREF -> Py_DecRef for stable ABI compliance
2024-03-24 18:12:21 +00:00
William S Fulton
53ee3fe97b
Py_DECREF -> Py_DecRef for stable ABI compliance
2024-03-24 18:12:21 +00:00
William S Fulton
f89dd59d4b
Replace SWIG_Python_str_AsChar with SWIG_PyUnicode_AsUTF8AndSize
...
SWIG_Python_str_AsChar has undefined behaviour when Py_LIMITED_API is defined
as it returns a pointer to a string in a PyBytes object that no longer exists.
SWIG_PyUnicode_AsUTF8AndSize is an efficient replacement, but requires a
different API and the caller to decrement the refcount on the intermediate
PyObject in the Py_LIMITED_API < 0x030A0000 implementation. The alternative
would have required copying the returned char * string as was done in a
previous implementation requiring a call to the defunct SWIG_Python_str_DelForPy3
function.
Any users calling the removed API will have to make changes.
2023-12-13 19:55:34 +00:00
William S Fulton
29626ad18d
Python stable abi for std::filesystem
2023-12-04 19:18:36 +00:00
William S Fulton
bd093173af
Add <type_traits> fragment for traits usage in std::filesystem
2023-11-18 10:32:31 +00:00
William S Fulton
9bbd176038
Correct const std::filesystem & typemaps
...
Marshal to pathlib.Path
2023-11-18 10:03:52 +00:00
William S Fulton
d2221f1547
Fix memory leak wrapping const std::filesystem&
2023-11-17 23:11:30 +00:00
William S Fulton
ac5cd598f8
std::filesystem pointer handling correction
...
Only passing std:filesystem by value and const ref is marshalled to a pathlib.Path.
This is consistent with all other marhalling in SWIG.
2023-11-17 23:01:28 +00:00
William S Fulton
f6d8c6b089
Python std::filesystem cleanup
2023-11-17 22:29:59 +00:00
William S Fulton
50312e21f5
Cosmetic whitespace corrections
2023-11-17 22:06:16 +00:00
Julien Marrec
e3e92986ad
Try to use wstring/wchar_t on windows
2023-07-03 09:45:58 +02:00
Julien Marrec
156b069253
Reformat
2023-07-03 09:42:39 +02:00
Julien Marrec
bdce563e94
Rename the helpers within the fragment to be more uniquely named
2023-06-30 14:11:14 +02:00
Julien Marrec
b2639da892
Address review comments
2023-06-30 14:11:14 +02:00
Julien Marrec
32fe204771
path::string() returns a copy not a const ref.
2023-06-30 14:11:14 +02:00
Julien Marrec
7bdbbcb028
Address review comment by @degasus on #1999 originally
2023-06-30 14:11:14 +02:00
Julien Marrec
0798a46e0d
Had trouble getting the test to be properly ignored. If I wrap the inline line 35 in #if __cplusplus the wrapper code isn't generated
2023-06-30 14:11:14 +02:00
Ramzi Sabra
2fcbd937f7
Cherry pick from yasamoka/master
...
Co-authored-by: Julien Marrec <julien.marrec@gmail.com>
2023-06-30 14:11:14 +02:00