Skip to content
Snippets Groups Projects
Commit ef12fd5e authored by Manuel Günther's avatar Manuel Günther
Browse files

changed c:function back to c:macro, but kept parameter types

parent c9e789cf
No related branches found
No related tags found
1 merge request!17[Automatic] update links and the ci mostly
Pipeline #
......@@ -17,12 +17,12 @@ Particularly, we provide three preprocessor directives:
Starts a try-catch block to protect your bound function against exceptions of any kinds (which would lead to a Python interpreter crash otherwise).
.. c:function:: void* BOB_CATCH_FUNCTION(char* message, void* ret)
.. c:macro:: BOB_CATCH_FUNCTION(char* message, void* ret)
Catches C++ exceptions of any kind, adds the ``message`` in case an unknown exception is caught, and returns with the given error return (which is usually 0 for normal functions or -1 for constructors and setter functions).
This macro should be used when binding a stand-alone function, for binding class member functions, please use :c:macro:`BOB_CATCH_MEMBER`.
.. c:function:: void* BOB_CATCH_MEMBER(char* message, void* ret)
.. c:macro:: BOB_CATCH_MEMBER(char* message, void* ret)
Catches C++ exceptions of any kind, adds the ``message`` in case an unknown exception is caught, and returns with the given error return (which is usually 0 for normal functions or -1 for constructors and setter functions).
This macro should be used when binding a member function of a class, for binding stand-alone functions, please use :c:macro:`BOB_CATCH_FUNCTION`.
......@@ -35,7 +35,7 @@ These preprocessor directives will catch any C++ exception that is raised inside
Additionally, we added some preprocessor directives that help in the bindings:
.. c:function:: int PyBob_NumberCheck(PyObject* o)
.. c:macro:: PyBob_NumberCheck(PyObject* o)
Checks if the given object ``o`` is a number, i.e., an int, a long, a float or a complex.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment