Skip to content

Commit c3fcbde

Browse files
author
renaud gaudin
committed
Fixed wording and harmonized docstrings
1 parent 3a8df6a commit c3fcbde

File tree

3 files changed

+227
-148
lines changed

3 files changed

+227
-148
lines changed

libzim/libwrapper.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ ObjWrapper::~ObjWrapper()
6666
}
6767

6868

69-
// Just call the rigth (regarding the output) method.
69+
// Just call the right (regarding the output) method.
7070
// No check or error handling.
7171
template<typename Output>
7272
Output _callMethodOnObj(PyObject *obj, const std::string& methodName, std::string& error);
@@ -176,7 +176,7 @@ zim::Compression comp_from_int(int compValue)
176176
case 2:
177177
return zim::Compression::Zstd;
178178
default:
179-
// Should we raise a error ?
179+
// Should we raise an error ?
180180
return zim::Compression::None;
181181
}
182182
}

libzim/libwrapper.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
struct _object;
3535
typedef _object PyObject;
3636

37-
// There is two kind of wrapping :
37+
// There are two kinds of wrapping :
3838
// - Wrapping C++ object to pass it in the Python world.
3939
// - Wrapping Python objects to pass it to the C++ world (mainly used by the creator).
4040
//
@@ -50,8 +50,8 @@ typedef _object PyObject;
5050
// item = archive.getItem(...);
5151
// ```
5252
// Which is not possible because the Item has not default constructor.
53-
// The solution is to manipulate all libzim object throw pointer
54-
// (pointer can be defaul constructed to nullptr).
53+
// The solution is to manipulate all libzim object through pointers
54+
// (pointer can be default constructed to nullptr).
5555
// As the libzim functions/methods return directly the instance, we have to wrap all
5656
// of them (in pure C++) to make them return a pointer.
5757
// (Hopefully, copy constructor is available on libzim classes)
@@ -65,7 +65,7 @@ typedef _object PyObject;
6565
// Wrapper<Foo> instead of Foo.
6666
// As Wrapper<Foo> do not inherit from Foo, we must define all the methods we want to wrap in python.
6767
// Thoses methods just have to forward the call from the wrapper to the wrapped instance.
68-
// As Wrapper<Foo> can be implicitly construct from Foo, we can also simply forward the call and the
68+
// As Wrapper<Foo> can be implicitly constructed from Foo, we can also simply forward the call and the
6969
// conversion will be made for us.
7070
// The macro FORWARD help us a lot here.
7171

0 commit comments

Comments
 (0)