File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -377,7 +377,7 @@ template <> struct process_attribute<is_new_style_constructor> : process_attribu
377
377
};
378
378
379
379
inline void process_kw_only_arg (const arg &a, function_record *r) {
380
- if (!a.name || strlen ( a.name ) == 0 )
380
+ if (!a.name || a.name [ 0 ] == ' \0 ' )
381
381
pybind11_fail (" arg(): cannot specify an unnamed argument after an kw_only() annotation" );
382
382
++r->nargs_kw_only ;
383
383
}
Original file line number Diff line number Diff line change @@ -470,7 +470,7 @@ class cpp_function : public function {
470
470
signatures += it->signature ;
471
471
signatures += " \n " ;
472
472
}
473
- if (it->doc && strlen ( it->doc ) > 0 && options::show_user_defined_docstrings ()) {
473
+ if (it->doc && it->doc [ 0 ] != ' \0 ' && options::show_user_defined_docstrings ()) {
474
474
// If we're appending another docstring, and aren't printing function signatures, we
475
475
// need to append a newline first:
476
476
if (!options::show_function_signatures ()) {
You can’t perform that action at this time.
0 commit comments