Commit Graph

37 Commits

Author SHA1 Message Date
wmayer
af16ab02a0 Base: remove some more deprecated Py2 code
and remove deprecated void from function signature and replace 0 or NULL with nullptr
2021-04-26 10:29:48 +02:00
luz paz
142c2c2c4d Base: remove Py2 code 2021-04-26 09:23:58 +02:00
wmayer
56fb65de62 Base: use Python's weak reference mechanism to avoid memory leaks due to cyclic dependencies 2021-04-23 11:02:19 +02:00
wmayer
111a21e45c Base: do not report C++ exception when converting it to Python exception
See https://forum.freecadweb.org/viewtopic.php?f=23&t=56464
2021-04-11 14:54:11 +02:00
Chris Hennes
7d5a1d7e5d Remove catch block for plain C strings
LGTM complains about this construct leaking memory. Commit 13927b2465
eliminated the parts of FreeCAD that throw those strings. This commit
eliminates the catch block.
2021-02-07 13:41:42 +01:00
luz paz
d5f6c096b8 Base: Fix header uniformity, whitespace, and doxygen
[skip ci]
2020-11-22 18:12:16 +01:00
wmayer
39cd29c0d7 Part: [skip ci] include OCC hesder to PCHs, fix compiler warning when trying to delete void pointer 2020-09-28 20:23:33 +02:00
wmayer
afd6f39197 Base: [skip ci] allow to replace twin object of PyObjectBase 2020-09-28 11:21:20 +02:00
wmayer
cd5341001e remove superfluous includes of iostream, use iosfwd instead 2020-07-28 15:22:23 +02:00
luz.paz
6f11ed298a src/Base: [skip ci] fix header uniformity
This PR fixes header uniformity across all `src/Base` files
2019-12-25 11:38:58 +01:00
Zheng, Lei
22541cfbdf Base: fix line ending in PyObjectBase.h 2019-08-28 17:46:06 +02:00
Zheng, Lei
9e3a981d37 Base: fix duplicated exception message
Because the exception can propagate across C++ and Python boundary
multiple times, prepending extra information may cause duplication,
something like,

"FreeCAD exception thrown(FreeCAD exception thrown(..."
2019-08-17 15:32:49 +02:00
Zheng, Lei
59417068f5 Base: improve exception
For better FC and Python exception mapping.
2019-08-17 14:52:08 +02:00
wmayer
dedaa80762 fixes 0003771: Memory leak in Part.Face.Surface 2019-01-23 22:38:51 +01:00
Michal Ulianko
faf8834484 py3.7 fix
PyUnicode_AsUTF8() returns const char* in py3.7 instead of char*. Making
changes to reflect that which should also be safe in
other Python versions.
2018-09-01 22:44:39 +02:00
wmayer
f8f4cd76cc clear dict when invalidating Py object to fix possible cyclic references 2018-08-25 21:49:57 +02:00
wmayer
840c9e8b3c prepare for PyCXX 7.0 2018-04-18 19:20:50 +02:00
Unknown
a8ecffb652 Misc. typo fixes
Various workbenches
2017-12-23 14:30:30 +01:00
wmayer
69d0e8bd7f py3: partially revert of getattr -> getattro because getattro is only needed for the static callback function
issue 0000995
2017-06-03 10:51:05 +02:00
looooo
bc696e5ab5 py3: change of getattr -> getattro
issue 0000995
2017-06-03 10:51:05 +02:00
wmayer
1673ab801e use specialized exception classes 2017-04-28 18:49:11 +02:00
wmayer
df1e2642d0 replacement for PR 698 2017-04-27 23:05:40 +02:00
wmayer
19111f1ed7 issue #2902: track attribute objects in parent structure to notify about changes 2017-02-14 16:38:38 +01:00
wmayer
4f23b569b3 issue #0002902: replace members of PyObjectBase with a PyDictObject 2017-02-14 13:09:09 +01:00
wmayer
b72aa9f369 issue #0002902: PyObjectBase notification chain can lead to unexpected changes to document 2017-02-14 00:32:30 +01:00
wmayer
36e1d072a6 fix -Wunused-variable 2017-01-27 16:10:19 +01:00
looooo
9f2a389dbc py3: add PyMOD_INIT_FUNC
from: py3: ported module init to python3, wwmayer
2017-01-25 10:16:06 +01:00
wmayer
fc2bbf52f9 remove deprecated macros 2016-11-09 16:58:54 +01:00
wmayer
1e12b54a7b Coverity issues:
129202: replace dynamic_cast with static_cast
129421, 129422: fix Py_Return macro
128928: Unchecked return value
129488, 129490: uninitialized scalar variable
129567, 129661: uninitialized scalar field
129665: uninitialized pointer field
2016-08-15 21:28:41 +02:00
wmayer
ee28daa669 + replace old C casts with static_cast in generated C++ code, remove unused parent structure of Python classes, support of -1 as return value of setCustomAttributes 2015-09-27 22:08:08 +02:00
Mateusz Skowroński
43a4a5938c Fix files encoding. Go from ISO8859-1 to UTF-8. 2015-09-21 19:50:49 -03:00
Sebastian Hoogen
ed66ada1cf issue #1700 replace PyExc_Exception 2014-09-17 11:15:57 +02:00
Sebastian Hoogen
5e51a6cdf7 fixes #0001422: Subclass Exception
inherit Base.FreeCADError form RuntimeError
inherit Part.OCCError from Base.FreeCADError
inherit OCCDomainError from Part.OCCError
inherit OCCRangeError from Part.OCCError
inherit OCCConstructionError from OCCDomainError
inherit OCCDimensionError from OCCDomainError
Added PY_CATCH_OCC macro
replace PyExc_Exception
use FreeCADError in makeWireString
catch exception in BSplineCurve.increasedegree
2014-09-17 11:15:56 +02:00
wmayer
0467777d1b + remove unneeded semicolons 2014-05-08 17:32:23 +02:00
wmayer
79c0e0bd2a + fix typos or documentation 2014-03-29 11:46:07 +01:00
wmayer
99b6a0c4c3 Fixes for MacOSX 2012-10-26 12:59:43 +02:00
wmayer
120ca87015 + unify DLL export defines to namespace names
git-svn-id: https://free-cad.svn.sourceforge.net/svnroot/free-cad/trunk@5000 e8eeb9e2-ec13-0410-a4a9-efa5cf37419d
2011-10-10 13:44:52 +00:00